-
I am very proud that we were able to secure David Chappell for our half-day conference about cloud computing!
On December 12th, right before Christmas, David well join us in Austria, Vienna. He will talk about his view on cloud computing in general, about several cloud computing platforms including those from Microsoft, Amazon, Google & Co.
But more specific he will unveil many of the details about the architecture and the possibilities of the Windows Azure platform we recently announced at PDC in L.A. last week. In the second part one of my colleagues and I myself will unveil some more technical details of Azure by developing two simple sample applications based on the Azure-platform so that you will be able to understand what developing for Azure will mean and how much of your code you can re-use between the on-premise- and cloud-world.
If you are interested in our Cloud Computing day, you should check out more details about the event here and register ASAP on our event registration home-page.
I would be happy to meet you for this conference in Vienna;)
Mario
-
(Click here to download my Security-Interop-Sample)
(Click here for downloading the presentation)
While I am here at PDC studying the most exciting new stuff from Microsoft around Software+Services and much more interesting platform-enhancements (Dublin, Velocity, Geneva etc.) I promised about more than a week ago at the DevCamp 2008 conference in Vienna that I will publish some details about a demo on security I've shown in my session about applying concepts from the Identity Meta System Vision in the real world for heterogeneous environments.
The session itself was all about taking the separation of concerns in terms of authentication and authorization that is proposed by federated identity patterns. Furthermore it was about learning, how this SoC can help you solving real world problems when it comes down to implementing security in your solutions.
Click here for downloading the presentation. I'd strongly recommend you do this before moving on in this post!
In the last demo I've shown a Security Token Service (STS) written with Microsoft Codename "Zermatt" that authenticates requests coming from a .NET-based client application through Windows Authentication and transforms the (proprietary;)) Windows-token into a standards-based SAML-token. Why that? Well, non-Windows based platforms won't be able to deal with a proprietary Windows-token for authorizing requests - especially if they're not running on Windows. But they will be able to work with SAML as it is just a signed XML with information about an authenticated user proofed by an identity provider (the security token service). The following picture shows the scenario I've implemented:

In this post I give you a step-by-step guide how-to setup the samples which you find for download under the following link:
Click here to download my Security-Interop-Sample
In the following sections I summarized the pre-requisites and steps you need to complete for making the sample above work!
Installation Pre-Requisites
- Microsoft-Part of the Sample
- Java-Part of the Sample
Steps to make the Microsoft / .NET Side running:
- Install the certificates using Zermatt Samples Utilities
The necessary batch-files for doing so are located in the Zermatt Directory (typically “C:\Program Files\Microsoft Code Name Zermatt\Samples\Utilities”) – execute the SamplesPreReqSetup.bat in a Visual Studio Command Prompt as Administrator. - Run Visual Studio 2008 as Administrator and open the SimpleSTSForActiveClients-VS2008.sln Visual Studio 2008 solution located in the “<your working folder>\DevCamp\Simple STS For Active Clients” directory. This is a modified and extended version of the standard Simple Active STS sample included with Microsoft Code Name “Zermatt”.
- Right-click the solution and configure the startup-projects so that the STS, the .NET-based test service and the test-client start-up as shown in the following screen-shot:

- Try the solution by pressing CTRL-F5 in Visual Studio to run everything without debugging. Important is that you follow the following steps in the running applications:
- In the “ClaimsAwareWebSErvice-VS2008”-project enter “1” to take the included simple active STS as a security token service.
- In the client application type in “net” to call the .NET-based service and verify whether the STS and the .NET-based service as well as the client are working properly on your machine!

Make the Java-Side working
Now, after the .NET-based solution is running, we can move forward by making the Java-version of our claims-based web service running. For that purpose follow the subsequent steps:
- First of all run Netbeans Developer studio as administrator and make sure that all application server references are registered with your IDE. With the Netbeans 6.5 beta I’ve installed, just Glassfish v3 was included in the server list. So you need to add Glassfish v2 (which is the one I’ve tested the service with) to your services list. For that purpose follow the next sub-steps but note that by default Netbeans should create a personal domain during the installation of the IDE:
- In the left panel switch to the services tab and open the “Servers” tree-view element.
- Right-click the “Servers”-node and select “Add Server”
- Select “Glassfish V2” from the list and leave the name below as it is.

- Create a personal domain for the application server that will install some configuration files in your local user profile. These files also will include the certificate store for your development instance of the app-server.

- Select a folder for the development domain where you would like to install the configuration files to as shown in the following screen (note that there it will be “D:\Data\.testDevDomain” which is what I will refer to later on, as well)

