Mildly Complex Webapp in 2 Man Months!?

Share the article!

Pointed to by Adrian Spinei to David Heinemeier Hansson who writes that he developed the “mildly complex project management webapp” in 2 man months using Rails framework and Ruby. To top it off, he adds that it includes writing 212 test cases! Its quite a bold claim bordering on the incredulous, but lets take a moment to suspend belief and take a glimpse at how he may have accomplished his feat. From his presentation we find the following design guidelines:

  • Conventions over configuration
    • Almost no configuration files
    • Lots of reflection and qualified guessing
  • Conformity through freebies
    • Magic wiring relies on common structures
  • Best practices by invitation
    • Auto-generated unit and integration test stubs
    • Establish helper structure instead of scriplets

I can only read between the lines here, but the mention of “no configuration files” is most interesting. I am presently working on a Struts, Tiles, JSP, JSTL and Hibernate application and I’m constantly bogged down by the mass of configuration files and configuration-like files that you need to navigate. I seriously doubt I could achieved this midly-complex app in two months.

The immediate impression I get of the traditional java webapp development enviroment is that they’ve practically thrown out the benefits of static typing. So, I’m just thinking, while you’re moving to a weak typing environment with all these configuration files, you might as well go all the way! But wait, a dynamic language is better than weak typing, afterall you still have the benefit of dynamic typing.

Now looking back again at the design philosophy behind Rails, you realize the extent of automation that is happening behind the scenes. It seems to be the most plausible reason I can give for the massive productivity gain. It appears that a lot of introspection is going on to do “qualified guesses”, “magic-wiring” and “auto-generation”. So the trick may be obvious, automate as much as possible using reflection and keep it as uniform as possible by leveraging the language for everything, including configuration.

The Java web framework that comes to mind here is JWAA (from Brad Cox who previously brought you Objective-C):

Applications are networks of page objects that reference other pages via standard object referencing semantics, not with text strings buried in HTML text.

A bit of a different spin, but a java static typed flavored one. Of course, if you want to go to the dynamic end of the spectrum, there’s no better way than using a dynamic language. For example, Helma leverages Javascript (i.e. FESI or Rhino) to the hilt. I’m pretty sure, that as we speak, someone is writing a similar framework using Groovy.

Share the article!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>