Thursday, November 5, 2009

Why Contract-First? Part 1

Contract first admits you taking control over your domain artefacts. It also loosely couples the external view from the internal implementation logic(black boxing). Just as a remainder, this doesn't mean you should build a big design upfront(BDUF).

When it comes to primitive SOA e.g. building services, the basic building blocks are schemas and service contracts. In technical terms it translates to xsd's and wsdl's.

Whats needed:
*Definition of the term endpoint -> ABC(adress, binding, contract). The adress specifies an url for the endpoint, the binding defines the concrete part(actual protocol) and the contract defines the abstract parts(messages and interface operations).
*Good understanding of wsdl and xsd

Why?
+Take control over your domain - think about your domain elements
+Better support for enterprise transformation - strategic thinking
+Let the clients have their contracts early delivered, work separately(loosely coupled, no implementation at this phase)
+Higher interoperability
+Artefacts usable in biztalk ports mapping system specific format to canonical format
+You can ignore horrific Microsoft-wizards
+Reusability for shared datatypes
+No vendor lock-in

-Learning curve
-Tooling support

How-to? step-by-step
1.Identify strategies for versioning and namespaces of schemas/endpoints, e.g. "http://YourCompany/Customer/Email/v1"
2.Create reusable datatypes









3.Create messages










4.Create operations
5.Compose endpoints











6.Governance(security, policy)

Code showing contract first!

No comments:

Post a Comment

email: robert.sodergren@gmail.com