Alignment: Chaotic Java

Tuesday, December 20, 2005

XML to POJOs Advantages - Repeating Types

One of the things I totally forgot mentioning as a major improvement of X2J over XSDs is the most trivial thing: Not having to write complex documents to describe something already natural to you: Defining a class and reusing it over and over again on your other classes.

Maintenence is another obvious issue. Instead of having one huge file to describe all your classes, they are separated over a lot of files. Revolutionary concept, I say! It always felt awkward to me that having an XSD felt a bit like going back to the stone age of programming, having everything defined together in one place, barely readable, hardly reusable.

In X2J however, you'd have your own classes, written in different files (of course!), defining their own validation rules and connecting to one another however they want!

No more thoughts such as "Will I need to reuse this data structure, so I should define it inline or not?", no more silent swearing when you realise you defined it as an inline data structure while it's needed elsewhere!

Related Topics
XML to POJOs project is in the air
Possible advantages of X2J: Primary Keys
Interesting Topics
Time to make a difference in your Java
Reflecting on Generics


Post a Comment

Links to this post:

Create a Link

<< Home