InfoQ

News

How Relevant Is Contract First Development Using Angle Brackets?

Posted by Dilip Krishnan on Jul 09, 2009

Community
.NET,
SOA
Topics
Design
Tags
WSDL ,
WCF ,
WS-I ,
Contract First Development ,
XSD

Christian Weyer of Thinktecture, announced the release of WSCF.blue a Visual Studio Add-in that enables contract first development of web services using WCF.

It has been a long time where I originally built the Web Services Contract First tool...
This tool - briefly called WSCF - (available both as a command line utility and a simple Visual Studio add-in) was targeted at the ASMX platform.

The idea of contract first development has been around for a long time. The need for contract first arises from the need for a canonical representation of the shape of the messages that flow to and from a service in the form of web service requests. Most popular languages support WSDL and XSD based tools and Schema and WSDL based representations of these message “contracts” as a starting point is arguably a sound approach to having an interoperable solutions.

The contract first development style addresses the impedance mismatch between objects and XML. Since Xml Schema language is a richer representation format its easy to model the contracts taking into consideration the differences to pare down the serialization and interoperability problems, some of which include

  • Inability to map certain constructs of the schema language for e.g. XSD type extensions and restrictions.
  • Inability to mapping or at least efficiently map certain object types to schema types for e.g. Generic lists, HashMaps etc.
  • Inability to represent object graphs effectively in XML especially in Parent/Child relationships where the Parent holds the reference to the children and the Child holds a reference back to the parent object.

Some advantages of using this approach are

  • Defining language agnostic contracts promotes interoperability, provided service designers adhere to WS-I interoperability standards
  • Promotes reuse of contract definition artifacts across the enterprise i.e. XSD and WSDL
  • Allows for controlled versioning of services and lends itself to better governance eventually.

WCSF.blue is Visual Studio 2008 add-in is an open source project hosted at CodePlex. The capabilities of the tool as listed include.

  • A WSDL Wizard that allows the developer to step through the creation of a WSDL from one or more XSDs
  • A DataContract generator (similar to XSD.exe, XSDObjectGen.exe and Svcutil.exe) that generates the . NET equivalent of the XSD types
  • A service/endpoint stub (SVC) generator and
  • A client proxy generator.

The tool still has a list of known issues, which will hopefully be ironed out by the time the product comes out of beta. The tool also has a walkthrough from the 0.7 version of the WSCF.classic add-in that is still relevant for the most part. Given that Microsoft WCF supports contracts in code, no angle brackets, XSD or WSDL required, how important is it to have tools that focus on modeling message and service contracts using WSDL and XSD?

WSDL First by Jean-Jacques Dubray Posted Jul 12, 2009 11:17 PM
It's important by Ronny Birkeli Posted Jul 15, 2009 1:41 AM
  1. Back to top

    WSDL First

    Jul 12, 2009 11:17 PM by Jean-Jacques Dubray

    It is actually quite sad that in 2009 the .Net world does not really have a WSDL-first capability nor even understand the difference between Contract First (which WCF suppports) and WSDL-first which it does not. I have used WSCF v0.7 a couple month ago and the code that was generated was broken and needed to be fixed by hand. I am sure it would be easy to fix, but ... wsdl2dotnet would be a great step forward for .Net SOAs.

  2. Back to top

    It's important

    Jul 15, 2009 1:41 AM by Ronny Birkeli

    We're currently working out the data contracts and interfaces of a set of web services. The job is a joint effort between our company and an international partner. We're on .Net, they're on Java. We used XMLSpy to work out and agree on the XSD's and the naming of methods. It's a simple, fast and "technology neutral" way to agree on the contracts without going to deep in code. Even the business people where able to follow ;-) What I feel is important is to have a good and simple methods and tools to take those XSD's and producing my service interface and data contracts. I don't feel I have that within Visual Studio today.

    Another thing is that by "hiding" the XSD's and WSDL's the .Net world is distancing them self from the underlying technology of services which isn't good for anything in the long run.

Educational Content

How HTML5 Web Sockets Interact With Proxy Servers

Peter Lubbers explains in this article how HTML5 Web Sockets interact with proxy servers, and what proxy configuration or updates are needed for the Web Sockets traffic to go through.

Rails in the Large: How Agility Allows Us to Build One Of the World's Biggest Rails Apps

Neal Ford shows what ThoughtWorks learned from scaling Rails development: infrastructure, testing, messaging, optimization, performance.

Stuart Halloway on Clojure and Functional Programming

Stuart Halloway discusses Clojure and functional programing on the JVM in depth, and touches on the uses of a number of other modern JVM languages including JRuby, Groovy, Scala and Haskell.

Oren Teich and Blake Mizerany on Heroku

Oren Teich and Blake Mizerany talk about the technology behind Heroku and the benefits of the new add-on system.

Security for the Services World

Chris Riley presents security issues threatening service based systems, examining security threats, presenting measures to reduce the risks, and mentioning available security frameworks.

Navigating The Rapids:Real-World Lessons in Adopting Agile

This talk investigates technical issues encountered when moving to an Agile process.

Codename "M": Language, Data, and Modeling, Oh My!

Don Box and Amanda Laucher present “M”, a declarative language for building data models, domain models or external DSLs. Don Box's demos show some of M’s features and latest changes of the language.

SOA Manifesto - 4 Months After

It is four months since the SOA manifesto was announced; InfoQ interviewed the original author’s to get insight into the motivations and the process behind the initiative.