The Artima Developer Community
Sponsored Link

Java Buzz Forum
When is Groovy (or something like it) better than XML?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
When is Groovy (or something like it) better than XML? Posted: May 16, 2004 5:29 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: When is Groovy (or something like it) better than XML?
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
Mike has written his first bile (although a bit more tame than Hani): Groovy scripting madness - don't get fooled! There certainly seem to be a lot of blog entries on how XML is suddenly evil, and that we need to move to something else instead. As with everything there are pro's and con's involved here. I like Groovy when... I really like moving away from XML as soon as I need some kind of logic. An obvious example is Ant, and the build.xml file. If you want to do a simple if() test you have to have a target which sets up properties, then have targets with the right depends="" and if="property". What a hack. I much prefer being able to have the power of a real agile language here. I can modularize my build system as much as I want (not just with <import> and co.) I like XML when.... XML isn't suddenly evil. It is often a good choice for a document format. We have lots of tools that can work on it, and if you keep your document fairly simple then you won't be in tears just because it has angle brackets. It *does* go crazy when you look at documents that use 10 namespaces, and especially when people try to write programming languages out of it! So, in the Spring example, I agree with Mike. There isn't enough of a difference for me to care. I don't tear up at the sight of angle brackets, so why do something else. If the requirements change and I need to do some smart things with the xml I have the choice of: a) Writing something that builds the xml file b) Use something like Groovy where it kinda IS the xml file

Read: When is Groovy (or something like it) better than XML?

Topic: DILLWEED Previous Topic   Next Topic Topic: [OT]My brother finally starts blogging

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use