pmuellr is Patrick Mueller, Senior Node Engineer at NodeSource.

other pmuellr thangs: home page, twitter, flickr, github

Wednesday, February 22, 2006

XML Data Binding

With glee I read Tim Bray's WS-Angst post today. I really love to hate WS-*. Tim's post is chock full of great references, and a lot of those references have great references as well.

So one of the posts was complaining about xsd, and of course, what's not to complain about, but the poster said something about how XML-RPC was so much easier. hmmm ... I hadn't looked at XML-RPC in a while, thought I should take another look.

So I google it, and get here pretty quickly. The 'spec'. ummm, really? All these random references to it I've run across over the years, and that's it? I dunno, seems like unneccessarily wordy XML to me. At least there's no namespaces.

I've started a little effort to come up with a way to define an XML language that can be easily mapped into any programming language. An XML to programming language binding. Not related in any way to RPC, REST, etc. I think it's important to have a nice binding layer first; we aren't always sending crap over the wire. Figuring out how to do RPC with it is a later issue (although to be honest, that's actually simpler than the data binding; the SOAP element is 1/2 of it, defining a 'function call' in the request payload is the other 1/2). It's not rich; it's obviously not going to support every programming language feature known to man; nor will it support every variation of things you might want to do in XML. A Simple XML Schema language that generates easy to read and write XML, and can easily be mapped to any rational programming language available. It struck me as odd that there doesn't really exist such a beast, and it doesn't seem hard to create one, so I thought I'd get off my ass and do something interesting for a change.

On a somewhat related note, as I'm an IBMer, and a programmer, I'm of course forced to deal with EMF at work. It certainly seems like EMF's ECore would be a decent way to do this sort of thing, but it's actually more complicated than it needs to be; for example, I don't think in terms of a 'feature' aka attribute aka property aka instance variable being a fixed range of 'sizes', as you can do in EMF (you can define a feature saying it must have at least X items and at most Y items). I just think in terms of - it's a thing, or it's an open-ended list of things. Richer definitions of cardinality are kind of pointless. Or perhaps a way of expressing semantics, instead of syntax. Let's solve the syntax issue first, and layer semantics on top of that (if ever).

No comments: