Friday, January 30, 2009

SOA Contract-first Design

I was once questioned "Why should we care about contract-first design? It takes time. Look how quick I can do code-first approach". And let me attempt to answer that. Carefully designed contract-first design lasts years with minimal changes saving time effort and money.
  • If you do not design the contracts between services first, there will be complex integration problems between your services.
  • Existing code was not designed to exposed as services. Therefore operations will be either too fine grained or course grained. If the service interface has too fine grained operations there will too many messages going back and forth. If there was a contract design phase this can be eliminated.If the service has too coarse grained operations, it may not yield the intermediate results will be lost.
  • A good services have independent atomic operations.
If WSDL is what keeping you away from contract first design, well ... now there are free opensource tools that can write the WSDL for you. Carefully design the contract as a Java Interface and use one of these tools to generate the WSDL file. WSDL2Java in Axis2 is one such tool.

1 comment:

Anonymous said...

No need to manipulate WSDL/XSD manually, there's a tool that can do that for your. Take a look at www.cofiq.com!