Saturday, March 25, 2006

Dynamically dealing with document-centric SOA

I was reading the following bit from Neal Ford, echoing an idea I've been wrestling with for a while. The amount of XML that is getting shoved around (and the knowledge that if it is in format versions n today, it will be in format n+1 at some point in the future) really points to the advantages of using dynamically typed languages for dealing with what you are going to be getting tomorrow. It also makes you think about how "genius" enterprise XML validation services are....

Of course, statically typed languages can always use hash maps or reflection to deal with missing stuff, but at that point you are going outside compiler checking anyway. In some sense, writing Java or C# code that is primarily using hashes and reflection is equivalent to writing dynamically typed code, with a more limited set of tools than a dynamically typed language would provide. This would probably make more sense with an example, which I'll be digging through my repository for shortly...

Neal Ford: Dynamic Typing in the Strangest Places: "I was talking about how document centric messaging in SOA avoids endpoint versioning headaches. Later in the weekend, I was talking about the flexibility afforded by dynamic languages and their loose typing. Then, it occurred to me: SOA and the document centric approach is really just another version of dynamic or loose typing. If you free the plumbing from having to know what types you are passing (in this case, just a blob of XML), you create a more flexible system, able to withstand changes more gracefully. Just like with dynamic languages."

0 comments: