This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: Angle brackets considered evil :)
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
I was asked what I thought about the entry (and many other comments) Getting rid of XML with Groovy and Janino.
Is
<site fallbackid="ELEMENT4">
<globalexit name="globalexit1" destid="ELEMENT6"/>
<globalexit name="globalexit2" destid="SUBSITE.ELEMENT2"/>
...
intrinsically worse than
processor.site(fallbackid:"ELEMENT4") {
globalexit(name:"globalexit1", destid:"ELEMENT6")
globalexit(name:"globalexit2", destid:"SUBSITE.ELEMENT2")
I don't think so. As I have said before, I have nothing against angle brackets themselves. It has been how they were weilded.
What would make me want to have this config be in Groovy versus XML would be if I needed to do some real logic.
E.g. grab some info from a db, loop through it creating nodes.
The power isn't in how it looks, it is in the fact that you can do normal programming tasks within your configuration area itself!
Give XML a break :)