Tuesday, November 10, 2009

[Architecture] TechED 2009 – Architecture Talk
Command Query Responsibility Segregation

The architecture talk of Udi Dohan,  SOA Specialist and Mastermind behind NServiceBus, was centered around current architecture layer schemes and real life scenarios and new ways of solving customer needs.

I really liked his talk and admit that he made me think critically on our current architecture approaches. This was by far the best architecture talk on TechED 2009. There were so many interesting ideas and concepts. This article sums them up.

Current n-tier Architecture Weaknesses

Software development is all about helping customers to solve problems and/or do some work. It only serves for something if there are added values and if the user intents were correctly discovered and satisfied. Udi stated that the current n-tier approach may not always provide the best way to achieve this goal.

Developers spend most of their time on building software infrastructures instead of concentrating on solving user needs. By having all these different layers in a n-tier architecture there is also the need for transforming data between them. This transformation makes maintainability and extensibility much more complicated.

P1000320
Much overhead is added for data transformations. Functionalities that the user will not see in the end and that will cost performance (nothing is for free). No added value! The user is just interested in the final result – the application that he uses to achieve his goals.

If the application is not doing what the user needs than he will not be happy with it, even if the underlying architecture was from a technical point of view “perfectly” designed.

P1000322
That is why we need to break free from our current thinking and try to approach problems in another manner. Ideally the goal of software architecture is to come up with simple solutions for complex problems.

Udi presented a more simple way of displaying read only data in the UI (which is a use case that does not apply to all user needs but sometimes it is just what needs to be done). Let the UI have a direct connection to the “Persitent View Model” (in other words have a view in the DB for each view in the UI).

P1000326
By doing it like this all intermediary steps are suppressed and when there is a change only the UI Layer and the corresponding views are affected. Simpler, easier to maintain and providing better performance! A win on each level!

This is not possible for all application scenarios but if possible it should be considered when designing application architectures.

Validation and Business Rules

The next topic concerned the separation of Validation and Business Rules: What is covered by Validation and what needs to be done in Business Rules? Udi provided a good explication, that says that Validation should be done upfront to assure that the input is correct (and only that). Business Rules apply to a combination of system states and business logic. They decide if the treatment must be continued or aborted.

P1000332

Command Processing Layer Approach

If we consider a new layer approach that handles commands we could describe the different layers and their interaction as follows.

P1000333 P1000335

Capturing User Intent

Udi gave an example of how to capture user intents and how to architecture the system that fulfills the user needs. He took an example of a ticket reservation system for a football stadium and how the IT system was built to satisfy the users.

P1000342 P1000343
The user enters his needs into the system and gives information of what is acceptable (ex: 4 places together in a group, seat type, etc…). The systems then searches asynchronously if the user needs can be satisfied and alerts the user via email when it has finished (it either finds the places and reserves them or it doesn’t). Less frustrations for the user since it is the system that finds the places and reserves them (in fact working like an agent).

P1000350

Summary

By using the Command Query Responsibility Segregation Principle that he introduced and having an asynchronous approach the system is more scalable, easier to maintain – and for the user – easier to use and understand.

P1000351 P1000352
Share/Save/Bookmark

Monday, November 9, 2009

[WCF] TechED 2009 - New features of WCF 4.0

Today I attended at a Session by Christian Weyer that contained information on the new features of WCF 4.0. There are no big changes but many ameliorations that make it much easier and much more comfortable to work with WCF.

P1000220P1000224
WCF is very flexible and easy to use, but there are also some down-sides such as the configuration file management. There are many switches and elements that need to be mastered, configured and maintained.
The next version of WCF will include default settings that will minimize the need to have very verbose configuration files if standard settings are used.

P1000228P1000229P1000231
Furthermore, there are now protocol mappings that can be customized and redefined.

P1000232P1000234
A big new feature are the new Routing functionalities. They can be used to have a single entry point for all client requests, that are then dispatched internally to the right business services. The business services can use completely different protocols and bindings. Routing tables and filters can be used to configure routing rules.

P1000238P1000239 P1000240
WCF services can now be made discoverable, which is also a quite interesting new feature that may fit very well in some use cases.

P1000243P1000245 P1000247
Rest support was largely enhanced and dynamic content types are now also supported (a feature that already exists in ADO.NET Data Services since some time).

P1000251P1000252
There are some additional little tweaks that further enhance the overall WCF experience.

P1000254
Don't hesitate and navigate to the Blog of the speaker. He really did a good job and managed to do quite and interesting session.

P1000255
Share/Save/Bookmark

[Event] TechED 2009 has started

I am right now at the TechED 2009 in Berlin where I am mainly interested in Architecture sessions, WCF 4.0, Dublin, WF 4.0, Visual Studio 2010, BizTalk 2009 and as many Hands-On-Labs as possible.

I will try to post all the news as fast as possible in the next days. So please stay tuned or if you have the possibility come to Berlin and see it for yourself.

