Picture of jgehtland

The View from Hell

  • Posted By Justin Gehtland on April 13, 2006

I was on a client site today, integrating Rails’ Continuous Builder plugin with an existing CruiseControl setup. We’re pumping our own custom test reports out as well as rcov HTML reports, and shoving that all into the Build Artifacts directory. We wanted to make a couple of changes to the standard web pages that CC serves out, just to make the pages more suitable to our project. CruiseControl, being a Java app, uses JSPs for the view. Here’s what I expect to find when I look at a JSP:

A JSP file that contains a mix of Java and static HTML, whose output is a bunch of HTML and maybe a little CSS thrown in for good measure.

Instead, this is what I find:

The CruiseControl JSP starts by slurping up some XML stored elsewhere and feeding it to an XSL stylesheet. The XSL spits out an HTML page, but the HTML has no HTML in it; its just a big JavaScript block. The JavaScript uses DOM manipulation to write out a combination of HTML and CSS. And some more JavaScript. Really. I’m not making this up.

Somewhere along the way, this must have either seemed like a good idea, or this represents the cruft of a hundred generations. But the sum total effect was that I was so intimidated, I couldn’t change the pages even if I had still wanted to. Complexity as Force Field. Shields up, Captain!

Comments
  1. Scott DelapApril 13, 2006 @ 07:49 PM
    I'm scared just reading your blog post and seeing that scary graphic.
  2. Michael KovacsApril 13, 2006 @ 08:51 PM
    This is hot stuff! Now I can reuse that XML file and generate a swing GUI for all my reporting instead of relying on just a webapp for my presentation layer.
  3. ZApril 14, 2006 @ 03:09 AM
    Did you ever looked at http://cocoon.apache.org/2.1/userdocs/concepts/index.html ? I used to use cocoon before starting RoR, and Cocoon still having interesting things.
  4. Frodo LarikApril 14, 2006 @ 12:55 PM
    I've seen something like that before. Let me guess, made by a big company which name is made out of two characters?
  5. Nick MudgeApril 15, 2006 @ 10:53 PM
    That's pretty funny.
  6. FartinMowlerApril 29, 2006 @ 01:00 AM
    ThoughtDoesn'tWorks
  7. Jeffrey FredrickApril 30, 2006 @ 05:00 PM
    Huh. that doesn't look *quite* like the CC reporting app that I know... in particular I'm not sure where that javascript writing out the dom part comes from. Not to say that the reporting app isn't complex, but normally people seemed more put off by the custom tags, and in particular they aren't sure how to make a link to the artifacts directory. I think there's a bit of the cruft of generations going on but I think the original idea is still there, which is to say that the reporting mechanisms (htmlemail, reporting app) are user extensible for totally new types of data by merging that data into the xml log file then adding xsl. I've used that mechanism to good effect at two companies so perhaps I'm a bit biased now... still, if you've some ideas for cleaning up some of the cruft patch submissions are always welcome...
Post a comment