The last time I looked at webwork 2 was a couple of years ago. At the time it was a half assed toy churned out mostly for the entertainment value of it, with little to no real direction, and a lot of pointless rubbish that some author or the other thought would be neat.
So, sensibly, I assume that two years of mass adoption would drag webwork 2 kicking and screaming into maturity. It’d have to cater for real people, people who aren’t necessarily sexually aroused by cvs -q -z 3 update -dP.
Of course, being of the easily aroused variety, and an eternal optimist, that’s the route I go down (after quickly giving up on the binary download), figuring that hey, I know webwork 1 inside out, how hard can this be? I even play the newbie, and decide to do it the brainless way and follow the docs/tutorial/getting started guide.
Therein perhaps lies my fatal mistake. That innocent decision led to webwork 2 being rejected yet again for yet another project. I can honestly say that out of all the halfassed opensores projects out there, I have never, ever seen such misleading documentation. It makes one long for strachanesque documentation, where some weirdo northerner (UK) with a goatee sharts all over a page for about 20 seconds and calls it documentation, then moves on to the next shiny bauble.
The documentation seems malevolent in its deception. This cannot possibly be a freak accident of nature, someone out there is out defacing these wiki pages, ensuring that the hapless user is molested (bad molest, not good molest) in as many ways as physically possible. The mess starts off with the dependencies description. Clearly, someone has wisely thought that it’d be great to enumerate the dependencies, and clearly label them optional or required. Sadly, the first thing that happens is that you’re sent to some autogenerated ivy oh-no-shit-just-splattered-on-my-screen kinda page. If you’re lucky enough to puzzle this out, you’ll end up with an alleged list of six or so jars required. So far so good. So you foolishly keep reading down the getting started page, and get to the web.xml sample. Hrm, this seems to mention a springframework listener. Now if I know my jars, I’d guess that this is some sort of spring*.jar. Needless to say, there is no mention of this in any of the dependencies. Excellent. The filter is also mapped to /*, which is rather excessive. Of course, later on in the page we’re told that in fact it’s mapped to *.action only. The mind boggles.
Next I’m told to create an xwork.xml, alright then, created. Then I’m shown an xml snippet showing an action declaration. Lovely, the only question, where in god’s name does the thing go? There’s no hint anywhere of where this xml element fits in, nor the following result element.
The language on the page is par for the course; mostly consisting of surprising and perplexing sentence structure, with the occasional sentence where the author was clearly thinking ‘waaamaaaaameeeeeeflubplopchkchkchk’. Hilarious examples include:
Especially the example in this section should be helpful to seasoned Java developers with previous experience in MVC frameworks. Especially? Especially what? Hello?
WebWork will take notice since the URI ends in .action. Take notice eh, what a sharp eyed little library.
…and redirect us accordingly. Us? There is no us my friend, we’re not on this journey together, you illiterate turdburglar (not to mention that we seem to have suddenly switched from the third person to….’us’)
All of these are on a single page. Still, I know roughly what I need to do. I litter my lib with jar droppings, I knock up an action and simple hello.jsp view, and fire up my poor abused container.
Much to my horror and display, I am confronted with a jbossian output of staggering proportions. Apparently, all those optional jars are only optional if you happen to not mind six or seven pages of stacktraces on startup. I suppose an old fashioned warning about not enabling support for crapfest X would be too helpful and non-invasive. Looking through the code reveals that sneaky old trick of logging an exception, then throwing it up. It’s almost as bad as hibernate in fact. I am endlessly amazed at how people who really aren’t that dimwitted manage to fuck up logging time and time again. You’re a library, for fuck’s sake. Someone is CALLING you, if you throw exceptions, they’ll deal with it, they’ll log it, they’ll print it out and cram it up their ass if they so choose, it’s their problem. DONT LOG AND THROW.
Eventually I do get to try to access my action, and I’m regaled with an exception, of course. The error? You’d never guess! It’s….something to do with velocity. Yes, the now deprecated view that isn’t supported anymore.
Of course, there are other irritants, like the fact that running ant to build webwork seems to get stuck for a few days in the ivy process. To keep things spicy, it also will sporadically crap out during a download, forcing you to kill ant and try again.
I suppose nobody sees the irony of merging with Struts (or at least, half of Struts, since Craig McWawafoofooploppyhan has stolen half); WebWork seems to have slowly limped its way into unusability and a certain ‘hi developer, open wide so I can enter somewhere god intended to be strictly one way’ lifestyle. Thus, a merge with the original crapfest that started them all is quite apt.
I can’t help but feel bitterly disappointed. I’m sure that once all these hurdles are overcome, webwork can’t possibly be that bad to use. It has a lively community and a reasonable set of developers. It’s just so sad and pitiful seeing it lack polish, even after all these years. No wonder the RoR fanboys are busy circlejerking themselves into an alternate state of being; almost anything else, even by pure accident, will be less painful and more enjoyable.