P1000212 P1000213 P1000218
Share/Save/Bookmark

Friday, November 6, 2009

[Tutorial] UML with Visual Studio 2010 Ultimate Beta 2

As an Architect you get to use UML quite often in your daily work. A good diagram can say much more than text and – if well done - is easy understandable and shareable amongst team members and the management.

Microsoft announced some time ago that it endorses UML and that it set a core focus on modeling. It therefore announced its membership in the standards body Object Management Group™ (OMG™).

Microsoft-UML-banner logo-omg

The next version of Visual Studio will include a quite sophisticated set of tools and features for UML Modeling and its associated Code Generation.

I recently installed Visual Studio 2010 Ultimate Beta 2 in a Hyper-V Virtual Machine to test these new UML features. The following steps are necessary to use them.
  • Create a new project of type “Modeling Project”
VS2010_B2_ModelingProject
  • This will create the basic structure for the UML Models
VS2010_B2_ModelingProject2
  • There are 7 diagram choices currently possible in the Beta 2 release, Add a “UML Class Diagram”
VS2010_B2_ModelingProject3
  • The Toolbox is now filled with elements that are useful for the creation of classes and class relationships
UMLClassDiagram1
  • Add some elements and design your classes
UMLClassDiagram2UMLClassDiagram3
  • Add a “UML Sequence Diagram”, the Toolbox is now filled with elements that are useful for the creation of interactions
UMLSequenceDiagram1
  • Add some elements and design your interactions
UMLSequenceDiagram2
  • Add a “UML Use Case Diagram”, the Toolbox is now filled with elements that are useful for the creation of use cases
  • UMLUseCaseDiagram1
  • Add some elements and design your use cases (note that it is not possible to declare extension points in the Beta 2 release at the moment)
UMLUseCaseDiagram2
  • Add a “UML Activity Diagram”, the Toolbox is now filled with elements that are useful for the creation of actions
UMLActivityDiagram1
  • Add some elements and design your actions (note that there are sometimes little display problems, especially when using decision nodes and input pins)
UMLActivityDiagram2
  • Add a “UML Component Diagram”, the Toolbox is now filled with elements that are useful for the creation of components and component relationships
UMLComponentDiagram1
  • Add some elements and design your components (note that Delegations and Part Assemblies don’t work in the Beta 2 release)
UMLComponentDiagram2
  • The “Layer Diagram” and “Directed Graph Document” are no UML Diagrams, so I won’t discuss them in this article
  • You can use the new UML Model Explorer to see all elements for all diagrams in one place
UMLModelExplorer
Share/Save/Bookmark

Thursday, October 22, 2009

[VS 2010 - .NET 4.0] Visual Studio 2010 & .NET Framework 4.0 Beta 2

Microsoft released Visual Studio 2010 and .NET Framework 4.0 Beta 2 for download to the public.

Don’t hesitate to download, install and try out all the new features of those highly awaited versions of Visual Studio and the .NET Framework.

Microsoft Visual Studio 2010 Professional Beta 2 (ISO) :
http://download.microsoft.com/download/5/8/A/58ABDB52-684A-4DED-AD14-FD82E9EECAE6/VS2010B2Pro1.iso

Microsoft Visual Studio 2010 Premium Beta 2 (ISO) :
http://download.microsoft.com/download/9/8/9/989B6C8D-DA2E-4849-A533-69BE52C4C674/VS2010B2Prem1.iso

Microsoft Visual Studio 2010 Ultimate Beta 2 (ISO) :
http://download.microsoft.com/download/F/C/9/FC9131D2-688C-43DC-91CF-53359D4882E7/VS2010B2Ult.iso

For more details about all the new features of Visual Studio 2010 please visit:
http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

VS2010


Share/Save/Bookmark

Tuesday, October 20, 2009

[Event] TechEd 2009 in Berlin

The Microsoft TechEd 2009 will be from the 9th until the 13th November in Berlin in Germany this year. A vast amount of MVPs, RDs, MCTs and Microsoft employees will be present.

You will be able to see Microsoft product demos, talk with industry experts, get hands-on training, participate in group chalk-talks and learn about Microsoft services and upcoming product.

A must for everybody who is working in the software development sector (especially if you are working with Microsoft product).

I am very happy that I will be attending. We might get into contact if you plan to participate in some of the software development and architecture sessions.

See you there !! Check my Blog postings after the event !!

TechEd2009


Share/Save/Bookmark

Monday, October 12, 2009

[MDM] Microsoft Master Data Services

Microsoft has bought Stratature some time ago and will soon deliver its own Master Data Management product (ancient Codename Bulldog). It will be shipped with the release of SQL Server 2008 R2 and will be called Master Data Services.

More information can be found here:

http://www.microsoft.com/sqlserver/2008/en/us/mds.aspx

http://sqlblog.com/blogs/knightreign/


Share/Save/Bookmark