Write the code, or define the contract?

I just posted an article which walks through the steps of creating an XML Web Service for CE 6.0 in native code - in the example we build an ATL/COM object (DLL) which contains the functions we want to expose from our web service, we then use a command line tool that ships with CE 6.0 to parse the completed projects IDL file which then generates the WSDL (contract) file. This WSDL file is consumed by Visual Studio when creating a desktop application.

We previewed an implementation of Devices Profile for Web Services (DPWS) running on CE 6.0 at Embedded Systems East (Boston) [and also during the MEDC keynote demos in May] , in this case a developer would start with generating the WSDL (contract) and then use the WSDL to generate the IDL and C++ source files. (If you want to know more about DPWS check out this video on MSDN Channel 9).

So, there are two different approaches to achieve the same end result, an XML contract file and application/DLL source files.

How do you think about the process, are you more of a "Think in Code - generate the contract" or "Think in contract - generate the code" type person?

- Mike