- Then you will have to select an administrator user name and a password and afterwards you will need to specify the ports on which the server is running. Make sure that nothing else runs on these ports and note the ports as you will need them later on.
- Then open the Java-project I’ve included in the samples-download. This project is located in the “<your working folder>\DevCamp\JavaWebHostNew” directory. Just let Netbeans point to that directory in the open-project dialog and it will detect that this is a Netbeans-project, automatically.
- You probably will need to update a few references to point to dom4j and Jaxen as I use these libraries for some XML processing in the test application. Netbeans will warn you if you need to update the references. If so, switch to the “Projects” tab in the panel on the left, navigate to your project “JavaWebHostNew” and within there on the libraries-node. Right-click the “Libraries”-node and select “Add Jar / Folder” from the context menu. Add the “dom4j-1.6.1.jar” and the “jaxen-1.1.1.jar” files as libraries this way to your project. I’ve included them in the download in the “<your working folder>\DevCamp\Pre-Requisites\Java” directory”. Also remove all broken references from the project by right-clicking the project and going to the properties:

- After all libraries and references are set-up correctly, you should be able to compile the solution using Netbeans, successfully. Next we can start configuring the application server appropriately to make this stuff running.
- Next we need to install the Java cryptography policy extensions (JCE) with Java to be able to work with our certificates. For this purpose copy all files from the “<your working folder>\ DevCamp\Pre-Requisites\Java\jce”-directory to the “C:\Program Files\Java\jdk1.5.0_15\jre\lib\security”-directory and overwrite all files.
- Now we need to install certificates for the two sides of the application – first the Java-service needs to be able to trust the STS and therefore it needs to have the STS’s public key in its trusted certificates store and second the .NET client and the STS need to have a way to trust the Java service and therefore we need to export the public key from the Java service’s certificate and import it into the Windows certificate store.
- To ensure, that the Java-service is able to trust and validate tokens issued by the STS, execute the following steps on your machine.
- Export the STS certificate from the Windows certificate store as DER-encoded file. Only export the public key. Store the file to a directory of your choice. The certificates are installed in the personal store of the local computer by the previously executed Microsoft Code Name Zermatt Samples Batch-file utilities when setting up the .NET based solution, before. You can get to the machine’s certificate store by starting a management console (mmc.exe) and selecting “File – Add / Remove Snap-In” and then select “Certificates” from the list, click the “Add >” button and then click okay. Make sure that you select “Computer Account” and “Local Computer” when adding the snap-in. You’ll find the certificate as shown in the following screen-shot:

- Import the STS-public key certificate in the trusted certificates store of your Glassfish personal domain by executing the following command (typically the password you have to enter is changeit by default):
keytool -import -alias sts -file sts.cer -keystore "d:\Data\.testDevDomain\config\cacerts.jks"

- Next we need to ensure that the STS and the client can trust the Java service. For this purpose we need to export the Java service’s certificate and import it in the Windows certificate store. To do so, follow these steps:
- Execute the following command to export the default service certificate from glassfish with its public key. This certificate is typically called s1as.

- Now import the certificate in the personal store of the local computer of the Windows Certificate store. Also import the certificate into the trusted people store so that the validation of the certificate can succeed.

- Before we test the web service solution we need to make sure that the correct WS-Policy configuration is set for the Java Web Service. For this purpose open the “Web Services”-node in your Netbeans-project and double-click the “JavaTestService” Web Service in the project. In the designer then click the “Advanced…” button to open the web service configuration dialog and make sure that it looks as shown in the following two screen-shots:

- Finally you can un-deploy and deploy the new service to Glassfish as shown in the following screen-shot.

- It’s important that you note the URL on which your web service is listening depending on the ports you configured for your Glassfish application server instance and development-domain. Typically this should appear in the output-window within the Netbeans-IDE for Glassfish as shown in the following screen-shot:

Final steps and then running the application
After you have configured Glassfish, configured the Java Web Service and deployed it, successfully, you can try the interoperability solution between Java and .NET. For this purpose you need to update the .NET test-client’s configuration to point to your running Java web service and then run the application. The URL to the Java-service is configured in the client’s App.config (NET.TestClient in my sample solution) as shown in the following screen-shot:

