Archive for November, 2005

Web services guest bile

Thursday, November 24th, 2005

Today’s entry is a guest bile courtesy of Mr Clean. The submission was edited slightly to match the high standard of pottymouthed gibberish you’re all used to, so the disruption in style and content should be minimal.

You are a developer, and we want to stab you in the genitalia with a wooden spoon. We never much cared for the nitty-gritty of coding, so instead we represent our company on the W3C, because it’s fun, exciting, and saves us from actually having to use anything in the real world. You know you can trust us, who else would come up with anything as clever as the DOM API? You on the other hand have stuck to menial development, wearing out braces and semicolons on your rubbery keyboards, and for that, we laugh, point, and fling wet bottomburps in your general direction.

You are powerless to stop us. Powerless we say! Your plan to “put a web service in front of it, should be relatively easy, a few days max.” will rank alongside “this is the Titanic, we don’t swerve for icebergs”, and “a short occupation quickly leading to an independent democracy in Iraq with soldiers worrying about candy and flower related injuries”, in the Naivety Hall of Fame.

Let’s start with WSDL - Web Service Duplication Language. The schema says it is the product of IBM and Microsoft, so you will anticipate some typing will be needed. This is confirmed as you navigate from the schema element, to message with it’s parts, to the portType with operations and inputs and outputs, to the binding with it’s own with operations, and inputs, and outputs. “Boy,” you think, “I bet this is really flexible, glad they did not make things more direct!”. All of these have names, and a simple process of trial and error will show you which names have to refer other names, and which are going to end up in the generated Java. If we used the relational constraints features in the schema for WSDL, that would make things too obvious, thus minimising the fun and challenge of the whole endeavour.

Namespaces in XML are good, so more namespaces must be better. WSDL has many, and these can be especially fun when dealing with the output of a WSDL generator or an IDE. Let’s use the same URI for different things, and for the hell of it, let’s confusingly use the same names for messages and suchlike so you’ll never figure out the cardinalities and relationships. XML being human readable is an outdated concept anyway, and a string of gibberish characters is just as good these days. What they lack in coherence they can make up for in verbosity.

Let us turn to the Java aspects and JAX-RPC. Now, what you want to do is bind the entire XML structure to generated Java classes. Yes you do. No really. Binding is the one true path. Any XML Schema can be bound to Java classes, unless the schema does something silly, like use the features of schema to produce a well designed, tight schema. What was the W3C thinking, designing schema for documents, instead of just remote procedure calls? XML for documents? Why would anyone do that?

The schema will be nice and small anyway, because web services are always used for stock tickers. Anything else is out of scope. You have a stock symbol and a price and that can easily be bound to a few small Java classes. An intelligent young gentleman like yourself would not try to use a complicated schema, now would you? What is that you say? “The format and schema to be used are already defined”? Oh, we are in a pickle. Hope that schema is not an industry standard, designed by a committee, where everyone gets a go at putting a feature in. We would not like to work with an object model like that in our Java. It is not like you can write or have already written your own parsing functionality. No, binding is the one true path.

Why the fixation with XML binding? We created the glorious JAXB, and you snivelling runts ignored it. Well, now you will have no choice. You have your business objects, and you have your XML. So naturally what you need is another separate bunch of Java objects, bound to the schema, which you can navigate to copy the data into your business objects. A one megabyte, industry standard, pile of crap schema becomes twenty megabytes of lovely JAXB source. There are lots of
crappy names and packages, and classes for anonymous schema types. Do not ask us for a DOM, you weakly-typed peon. You may however have SOAPElement objects, provided you hack the WSDL in an implementation specific way, and are prepared to deal with old versions of this
bastard child of JAXM called SAAJ, that are completely separate from the normal Java APIs like DOM. Actually, lets then make a new version which does extend all the DOM crap, because we can. Now that we’ve managed to sucker a bunch of you into using JAXB, we’ve identified the idiots for the smart people. We can now go ahead and introduce JAXB2, which is aimed at the less braindamaged of you despicable developers.

Why use old versions of the SOAPElement classes? Well, J2EE 1.4 is a bit new, now isn’t it? So you are stuck on Websphere 5.x or Weblogic 8.1. (not one of the poor peoples app. servers), and there is no J2EE standard for web services in those. So now you get to learn how (or whether) IBM and BEA programmers think, and you must code accordingly. Dreams of reuse evaporate. You could try switching in an alternative SOAP library, with all the endless hilarity that that entails. You could try using SAAJ and forego JAX-RPC, but you must deal with more factory construction than southern China, and SAAJ does not tell you how to hook-up a service implementation in J2EE, just how to call one. SAAJ is fact is baffling in its pointlessness, all in all.

JAX-RPC will be better in version 2.0. We have changed the name, but not because we rogered the first versions and there is a stigma. It can’t be any worse, so we can guarantee gratitude and praise. You are a developer, and we want to stab you in the genitalia with a wooden
spoon.

Mergere vs Maven

Thursday, November 3rd, 2005

So Maven 2.0 was sharted out recently by that grand posse of intellectual giants that make up the employees of Mergere. It promises speed, agility, and is probably even better than ruby. Along the way, Mergere also revamped its website to include more marketoid content, and a more serious attempt at sounding at least relevantly ridiculous, as opposed to merely spastic in a vague and unspecified context.

The trouble is, it’s still impossible to find out what these people do. if you ask anyone ‘in the know’, you’d be reassured that it’s not ‘just’ maven 2 and yet another tawdry attempt at a continuous integration product. They provide ‘more’, for some unspecified and suitably arm-wavy value of ‘more’.

Wisely missing from the dubious offerings at hand is a price list. Fear not though, someone seems to have accidentally said the wrong thing to the wrong reporter, and we now know that Mergere’s price starts at $25k. So what does this actually buy you? Well, it’s very unclear. It does guarantee you entry into the rather dubious league of brain damaged product purchasers, for one thing. You’d probably still feel inferior to your fellow league members though, as you’re unlikely to even get a shiny box or CD for all your hard earned greenbacks. Seriously though, has anyone paid these monkeys for anything? Is anyone even thinking of it? Please step up so we can all point and laugh.

According to the website though, you will get ‘help with maven’. So basically, Mergere’s goal is to help you use maven. Except of course that if Maven is indeed as great as said naive wankstains insist, then why on earth would you need to pay someone to tell you how to use it?

There seems to be a very culty freakish community of ex-jboss people floating around who keep spinning their wheels doing stupid things. I realise that I’m probably lumping in a lot of different people (many of whom had nothing to do with jboss), but it’s bizarre that all the guys involved in Geronimo/maven/smattering of codehaus dangleberries/simula labs/logicblaze seem to be, well, in bed with one another. The fact that 15 minutes into a Geronimo talk the speaker starts discussing maven is rather disturbing. Exactly how many appserver presentations spend their time saying how great ant is? Is that the best they have to offer? Surely there’s more than a mildly disturbing jbossian inferiority complex?

Speaking of Geronimo, does anyone else find it hilarious that IBM has taken a big fat unlubricated shiny black object and stuck it into some strictly one-way orifices? The entry level, worst of the worst, cheapo piece of crap dogshit appserver they offer now is something that builds on Geronimo. The crack addicts in the Apache camp might view this as a good thing, but really, the message the rest of us are getting is ‘don’t touch geronimo with a barge-pole, it’s not even good enough for IBM to give away for free without having to build a bunch of stuff on top to make it useful enough’. Presentations are now spearheaded by IBM lackeys, and developers are (quite rightfully, given the intellectual acumen of the people involved) being shoved aside or trotted out for appropriate party line poopage.

It’s sad seeing so much time and effort wasted on the wrong things. It’s sad seeing the one of the prime motivations for Geronimo (according to the Geronimo book) is that ‘it’s from Apache’. It’s inexplicable how nobody seems to notice the cognitive dissonance between their ‘we don’t suffer from NIH’ chants yet spend thousands of man hours living and breathing NIH (Harmony, Geronimo being prime examples).

While I’m on a tangent utterly unrelated to my original rant, I’d like to digress even further and encourage you all to join the JCP and vote for me, I’m running again this year. All you have to do to join is fax an 11 page document, and sign in two places, hop on one foot, tweak your nose, and wave unmentionables in the general direction of Sun at specific times of the month while clad in a strategically placed pink sock. Whatever you do, please do NOT vote for a company, the Executive Committee has enough corporate representation!