There’s a debate going on about Spring, the history of EJBs and distribution. Here’s a summary of what’s been going on the last week:
- Floyd starting a discussion on the history of EJB and no way:
- Ted is disagreeing!
- Floyd counters Ted’s arguments after which
- Ted elaborates
- Keith replied to Ted about his conclusion about Spring and the story goes on with
- Ted replying to Keith
Replying to Arjen
Interestingly enough, I had a fair bit of discussion with my colleague Arjen on the subject of web services and distribution lately. In his latest post, Arjen tries to interpret my latest post about exposing use cases. After I re-read the bit I wrote a couple of days ago I’m kind of amazed that he actually drew the right conclusion because I think the bit I wrote wasn’t the most clear entry ever…
Anyway, Arjen concludes by stating that he thinks it’s about making Web Services first class citizens of your application architecture.
He’s right, but I think it’s important to take one step back and first try to understand that a Java Interface in fact DOES NOT always have to be the same as your Web Service contract.
The point I was trying to get across in my previous post on exposing use cases was that some situations simply don’t lend themselves for transparently exposing a Java Interface as a web service.
Replying to Ted (and Floyd and Keith)
The whole discussion closely relates to the one currently going on between Ted, Keith and Floyd on the history of EJB. After Keith counters Ted by stating that ‘it is wrong to say Spring encourages a “distributed-objects-first” approach, or even the use of distribution in the first place’. Ted agrees but in a way he doesn’t seem to like Spring’s approach. Not because it’s intrinsically wrong but because too often he runs ‘into developers who are of the “objects uber alles” mindset, and any technology that allows them to go back to their basic O-O principles is obviously a Good Thing’. He goes on to state that he’s ‘more worried about the folks who pick up Spring second-hand and use it after reading a few tidbits about POJOs and such. THEY’re the ones who’re going to give Spring the bad name… because in many respects they’re the same ones who did it to EJB’.
Reading between the lines you could conclude that Ted thinks that the majority of developers by nature is not smart enough to understand distributed architectures, web services and such and that’s it’s best to create explicit hard-to-work-with concepts to make those developers realize that they’re dealing with distribution and remote objects (err… services).
I partly agree. I also encounter developers that don’t understand distribution and the issues that come with it. But in practice it takes me only an hour or so to explain these issues and make them realize that they should be careful when distributing objects or working with web services. Explaining network latency and interoperability issues isn’t that hard Ted!
I guess it comes to what’s you’re really after. I think we should be after:
creating the right conditions for a model in which distribution is easy and that clearly recognizes the importance of dealing with latency and interop while at the same time promoting web and distribution services as a separate first-class citizens of the application architecture
Remember: this doesn’t mean we’re there yet!!. As Keith noted: ‘the Spring container itself does not address the problem of distributing objects at all, period’. Keith is explicitly talking about the container, because that’s what’s at the heart of Spring and focusses on in-process development, not inter-process development. My guess is we really need to get the in-process development stuff right first and in the meantime think about technologies on top of that model that facilitate the development of distributed services (whether it be RPC-style services or document-oriented web services).
In other words: I don’t like being pessimistic about what developers are capable of and preventing them from doing the wrong things by lots of tooling and complex things they have to go through. It’s a bit like solving the problems in third-world countries by just throwing money and food at them while a better approach might be to actually learn them how to grow there own grain.
To be continued I guess…
