Saturday, 26 January 2008

Pros and Cons of Ant, Maven, Gant

I've been thinking about java build tools again. My projects have always ended up using ant and wondering about Maven. There's certainly some innovative ideas in Maven, but there's also some things that scare me. It's funny that Maven's reliance on "convention over configuration" easily predates the Ruby on Rails fad, but the latter gets all the credit for inventing it. There's a reason for that. Anyway, the new kid on the block is Gant, and the way that it's being used in Grails seems really interesting. Gant is a marriage of groovy with ant, which addresses some of the things that frustrate me about ant. Grails adds usability via the RoR style of simple, standard command line syntax. OK, so here's my pros and cons of Ant, Maven2, and Gant.

First I take a look at the old workhorse...

    Ant
  • Pros
    • Everybody knows it
    • Everybody supports it. Ant tasks exist for everything.
    • Extensible. Writing macros and tasks yourself is easy.
    • Flexible, properties configuration
    • Well documented, even by 3rd party tools
    • Low tech and hackable: no hidden magic or voodoo.
    • Path structures and wildcards are simple, yet powerful
  • Cons
    • Everybody know it, including people who shouldn't touch a build. Ever.
    • No standards - few conventions and idioms. Everybody does it different.
    • Everybody does it different, even from their previous project.
    • XML does not facilitate reuse.
    • Limited expressiveness. I have to use ant-contrib to say "if"!?!?! or for <ac:propertycopy name="username" from="db.${db.server}.username">
    • XML Sprawl. As XML goes, not that verbose, but nothing is by convention

Then it's chief rival, and the more ambitious alternative...

    Maven 2
  • Pros
    • Standardized build lifecycle
    • Drop-in reuse of build tools
    • Dependency management
    • Internal repositories facilitate enterprise code sharing
    • Archetype concept allows speed starting project by flavor
  • Cons
    • Hierarchical projects clash with Eclipse (Bug 35973 is 3rd overall with 144 votes today.)
    • Extending isn't simple. mojo, schmojo.
    • Many mundane tasks are truly cumbersome.
    • Archetypes are a great idea ruined by horrible syntax. This is why grails doesn't use Maven.
    • Brittle builds. Some say broken by design. I attended a talk once by a maven project guy. His demo didn't work.
    • Repository metadata quality. This is Matt Raible's #1 Complaint. Maintaining transitive dependencies is hard and brittle.
    • Verbose XML syntax in POMs
    • Plugin avialability lags behind Ant
    • Endless downloading of jars. Go to lunch while maven "downloads the internet".
Finally, the newcomer with respect for its elders...
    Gant, Groovy, and/or Grails
  • Pros
    • Ultra-expressiveness of groovy. No more wrestling to do mundane things
    • No more programming in XML.
    • Smooth adoption path: first use ant's groovy task, then AntBuilder in groovy, then Gant, then wrap in a grail-like runner and scaffolding
    • Grails scaffolding is simple, powerful, and immediately useful.
    • Leverage the ubiquity of 3rd party ant tasks. Steal the best part of Rails but backed by ant's mountain of 3rd party tasks
    • Build logic expressed in groovy classes should facilitate reuse
  • Cons
    • Very young technology
    • Groovy is just starting to penetrate the masses. Gant still largely unknown.
    • Ok, I admit the only grails-like runner is Grails for now
    • Documentation is poor. Really poor.
    • Tooling is weak. IDE's don't support Gant or Grails style lauchers
    • No standard build lifecycle if you use ant+groovy or gant without grails
Posted by spout at 2:11 AM in stuff about java

Monday, 21 January 2008

Java on the Decline? Think Again

It seems that everywhere I look people are taking pot shots at Java, declaring it passe and acting like it's on it's death bed. What a nice thing it is to see unbiased measurement of language popularity from Tiobe. That link is to the January 2008 Programming Community Index.

Here's what their unbiased measurements actually show:

  • Java is the most popular language, capturing 20.8% of the popularity
  • That lead increased over second place C (now at 13.9%) by 3.6% over a year ago
  • Java's absolute popularity increased from a year ago by 1.7%
  • Ruby's popularity is 2.3% ranking it 11th
  • Python was the biggest gainer over the last year, growing 2.0%, giving it 6th place
  • Python overtook long time rival Perl for the first time this year
  • Visual Basic (now 3rd) was the second biggest gainer, Java was 3rd
  • Ruby's popularity actually fell 0.17% over the last year
  • Perl, ranking 7th, is still more than twice as popular that Ruby
  • C lost the most ground at -1.89%
  • C++ lost the second most ground at -1.7%
  • C++ fell to 5th, as it was overtaken by both Visual Basic and PHP
  • PHP gained 1.25% in popularity over the year
  • Java is more popular than VB and C# combined (aka .net) which total 15.7%
  • Delphi at 3.3% surged ahead of both Javascript and Ruby.
  • Lua ranks 16th, up from 46th
  • Groovy ranks 31st
If these numbers surprise you, maybe you need to be more skeptical when you read blogs.

Technorati Tags:

Posted by spout at 1:04 AM in the internet, web, web 2.0 and beyond
« January »
SunMonTueWedThuFriSat
  12345
6789101112
13141516171819
20212223242526
2728293031