On Saturday, August 16, 2003, at 10:50 am, Jason Dillon wrote:
Am not sure if the Factory thing is required to instantiate new beans - I hope there can be a default constructor on the bean implementations so that they really are normal beans. Though the nice thing about the Factory approach is you can just use the generated interfaces in your code & not refer to the implementation classes directly.

It looks like the factories are the bridge between the interfaces and the impls, the impls need some schema fluff passed in during construction.

Agreed. It'd be trivial to change the code generator to generate a default constructor for the implementation classes.



If so, are there any problems which might arise from doing so?

Not that I'm aware of.

I still have a few concerns. First you mentioned the usage of xpath, when constructing an object with out xml will code that expects xpath stuff still function? Same goes for code what expects the raw xml to still be accessible?

Yes.


Second, it looks like XMLBeans requires XML libs to function, even if XML is not used.

Its dependent on xmlbeans.jar yes. It doesn't mean you need to use an XML file though.



Consider an embedded server which does not use XML at all... looks like we must still provide XML libraries.

xmlbeans.jar yes. So far this is the only downside of using it I've seen so far.


However the point of these beans is to act as the POJO API for working with the XML config files. So I don't see much value in using the beans without the XML config files. So I don't see this extra-jar dependency as a big issue. Even if you were not using an XML config file, the XPath & XSD validation is extremely useful too.

James
-------
http://radio.weblogs.com/0112098/



Reply via email to