Sunday, March 15, 2009

J2EE and XML Development

Description : Java and XML have a great synergy, they marry together to create a "Write once, run anywhere" with a "platform independent data" paradigm. The nice thing about this is that you can keep the service interface relatively stable (e.g. use XML document instead of a specific data structure). But often what people overlook is, if you choose not to expose/distribute your data model directly (using classic data structure/class), then you have to expose/distribute the meta data of the data model (in XML world, this is called schema). Once the schema is changed (as you change in the data structure/class), you are pretty much facing the same problem as in the classic data model, the communicating parties have to know what is changed and change (the parsing rule at least) accordingly. Particularly, in the internal system, the benefit of using XML interface is dramatically reduced. The authors of book are trying to push every data model in the interface by using XML document, even the data persistence, along with various X-technologies. That is a very "dangerous mind" if not done carefully, since XML is not a panacea in design and development. Even in modeling data, XML is not one size fit all. So when is it a good idea to use XML for your data? The following is that I quoted from Ted Neward's blog,
When your data is naturally hierarchical to begin with
When exchange with foreign platforms (which is to say, platforms not native to what you're currently authoring in) is important
When pre-existing tool support (XSLT, XML viewers, import/export utilities, etc) is of paramount importance, As you can see, there are some constraints before you decide to go with XML. Not mentioning the performance overhead. Though authors mentioned that designers need to justify the usage of XML by various criteria, but this is a book about promoting XML. :) Don't be trapped.Overall, the book contains some useful information about various XML related technologies, particularly the chapter 5 "User Interface Development" (which is quite funny for a server side development book). And the information is too general or shallow to be useful in the real world development, you need to dig more into the technology by yourself from this introduction.There are some examples showing how the concept could be working in the real world. But they are very rudimentary. Some specs the authors used (e.g. JAX-RPC) are already upgraded or changed. As a book on such popular topics regarding J2EE and XML, it sets the bar too low.
Publisher Manning Publications Company
Author(s) David Weiss
ISBN 1930110308
Release Date 30 November 1999
DOWNLOAD

No comments:

Post a Comment