|
From: Martin K. <ma...@o-...> - 2006-05-29 06:04:25
|
Hello Spring developers! I'm well impressed with Spring 2.0, not least with the support you now have for incorporating scripting languages. It opens up the possibility of mixing and matching languages within the framework, which is very nice indeed. Since I work on a specialised language project myself, I decided to try writing up the necessary Spring adaptors to support it. It turned out to be quite easy, I simply followed the example of the JRubyScriptFactory and JRubyScriptUtils. The result is that I can create o:XML [1] beans, pass them any type of Java object as function arguments and receive Java objects back. Sweet. The adaptor automatically translates between DOM and the o:XML native (first-class) XML objects. It also converts between primary o:XML and Java types, while all other Java classes can still be used seamlessly in o:XML. o:XML beans could be useful for most any type of XML processing, whether it involves generating, transforming or extracting data (o:XML has builtin XPath and regex, plus full OO, exceptions etc). The support might also be interesting for achieving efficient XML to RDBMS mapping, which is another thing that o:XML does quite well (more info on the website, below). So, I've got the adaptors and tests all ready, would you like them as a patch against Spring CVS? Where do I send it to? On second thoughts it can't be a diff, since the files are in new directories - zipfile anyone? There's some (very basic) examples included with the tests. Maybe, once you've tried it out, you'll want to consider including it with Spring! best regards, /m ps I'm not on the list so please cc me in on any replies. [1] http://www.o-xml.org/ |