Eric's Blog

Day to day experience in .NET
Welcome to Blogs @ IRM Sign in | Join | Help
 Search

Disclaimer

The content of this site is my own personal opinion and does not in any way represent my employer, it's subsideries or affiliates. These postings are provided "AS IS" with no warranties, and confer no rights.

This Blog

TechEd: Service Factory V3

First of all, the service factory version 3 will be released any minute now. I've just listen to Don Smith from pattern & practices and he hopes that he got the sign of on the bits by now so that he can release version 3 after this session.
Version 3 main goal is to enable model driven creation of services, but it also wanted to enable the possibility to design the services without deciding if should be a WCF or ASMX service, and to enable round tripping that was missing in version 2. The software factory now should be a lot easier to extend.
There are three types of models; the service model, the data contract model and the host model. Even thought the naming aligns with WCF you don't do any decision about using WCF or ASMX yet. The data contract designer is used to define the reusable assets that should be used for different messages. The messages and the operations is defined in the service model. On the models you then set which implementation technology (WCF, ASMX, or your own) you want to use, and setting WCF, then enables new settings that are related to the implementation technology, like choosing the DataContractSerializer.
The next step is to add an implementation project and doing so will add a structure that looks a lot like the version 2 software factory for WCF (since WCF was choosed as implementation technology). After the implementation project was added it is possible to right click on a shape on a model or on the model itself and choose to generate code.
One important thing to notice about version 3 is that it requires you to use message contracts. Many times this is not the case when using version 2, since many listened to the Connected System divisions advice to only use message contracts when needing to have custom soap headers. The pattern & practices team though advices you to use message contracts, because that will allow you to be more flexible in adding more data contracts for newer versions of your service. To enable version 3 to use data contracts instead of message contracts, then you will be required to rebuild the software factory.
They have enabled to extend or modify the service factory without rebuilding the factory for "Modify text templates", "Add new policy properties", "Add new model validation rules", "Add new technology extensions or properties", "Add new solution templates", "Add new code generation strategies" and "Add new GAX recipes". For mode advanced stuff you will still need to rebuild the factory but this process should also been eased.
When creating extensions for customizing the software factory, this assemblies should be deployed in the Lib folder of the software factory, because the assemblies that are deployed here will be loaded. One sample extension that they showed was enabling declarative security for the WCF service, which added new references to the project and it also added code to the code file. To enable this they modified the T4 text template and in this case created a custom policy class. The declarative security policy sample is based on Juval Löwy's MSDN article in the august number. When we have used the version 2 of the software factory, we have always modified the factory, which was very possible because we got the code, but it always was a bit of painful. Without having had any chance to lab with it yet, this new extension points looks very promising a would probably often have saved us from rebuilding the software factory. This is a important thing since this would make it easier to move on when the next version arrives.
This version of the software factory are only for VS 2005, but in February 2008, probably earlier a version that works with VS 2008 will also be available. The GAX infrastructure will be implemented in Visual Studio Team System code name "Rosario", which means that in the future the web service software factory will still be free, but require the Team System edition of Visual Studio. Other things related to this that will come in the future is guidance on Workflow Services, Service Manageability, the Microsoft ESB guidance will be released any day now and Don also declared that he is a big fan of Microsoft Managed Services Engine that I blogged about the other day.
Published den 7 november 2007 11:59 by ericqu

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems