(... extract from “.NET Enterprise Solutions ... Interoperability for the Connoisseur” book which us currently under final construction...)
Once we have defined all of our contracts (syntactic and semantic), one either starts creating the XML and WSDL definitions and then generates code, commonly known as contract first, or create the contract WSDL from code.
The three options are:
- Contract first, which requires a good understanding of XML and WSDL. With this recommended option code is generated after the contract has been fully defined. However, current tools are not fully integrated with integrated development environments and the world of XML is error prone.
- Code first, which means that first step, is to create the solution interface code and thereafter generate the contract definitions, i.e. WSDL, from the code.
- Hybrid approach, uses tools such as schema editors to create the error prone XML, interfaces are implemented generating code and finally, as with code first, we generate the WSDL from the code base.
Which is the correct option is a lengthy debate and it has been decided to mark the selection topic out of scope, to be discussed and debated at some other time. Probably the correct answer is actually that it depends largely on the organisation, its preferences and the levels of XML skills within the development team.
Without contracts the consumers would have a tough time understanding what they can do with a set of services. It is important to ensure that:
§ Contracts remain explicit and that the consumer makes no assumptions, ever
§ Contracts are designed to last
§ Contracts are flexible, well documented and intuitive
§ Contracts must have a meaning … if you cannot name it is not worth a contract
http://dotnet.org.za/willy/gallery/image/2323.aspx
Figure 68 - Software Factories Vision
Software Product Lines (SPL), Software Factories, Guidance Automation Toolkit (GAT) and Domain Specific Languages will improve the design time environment for analysts, designers and developers. Unfortunately these technologies are still in their early stages and standards are only just being defined. Until the concrete slate has settled and solidified, the technologies are merely a vision of what might evolve with today’s and tomorrow’s design and development environment.
Beat Schwegler, however, demonstrated a glimpse of hope with the contract first concept at the recent SOA event ... register to his blog on http://blogs.msdn.com/beatsch/rss.aspx for more information.