The Four Tenets and Retirement

Don Box's Spoutlet

Syndication

Thanks to Hartmut for pointing out that our own Harry Pierson is discussing retiring “the four tenets of service orientation” that we wrote down back in 2003 - as is John Heintz.

With respect to their retirement status, it ain’t up to me.

MSDN will likely keep the article up forever (you can still read my first MSJ piece from 1995 here). 

As for what “the SOA/Architect community” does, I don’t have much say there either and honestly, I'm not sure how stuff gets done there.

That stated, there are a few misconceptions I saw in the posts that I'd like to address.

First off, we published those tenets simply to be transparent about the principles we were using to define indigo - that is, what were the characteristics of systems and services we expected people would build using indigo. The goal wasn’t to provide any more guidance than “this is what we expect you to do with it” at a pretty abstract level.

Second, Harmut states “WCF Contracts are still CLR-Classes, not Schema or Contract.”  This isn’t quite right. The in-memory representation for WCF contracts is a DOM-ish tree that can be cons’ed up using any number of techniques, not just writing C# interfaces with [ServiceContract] (go look at Sys.SvcModel.Description.ContractDescription if you care to spelunk). ContractDesc is neither CLR reflection data nor WSDL – rather it’s the optimized in-memory rep used throughout our runtime. FWIW, we’re actively investing in other ways to write ContractDescs down (honestly I’m not a big fan of CLR interfaces or WSDL – please God tell me we can do better).

Finally, both Harmut and John Heintz rail (like many of us do) against the [WebMethod]-esque examples that sprout up around pretty much every stack in this space. 

What I’d love to see people do (including but not limited to Harmut, John, and our dearly beloved Tim) is sketch out a concrete example of what they would rather write assuming a “traditional” imperative programming language (static or dynamically typed) – for extra credit assume both CRUD and non-CRUD operations (e.g., show me how you want to write down TransferMoney). 

It’s a very illuminating exercise.


Posted Aug 15 2007, 10:44 PM by don-box

Comments

Mark Seemann wrote re: The Four Tenets and Retirement
on 08-16-2007 2:58 AM
Rather than bash on the attribute-based approach of WCF, I think it's only fair to point out a few advantages:

- It's easy to understand
- It's not very intrusive related to whatever programming style you might prefer. I use TDD for most of my coding, and WCF really enables that technique, since I can typically just ignore those attributes and deal with the objects when I'm unit testing. If you were to take a more traditional object-oriented approach, you'd typically end up with a lot of base classes that you need to inherit from, and to ensure the flexibility that, say, TDD requires, you need to make a lot of your members virtual (with all the security implications of that), so I don't think that's a better option.

Currently, WSDL is still the goal of quite a major chunk of the service work being done today. Even when you don't really need it (like in pure WCF-to-WCF scenarios over, say, named pipes), the declarative and extensible metadata model actually works pretty well.

I totally agree with Aaron Skonnard that contract-first development is the correct approach when it comes to services. The question is then, how you model a service interface?

As far as I understand your question, you ask about how we would want to model a service interface in an imperative language, but I think that this is the wrong question to ask (if I may be so bold). A much more interesting question is how we would wish to model it at all (given no constraints)?

Today, contract-first basically gives you the option of writing the contract in WSDL, but I completely agree that this is an unpleasant experience, and is not likely to gain widespread acceptance.

The funny thing is that WSDL is actually a DSL, so it should be fairly easy to create tooling on top of it - yet I have yet to see good tools for this.

On the WCF stack, we should have a service contract modeling tool (maybe as a Visual Studio designer) which works on top of the WSDL (just as the XSD designer works on top of the XSD).

WCF already contains all the functionality of translating WSDL into a metadata model, so going from there to emitting code should be a breeze, but really, you don't even need to emit code at this point. WSDL IS code, so why not compile it right then and there if that's what you need? This could give you interfaces to implement in .NET without ever having to look at attributes or whatever it is that some people don't like :)

For extra points, include an XML-based annotation language that allows the modeller to specify how to map schemas into WCF types.
Evan wrote re: The Four Tenets and Retirement
on 08-16-2007 10:25 AM
I really wished that decentralized publish/subscribe would poke it's head out in the MS world soon.
Ben Kloosterman wrote re: The Four Tenets and Retirement
on 08-17-2007 7:41 PM
Have to agree on the samples

The biggest problems is people have no experience with SOA so they fall back on remote object tecniques but using an SOA tool like WCF.

Developers are lazy and will generall just continue what has been done . eg the samples show adding 2 numbers to illustrate a point . That sample is copied and methods start.

Then you see all the old RPC SearchBy methods .

Regarding TransferMoney , this has much scope like currency account type , authorised etc .

What we dont want but are seeing is TransferMoneyCheckToSavingAccount , TransferOverseas , etc

Regards,

Ben

Hartmut Wilms wrote re: The Four Tenets and Retirement
on 08-19-2007 9:31 AM
I've responded to the "misconceptions" (I think of them as misunderstandings) you mentioned in your post:

http://www.innoq.com/blog/hw/2007/08/19/the_four_tenets_and_xml_messaging_with_wcf.html

Rereading my post I can think of some arguments against my proposal. However I'll love to respond to them ;-).
Ollie wrote re: The Four Tenets and Retirement
on 08-23-2007 7:00 AM
this was published last week, it has topics based on the four tenets

http://www.microsoft.com/downloads/details.aspx?FamilyID=cb2a8e49-bb3b-49b6-b296-a2dfbbe042d8&displaylang=en

Greg Hoover wrote re: The Four Tenets and Retirement
on 09-06-2007 3:22 PM
One reason we see TransferMoneyCheckToSavingAccount and TransferOverseas instead of TransferMoney is because when we move into the service space we trade polymorphism and other OO-isms we have come to know and love for broader application reach and interoperability. In a word, I want my OO back, only this time WITH interopability.

I also agree that we should be doing contract first with a contract design surface instead of WSDL or C# first.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?