Swing built from XML ..... concerns!!! PLEASE HELP!!
Hi,
I just had an interview for a Swing position, where EVERYTHING they do in Swing, including the outer JFrame is declared through XML files.
Now, when you first think about it, it seems like an OK idea. If you have some type of form then you can represent that in XML, get it sent from the backend and have some Swing engine, build up the Swing components for the user to see, have some nice textfields, buttons etc.
But..... the more I think about it the more I think that having EVERYTHING represented in XML is, well, a tad ridiculous and kills off the flexibility of Swing.
If I have a form with a few fields and a button, then OK, the XML is going to be pretty straight forward.
But.... if say I wanted a table, with custom rendering, custom editing, calendar pop-up for date editing, row adding, deleting, table sorting etc etc.. my XML file is going to look absolutely ridiculous. How do you code the logic for component listeners? what about drag and drop? event thread issues?
I'm sure there is some cripplingly painful way of doing all this in XML, but what's wrong with just coding it in Java? You lose compile time errors, rafactoring and all the nice things you get out of a good IDE.
I think it's pointless. But that's just me.
Any thoughts?
~O.

