Tuesday, September 2, 2008

3 Lessons from WAX

There is a new JNB article over on my employer's site. The topic this month is a new API for writing large XML documents: WAX. Here are 3 lessons I've learned from the article.

1. Research, Build, Contribute

Mark ran into a real world problem (an OutOfMemoryError when writing a large XML doc), then surveyed the landscape for a solution. Not satisified with the answers, he wrote his own solution and shared his findings with the world. Classic stuff.

2. Use Interfaces to Communicate Intent

The article mentions, as an aside, a clever idea by Brian Gilstrap: the use of interfaces to restrict the usage of the WAX API. For example, one may not call the attr method after using the text method. Brian's idea creates support for a DSL, of sorts, in a static language: it hits a sweetspot that provides compile time support and yet does not use a full-blown parser or dynamic-language DSL.

3. Have Fun

Well, check out the introduction video and see for yourself. I *heart* absurdity !

1 comment:

  1. Now we know what Mark is going to wear trick-or-treating this year.

    ReplyDelete