Thursday, April 21, 2005

Using XML as domain (model) objects

Just an idea!

I have seen many system implemented using bean-like domain objects. Then they're transformed to XML for use in a web service or when rendered using XSLT or even during some sort of import/export mechanism....

Why not write your domain model using XML Schema's and generate the actual "bean" classes using XMLBeans or alike (JAXB, Castor)? So you still have your beans classes, its easily transformed to and from XML all you need is have some sort of persistence working underneath the objects.. Im not quite sure Hibernate will do the trick, but a XML database seems like a good choice..

Well - just a spawn of my brain, overheated by too much caffeine...


Post a Comment

<< Home