<< Edit Style | Home | IDEA Educational License, $99 >>

Write JavaBeans, Then Piece Them Together with XML

I'm the kind who's sort of slow. You know, when everyone was talking about Web Services, I'm still not done learning CORBA.

So it's no surprise that I went through Don Box's blog entry on 2003-11-04T09:14:15Z about XAML (to ship some time in the future) without too big an reaction:

XAML is just an XML-based way to wire up CLR types - no more no less.

Then at the March NFJS St. Louis Symposium, I heard Bruce Tate talking about the Spring Framework, the core of which is XMLBeanFactory:

Convenience extension of DefaultListableBeanFactory that reads bean definitions from an XML document.

Since:
15 April 2001

Finally this week, while reading some old code, I noticed the use of the java.beans.XMLEncoder and java.beans.XMLDecoder, part of JSR 57: Long-Term Persistence for JavaBeans. They can be used to serialize an already configured set of interrelated JavaBeans into an XML file and reconstitute the JavaBeans from the XML file.

According to this article on Sun's Swing Connection, this technology was demoed at JavaOne '99---in the last millennium!

Now, I'm just wondering, are these three technologies manifestations of the same idea?



Re: Write JavaBeans, Then Piece Them Together with XML

Not really. Spring is an IoC framework - it allows you to define components and relationships between them, it just happens that one of the ways Spring has of doing this is via an XML configuration (you could just as easily code it using Java) - it has nothing to do with persistence (I wrote an article on IoC which covers Spring which gives a brief overview of what it is - see for http://today.java.net/pub/a/today/2004/02/10/ioc.html details). The Persistence for JavaBeans in 1.4 is just that - a way of storing the state of a JavaBean to disk. There were many other examples of people using XML for persistence of JavaBeans (many predate the Swing connection article you point to) and have been many since (XStream to name but one).

Re: Write JavaBeans, Then Piece Them Together with XML

Thanks for the clarification and the pointer, Sam. I will read the article.

Re: Write JavaBeans, Then Piece Them Together with XML

If I'm not mistaken, XAML would be more comparable to XUL.

Add a comment Send a TrackBack