Just one last step before running it – you need to update the STS so that it encrypts the SAML-token with the certificate of your Glassfish Java Web service. As these certificates are re-generated for each machine you need to update my code in the sample to make it work. Update the certificate-name in the project “SimpleActiveSTS-VS2008” of my solution in the file “MySecurityTokenService.cs” and change the common name of the certificate to yours (you should only need to replace the machine-name part of the common name which is “vaiom” in my sample and should be “yourmachinename” in your environment):

After you have updated this one you can try to run the solution and instead of calling the .NET-based service you can call the Java-service by entering “java” instead of “net” when the client asks you which web service it should call. The following screen-shot shows the resulting application in action.

In the console-windows you can see the .NET-based applications running: the claims-aware web service which is not called in this scenario, the security token service which issues a SAML-token based on the Windows identity the client authenticates with and the client itself that calls the Java service this time. In the background you can see the Netbeans IDE with the Glassfish output Window where clearly the Java application outputs the contents of the SAML token it gets passed from the STS. That SAML token just contains claims extracted from the Windows-token the client authenticated with against the STS. And that way we managed to make security-interoperability happen by transforming a proprietary Windows-token to a standardized SAML-token through an STS and give Java access to the contents of the Windows-token. Of course the Java-application could run on a Linux-box as well and still you would be able to use Windows and AD as the primary identity management system for managing users, groups etc. and include Java-services (or other services) running on any OS with your security-infrastructure as they don’t need to know about any details of the security infrastructure. The only thing they need to know is the Security Token Service which proofs the fact that the user has been authenticated successfully by passing a signed SAML-token through the client to the Java-service. In my opinion that shows one of the things that unveil the real power of a federated identity infrastructure based on the WS-* standards...
If you have any feedback or questions, feel free getting in touch with me through my blog;) ... of course I'd be happy about any feedback:)
Cheers
Mario
-
Last Tuesday a few of our biggest partners (CSS, Cubido and TechTalk) organized their second DevCamp conference in Vienna... and again I have to say it was a great event. While most of the sessions where delivered by peers from our partners, Max and I delivered several presentations and the key note as well.
Btw., Max found a few really cool tools while preparing for the presentation and even better, he created some project templates and wizards for using the Composite WPF Guidance in a more effective way in Visual Studio... check out his blog for the project templates and the tools...
By clicking the links below you can download the presentation material from my sessions. As promised, I will blog a step-by-step introduction to make the .NET - Java / Glassfish WS-Trust / Identity interop-demo working in your machine in a later post...
Click here to download my key-note presentation.
Click here to download the Identity Meta System session.
Click here to download the Office SharePoint Enterprise 2.0 session.
Cheers
Mario
-
While the feedback for yesterday's forum was in the good average range for all architect forums (typically the architects are more critical than others;)), I really started thinking about the future of the platform and the way we are driving this platform.
But, why did I start to think about it?
Well, yesterday was the first forum after a very long time where I selected the topic really based on the feedback I've got from several architects and customers in the past 8-10 months - Enterprise Service Bus, which is a very concrete and not very strategic and visionary topic.
But I really got that feedback from several architects, so I thought it makes sense discussing about this topic - although I knew up-front, that Microsoft's ESB Guidance from the patterns & practices team addresses just some of the requirements to an enterprise service bus (location transparency, intelligent routing, integration and adaption and autonomous processing with configurable interaction models are the primary concerns addressed by our ESB guidance).
To not just stay with a concrete, non-visionary topic I decided to add Enterprise 2.0 into the discussion to have a rather visionary topic in it, as well - and as Enterprise 2.0 is a primary driver for enterprise mash-ups (= composite applications at the boundary layer) I thought it fits very well into the theme.
But what happened (independently from the fact that the average feedback wasn't bad;)):
- some of you gave me the feedback that you don't want to have these types of concrete topics in the forum and...
- ...others told me that they like the open and honest discussion about concrete topics, usage of technology and honest discussion on strengths and especially weaknesses of Microsoft's technologies in that area.
That actually made me start thinking about how we could deal with these different opinions in the future. And I think I definitely need your feedback and help as members of the architect forum community on dealing with these different points-of-view... because I understand both ways of thinking:)
There are a few ideas I cut put into the race to start thinking about the future of the architect forum:
- Way 1:
Start an architect council
The responsibility of the council would be to decide on the contents and structure for upcoming architect forums, together instead of just having me to decide on contents, alone;) Here I would see a few core members (max. 15) of the forum which are willing to participate in "creating" the architect forum. We could meet on a half-a-year basis or a quarterly basis to decide together about the contents of the future architect forum events and discuss, what we think is important and interesting for our community. But while I think I will be able to deliver parts of the forum myself and find interesting speakers that will help us in delivering presentations and discussions for the forum, I also think when we run the forum this way that it can't be a one-man-show, anymore - so in that case that also means that I would also rely on the know-how and contacts of the council's and forum's members to deliver contents or to put me in contact with people that might be interesting for delivering contents. Actually that would be something I would find extremely interesting as it would put our strong community to the next level!! - Way 2:
Split into Focus Groups
In the Innovation Center we will have the opportunity to re-structure the architect forum. One possible solution of that would be to come together and start with a strategy update from Microsoft as I established it in the past 1,5 years. Then we split up into two groups - one group for the rather "concrete" and non-visionary topics on solving today's real-world problem, a second group for the rather "high-level" strategic and visionary topics. At the end of the forum we come together again for the joint-socializing part as usual.
For me these are first thoughts on thinking about "the Architect Forum NEW" after having 25 forums structured in a very similar way within the past 5 years.
But - as we are a community - I don't want to decide on this change alone. I really want to start a discussion around this topic with you, get your opinions and thoughts. If we change something then it should be really useful for US AS A COMMUNITY and we SHOULD DECIDE TOGETHER HOW WE WANT TO CONTINUE WITH OUR COMMUNTIY!!!
Having that said I would be more than happy about a comment on this blog entry, an email in my inbox or a discussion on our XING architect forum group;)
Thank you again for being part of this really great community - I really think that together we should starting thinking about the next level of this already great community - and I think now it's a good time to start with the first thoughts on it...
Cheers
Mario
-
You can find the presentation I gave for the 25. architect forum yesterday about composite applications by clicking the following Link:
Click here for downloading the presentation
As the presentation got pretty big in the old file format I published it with the new format to keep it's size low - if you want to access the presentation download the file format converters here when using an older version of Microsoft Office.
I found it a really interesting architect forum. While the discussions
Cheers
Mario
-
This actually was my first year as a speaker and participant at JAOO in Aarhus... and I have to admit - it's very cool but different to any other conference I've been so far as a speaker.
What I really like is the focus on the conceptual level... which is exactly where I know I need to do better next year. Spending too much time in code or practical examples doesn't pay off - it's really about concepts. And this is really what I like with this conference and it's sessions. It's more about enlarging your horizon and then take the new concepts you've learned about and mapping it to your local world. Also the focus on languages is something I find really interesting - especially because it's simply different to what you get usual on developer conferences.
I really would recommend changing the slogan "from developers for developers" to a new one like "from architects and scientists for architects and developers" or so;)
Cool conference and great learning for me in any case. I hope I will get the chance to be there next year as well.
Furthermore I promised I will make my demos and presentations available on my blog. And here they are - just click on the links below for the downloads:
Click here for the presentation Material of the Office SharePoint for Enterprise 2.0 session and the ASP.NET tutorial.
Click here for the ASP.NET tutorial demos we've built during the whole day on Friday.
Finally click here for the larger ASP.NET MVC demo at the very end of the day. I fixed the problems, updated everything to ASP.NET MVC CTP 5 (so make sure you try with this one) and tested it again.
What are the pre-requisites for running these demos:
- Visual Studio 2008 - I didn't try express editions but you can do. There is actually nothing that is not possible except the unit testing. So for ASP.NET MVC demos you need at least the professional edition of Visual Studio 2008.
- SQL Server 2005 or 2008 (Express Editions or full editions) for running the databases on your local development machine. If you run SQL Server Express Edition you must update the connection-strings to use (local)\SQLEXPRESS instead of just (local) for the data source connection string property. Also if you're running a named instance of SQL you need to update the connection strings to point to your instance. For the membership API stuff and the SQL based session you need to create the databases using aspnet_regsql. For membership just walk through the wizard and select JaooUsers as database name (or update the connection strings) and for session state just execute "aspnet_regsql -S (local) -E -ssadd -sstype p" in a Visual Studio command prompt.
- For running the demos you need to have the Northwind database installed on your system. You can find it in the database-samples-downloads for SQL Server here (don't worry, these still work with SQL 2005 and 2008)!
- Rhino Mocks for the ASP.NET MVC unit testing stuff as I use Rhino there. You can download Rhino Mocks from here. I used the .NET 2.0 version as I am testing nothing specific to .NET 3.5 but you can also try with the new betas they've published there.
If you have any questions feel free contacting me through this blog - I'd be happy about any feedback!
Cheers
Mario
-
For a long time the application architecture guidance from the patterns & practices team remained unchanged... and it was inherently necessary to give it an update with all the new technologies and also trends appeared on the market.
Now the first messages are out... just take a look at the blog of my peer Cesar from Spain - he created a pretty cool mind-map with the topics addressed by the new App Arch Guidance.
Check out the following links:
Cesar's blog entry on App Arch v2
J.D. Meier's blog entry summaring new guides
Application Architecture Guide v2.0 Info
Key Features of App Architecture Guide v2.0
The Meta-frame for the App Architecture Guide
I hope that the team will release the guide as a printed book as well as they did with the previous version of the guide. I'll definitely spend one of my upcoming weekends reading the guide;)
Cheers
Mario
-
This week we started a road show through Austria for developers which are rather new to the world of .NET that want to see and learn, how modern applications will be developed with the .NET Framework.
You can download all the content of our tour from Max' blog...
At each location we will stay for a full day of code and content and we develop an application from scratch. That means - while we've prepared tons of slides - Max and I are walking just through a few of the most important slides to cover theory and then start building an application for managing events with the following bits and pieces:
- Data access layer with the ADO.NET Entity Framework.
- Business Logic Interfaces and separated Implementation Class Libraries.
- Simple WCF service interfaces for publishing our logic as interoperable web services.
- An ASP.NET web front-end that is used by end-users to find and register for events.
- A Silverlight UI that is embedded into our ASP.NET Web Front End to have some cool experience.
- And finally a WPF Application that re-uses the XAML from the Silverlight-Control to build a fully fledged desktop client.
While we had to make some architectural drawbacks (of course, I mean we have just one day for the whole implementation... e.g. we created rather RPC-style interfaces instead of message-based interfaces to keep things more simple;)), I think the application really demonstrates, how you can build an application that follows a simple 3-tier architecture splitting Data from BL and UI into autonomous units. But the picture below captures what we are building within one day nearly from scratch:
Here are some screen-shots about the application. Material is available for download on Max' blog;)
Down there you see the data base diagram. We thought we won't do something that is too simple and "constructed" for the real world. So our database even has "is-a" constructs (inheritance) through the EventDelivery, OfflineEventDelivery and OnlineEventDelivery entities:

We use these to demonstrate the inheritance capabilities of the ADO.NET Entity Framework in our business layer of the application. The business layer of course is exposed through interoperabile, WS-I compliant web services. Maybe I will post a Java-Client for our Event Solution somewhere around Christmas-time when I have completed many of my currently running engagements:)
Just that you see the application in action as well, below is a screen shot of the web front-end that is using our web service layer in between for accessing the business logic and the data for our event management system:
What you see above is an ASP.NET Master Page with a TreeView control filled with data from a SiteMapDataSource. In the main area the events are displayed - and that rather 'complex' list is something we've implemented with Silverlight 2.0 Beta 2. And now the interesting part comes. Below you see a WPF application that is using - of course - the same web services... and ... much better... the same XAML-ListBox-UI that we've created for the web application above (it's just styled in a different way through resources - we even haven't had to touch the XAML - we just required some compiler pre-processors to avoid the desktop-compiler to try to compile Silverlight-specific stuff):

For me, the fact that we can share assets between Silverlight (and therefore - the Web) and Desktop applications is crucial as it really helps saving development- and design-time for specific parts of the application. This is really cool and a real advantage compared to developing parts of the UI two times, one time for the web and one time for the desktop app if you need to support both.
Okay, these are some of my thoughts on the application that we've developed for our road show. As mentioned before, just navigate to Max' blog if you want to download the complete solution here.
Finally I just wanted to mention that it is great touring with Max through the country delivering the show and know-how to the developer community, again;)
Cheers
Mario
-
Last week, just one week after my vacation, I had it in my inbox - the announcement that Issue 16 of the Architecture Journal about Identity and Access Management has been published.
In this issue of the journal you will find an article I've written about federated identity architectures in health care. This article is about a project that I have been involved in within the whole last winter-season and where Emmanuel Mesas from the Microsoft Innovation Center and I helped the Austrian Medical Association in Austria building a prototype. With that project and this prototype my extreme interest in the Identity Meta System Vision was born. Since then I really believe in the concepts of Kim Cameron's vision.
A brief history: a little more than a year ago the Austrian Medical Association asked us for helping them in providing additional concepts to the Electronic Health Care Records system which was planned in Austria. The primary challenge there was, that the health care environment is (a) a politically complex environment and (b) has extreme security-requirements due to the strong data protection law in Austria.
While having several Architectural Design Sessions and finally a prototyping session with the Microsoft Innovation Center Copenhagen we came up with a solution which really leveraged some primary concepts of the Identity Meta System vision.
The primary benefit - separation of concerns in the identity world
When taking a look at the concepts of the identity meta system it really proposes a clear separation of roles:
- The identity provider (IP) is responsible for issuing, validating and proofing the validity of identities. By proofing statements about an identity the provider can definitely influence authorization - but he is not doing all the authorization by himself.
- Authorization is done by the relying party (RP). The RP finally accepts identity tokens with statements about an identity proofed by the IP. Other than in classic architectures where each application authenticates and authorizes a user at their facade layer (such as a web service that authenticates each and every request), the application (which is the RP in this scenario) accepts a digitally signed security token from an IP as proof for an identity and just does the authorization and business logic part.
- And of course finally we have the user who can be authenticated by an IP while accessing an RP through a variety of mechanisms.
This separation of concerns really allowed us to deal with the technically and politically heterogeneous and complex environment. Also due the flexible support of different standards such as SAML, Kerberos or X.509 it is much easier to build a security environment in heterogeneous environments that include .NET, Java or any other technology you could imagine. If you are interested in more details, read on here.
Btw. Cardspace was not part of the project, we were just talking about Security Token Services and Claims-based Web Services and Clients in the scope of this system.
My Personal Thoughts
This project really helped me understanding the primary advantages of claims-based and federated identity concepts. Since that I strongly... strongly believe in the Identity Meta System as a whole!! I've also given several presentations during the past 12 months on that topic... and more presentations will follow!
Currently I am working on a presentation on using federated and claims-based security in heterogeneous environments including building a bridge between .NET and Java using DigitalMe and Eclipse Higgins... we'll see what's coming out there;)
In any case I recommend reading the last journal issue and, of course, my article about how we leveraged the identity meta system's concept to support the Austrian Medical Association and the Austrian Electronic Health Care Records system for the future about a year ago:)
Click here to read the article;)
-
Actually this is going to be one of the most exciting things for me this year - I will have one session and a whole-day tutorial at JAOO Conference in Denmark / Aarhus (JAOO originally stands for Java and Object Oriented... the conference itself has really been established to a well known conference for software architects now). That means talking side-by-side with industry leaders such as Anders Hejlsberg, Frank Buschmann, Gregor Hophe and lot's of other great people... personally for me that's a real challenge and I am really looking forward to it with some kind of nervous excitement in my stomach;)
See here for more details on the things I will do there...
-
Finally, after the Composite Application Guidance for WPF (codename "Prism") was released last week, I started thinking about necessary steps for migrating CAB/SCSF based solutions to the new Smart Client framework built with WPF. I also started migrating the solution I've created for last year's TechEd and for the HP banqpro/ case study to Composite WPF guidance.
I would like to share the thoughts I made with you right now... but don't expect this to be the only post about this topic. I believe while moving on with the migration I definitely will find out some more things and my thoughts will evolve, definitely;)
Important note: please understand that these are my own, personal thoughts and that this is NOT Microsoft's official opinion and this is not an official Microsoft-statement at all!
#1: What should I use when starting a new project?
My personal conclusion: For me that question is obvious: use Composite WPF guidance and WPF if your client-hardware is sufficient for WPF.
WPF adds a lot value that make things for development of enterprise line-of-business client apps much easier - although the design time experience isn't where it should be, today. And Composite WPF brings you the framework for building extensible and manageable enterprise-level smart clients with WPF! So just use it!
#2: Should you migrate to Composite WPF from CAB/SCSF?
Of course many customers are asking this question right now. They are afraid that they are using an old technology which is not going to be state-of-the-art anymore and running into panic-mode.
Well, I don't see it that critical. CAB/SCSF is still driven forward by the community (see SCSFContrib, SCSFWPF etc.) and there are lots of people out there answering questions, sharing experience etc. Furthermore according to the Microsoft homepage it is still supported the same way it was supported all the time: it is simply treated as custom code in support cases with Microsoft.
My personal conclusion therefore: if you do not get additional business value out of Composite WPF and if you are happy with CAB/SCSF in your solution, why should you take the effort of migrating to it!? Then you don't need to... some good reasons to migrate might be:
- native WPF implementation that leverages the base classes of WPF such as its existing command mechanisms etc.
- more lightweight - Composite WPF is more lightweight than CAB/SCSF and I had the feeling that it is easier to learn...
- extended flexibility of Composite WPF: you have the choice which features you want to use and which you don't want to. Composite WPF features are independent from others - e.g. you could use the MVP/MVC implementation without being bound to any "Controller" or "WorkItem" base classes or to the dependency injection mechanisms.
- the new Unity framework as an easier-to-use, more lightweight dependency injection framework
- the ability of Composite WPF to use another dependency injection framework such as spring etc.
But these are just some thoughts that went through my head. And again - for me important is that if you don't get any value for YOU out of these advantages then why migrate!? There is no reason for doing so. If you get additional value, then let's go;)
#3: How do components from CAB/SCSF map to Composite WPF?
As far as I have seen, the Composite WPF framework achieves exactly the same goals as CAB on it's own. There is no replacement for SCSF available, so far, and according to Microsoft none is planned for the foreseeable future. The team is in a kind-of gathering customer feedback loop right now;) Okay, but let's map some features from CAB/SCSF to Composite WPF - I assume that you read my paper on CAB/SCSF to fully understand the following table...
| Shell Workspaces | Region Managers |
| Shell UI Extension Sites | none |
| WorkItem class | none or your own ordinary class It's on you whether you want to use "use case controllers" as described in my paper or not. And if, you just create ordinary classes without any attributes or base-class dependencies;) |
WorkItem - Use Case Controller-part | none |
WorkItem - Container-part | Unity Framework and it's container capabilities |
WorkItem - Client Services management | Unity Framework and it's container capabilities |
| Event Broker | Event Aggregator |
| Command Pattern | WPF Commands and/or Composite WPF extensions to WPF commands |
| Dependency Injection | Unity Framework or your own |
| Smart Parts | WPF controls as views |
| Presenter class | none or your own ordinary class It's up to you whether you use MVP/MVC - and if you just implement ordinary classes without any attributes or base class dependencies. |
| ModuleController, ModuleInit | IModule classes |
| ProfileCatalog, ModuleEnumerator/Services | ModuleEnumerator |
As you can see, Composite WPF supports all scenarios but leaves you more "freedom" of whether you want to implement a scenario or not. And also if you implement a scenario you often don't need to inherit from any base class or apply attributes in most cases. That means you can build-up your own hierarchies without running into too many dependencies of the Composite WPF guidance.
#4: The very basic steps to get from CAB/SCSF to Prism
These are some of the first steps I had to complete while migrating the shell and modules from CAB/SCSF to prism. Essentially these where the following:
- Create a new solution for the Composite WPF version of my demo.
- Import the interface libraries from the CAB/SCSF solution to the Composite WPF solution and remove all namespace-, attribute- and base-class references to CAB/SCSF-related classes.
- Re-create the shell as described in the guidance: I have to admit I didn't even try to migrate the shell because many of the concepts are different. But I left my IShellExtensionService interface concept and therefore I was able to hide this pretty heavy change from the modules I migrated later on.
- Add a new class library with some of my own base classes:
(1) A Controller base class with a state-bag to replace WorkItems. This is a simple as possible and I just used it because I used the WorkItem.State property. (2) A presenter base class with a reference to the original work item. - Add the first CAB/SCSF module to my new solution.
- Replace the "ModuleInit" class by a IModule implementation. I even left the ModuleController-concept for simplicity.
- Remove the WorkItemController base class reference in my ModuleController class and replace it by the Controller-base class I created in step 4.1 above.
- Replace CAB-Commands [CommandHandler] by DelegateCommands as used in WPF and WPF composite guidance.
- Replace all WorkItem.Service usages against a Unity Container Service usage.
- UI Extension Site usage must be replaced by my IShellExtensionService concepts as described in my paper as they are not available anymore. Or you create your own IShellService that supports extension of menus etc. in your shell.
- Uncomment CAB/SCSF generated code in the code-besides of the smart parts.
- Remove all attributes in Presenter classes and SmartParts which are specific to CAB/SCSF.
- Replace all WorkItem classes with your own, custom Controller classes that inherit from the Controller-base class I've created in step 4.
- Update the configuration and run the application:))))
I know, that looks heavy, but it took me 1/2 day to migrate the first two modules and the shell from CAB/SCSF to Composite WPF guidance without having played with the new guidance before, at all!!!! So I was a bloody beginner with Composite WPF guidance when I started and it took my just 1/2 day...
I have published the first version of my migration solution where I completed the tasks described above for the first two modules of my last year's TechEd demo.
You can find that download in my previous post.
While this is just a first step I know that I will encounter some additional issues when I have time migrating the remaining parts... so stay tuned on future entries about this story... whereas I am not sure whether I will be able to do this soon:))) because... well... it's vacation time:)))
Cheers
Mario
-
This is the first part of the sample from last year's TechEd Europe 2007 Developers where I started migration from CAB/SCSF to Composite WPF Guidance / Prism for a customer workshop a few weeks ago. I will post a separate, longer article on the thoughts behind the migration in a minute...
You can find the download here...
stay tuned...
Mario
-
Thanks to Jim Wooley I have to extend what I wrote about my LINQ-Architecture thoughts before. Actually LINQ to SQL supports putting the OR-Mapping definitions into a separate XML file instead of having the mapping meta data applied as attributes on your classes and properties. Just take a look at the following blog-entry:
http://www.thinqlinq.com/Default/LINQ-to-SQL-support-for-POCO.aspx
It describes how-to put the OR-Mapping meta data into a separate XML file.
Nevertheless the mapping-mechanisms of LINQ-to-SQL are much simpler compared to full-blown OR-Mapping frameworks such as the ADO.NET entity framework. And still I believe that the performance of simpler mapping mechanisms will be higher, of course. So the fact that this is possible does not really change anything to my recommendations in terms of deciding which DB technology to use when;)
Anyway, thanks to Jim who pointed me to the link above. It's pretty cool that LINQ-to-SQL also supports a more "generic" mapping approach even for the small-to-medium sized applications.
-
Two weeks ago I did an MSDN Briefing about Windows Communication Foundation. While we are still post-processing the recording for this briefing we wanted to make the downloads available, earlier. Here you can find the material from the briefing:
Click here to download the slides.
Click here to download the demos.
If you have any questions feel free in getting back to me.
-
While preparing the workshop and discussing the variety of LINQ technologies in the aforementioned workshop I really started thinking of when to use which technology in the big landscape of data access possibilities on the Microsoft platform. Summarizing the technologies we have there you see the following now:
| Technology | Available since |
| ADO.NET Command, DataReader | .NET 1.x / 2.0 |
| ADO.NET DataSets, DataTables | .NET 1.x / 2.0 |
| ASP.NET Data Source Controls | .NET 2.0 |
| Windows Forms Data Source Controls | .NET 2.0 |
| LINQ Foundation | .NET 3.5 |
| LINQ to DataSet | .NET 3.5 |
| LINQ to SQL | .NET 3.5 |
| LINQ to XML | .NET 3.5 |
| ADO.NET Entity Framework | .NET 3.5 SP1 |
| LINQ to Entities | .NET 3.5 SP1 |
| Dynamic Web Data Forms | .NET 3.5 SP1 |
| ADO.NET Data Services | .NET 3.5 SP1 |
Lots of technologies and that of course fires up the question of what to use when!? I tried to think a bit about it and came up with the following conclusion as my personal opinion.

