Skip to content

XAware Community

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
XAware 5.6
Need Help
Webinars and Events
Advanced Tutorials
Webinars and Events

You are here: Home arrow Blogs

xml schemadata source firstdata sourcecontract first 22 Sep 2008 6:18 AM
Service Contract Design Strategies by kvandersluis

A key design principle for a Service Oriented Architecture (SOA) is the definition of a service contract.  The contract clearly specifies the technical interface a client uses to invoke each service operation, as well as the expected behavior of the service.  The contract is independent of the underlying implementation, so users of theservice don’t need to care about implementation details and are shielded from its changes over time.  Implementers of the service benefit, too, as they have broad flexibility in determining the implementation strategy, and can fine-tune the implementation over time.


When designing data services, there are two main strategies for service design: contract-first service design and data source-first service design.  Contract-first design is very much a top-down design strategy, while data source-first design is bottom-up.  In contract-first service design, the technical interface is clearly defined first, using XML Schema to define the information flowing across the interface.  The information objects defined by the XML schema, which are the primary subjects of these services, are often custom-designed, but sometimes they are drawn from industry standard schemas.  If you work within an industry with a commonly used industry XML schema, chances are good that schema contains many definitions you can reuse for your own data services.


Data source-first design often fits the mental model of a data-oriented developer or architect who is intimately familiar with the physical data sources.  In this scenario, the emphasis is more on exposing the data as is, combining data from multiple sources as necessary.  The design process here follows a trail of building low level components, then selecting a set of them, and combining them together into a composite which is then exposed as a service.  The final technical interface is a composite of many lower level components.  The contract is simply derived as a result of the composition work.  Some caution is warranted with this approach, as the resulting interface is essentially hard-wired into the back-end systems, making interfaces brittle in the face of change to data sources or client needs.  The benefit to this approach is that it leads to extremely quick service implementations, and fits the mental model of many of those charged with implementing data services.  Areas of development where many fine-grained services are required will benefit from these approaches.


XAware supports both contract first and data source first service development.  For contract first development, the XML Schema is the starting point for service development.  In the design environment, you select the XML Schema file, and apply an operation to make a BizDocument from that file.  A wizard lets you select the element representing the information object flowing into and out of the service.  Then, the normal development cycle proceeds, where the user selects a section of XML, maps that to a back end data source, then moves on to another section, mapping that to another data source.


For data source-first development, the BizDocument wizard lets you create a new BizDocument while designating the type of data source (file, SQL, SOAP, etc).  The wizard for the selected data source lets you access the data and convert it to XML consistent with the format of the raw data.  For example, the columns selected from a database are converted to XML elements whose names are identical to the column names.


You can view flash tutorials specific to each design strategy.  These tutorials are available here: .

Comments (0)add comment

Write comment
You must be logged in to a comment. Please register if you do not have an account yet.


Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
Free Training
QuickStart Packages
Image 4 Title
Image 5 Title


Which data source and BizComponent combinations do you most frequently use?


Recent Entries