I think you should base your decision based on two factors: how fast do you need to be (Developer Productivity axis) and how are your requirements in terms of maintainability/flexibility and performance. Having that said I see the world as follows:
- If you need high performance in an enterprise-level application that is NOT a prototype I would prefer manually coded data access layers going to the DB directly through commands and data readers. It's still the fastest thing but you need to code it manually.
- LINQ to SQL combines performance with productivity as it includes designer support. The OR Mapping in LINQ to SQL happens via .NET attributes applied to your classes. That is tightly coupled to the database and less flexible than complete OR mappers. But as the mapping layer is "coded" it's still faster than OR framework. So its in between of these worlds and still has a really good performance.
- If flexibility and maintainability is the major thing and you want to have your object models strongly de-coupled from your database, then OR-Mappers such as the ADO.NET Entity Framework and LINQ to entities (adding even more productivity to it) are the way to go.
- For Rapid Prototypes that you want to use for demonstrating value to customers to prepare larger projects or that are not going to be used in a long-term fashion in your company you can use Dynamic Data Forms shipping with .NET 3.5 SP1 or the classic SqlDataSource stuff we've introduced with .NET 2.0.
I haven't added LINQ Foundation and LINQ to XML to this diagram as I think you can use them everywhere you want incl. LINQ to objects;) I also have not added LINQ to DataSets as I rather see this as a migration scenario to migration slowly form DataSets to these new technologies.
Based on what I've written above to simplify the decision of which technology to use when I would update my diagram as follows:

I hope these thoughts help you for your future decision on which data access technology to use when. As mentioned these are my personal thoughts and not an official opinion of Microsoft in any way;)
Cheers
Mario