Please note: This blog is no longer updated and has moved to a new location: Scott Mark.

Thursday, February 22, 2007

REST API for Java - But Will It Be Simple Enough to Actually Be RESTful?

Following Cote's links, I found that there is a JSR proposed for a RESTful Web Services API. It would be ludicrous for this JSR to not be voted in, so let's assume it will go forward and become a massively committee-driven document someday, perhaps even accompanied by a reference implementation. The burning question on my mind is: will it actually be simple enough to use?

Hopefully, the JCP learned it's lesson from the community fallout on WS-* Java APIs. And hopefully it has learned from the RoR community that developer productivity rather than infinite pluggability is actually a key requirement. Think Spring and DI, not commercial black box components and SPIs.

So let's see if they can actually pull off an API that lacks the following:

  • Factory classes for roundabout instantiation
  • Manager classes for implementation abstraction
  • Engine classes for what should be behind the scenes servicing
  • Interface/Implementation pairing ad nauseum (I'm so done with the Bridge pattern)
  • Pluggable runtime providers - how about just provide a good one OOTB and be done with it?

Can they possibly do it without the same old, tired patterns?


At 2:57 PM, Blogger Cote' said...

Awesome. I like how you broke down The Usual Java/JEE Design patterns ;)

At 5:48 AM, Blogger James McGovern said...

I agree and disagree at the same time. Yes, we need fresh thinking here but likewise familiarity sometimes breeds success.

At 7:10 AM, Blogger scott said...

Familiarity breeds success but is also the siren of mediocrity. I got excited when I heard about scripting on the Java platform because I pictured inlining and bootstrapping - but was disappointed to see a big family of classes like I mention in this post. I think the Java community's best response to other lightweight development platforms is to cannabalize in the name of simplicity - and build a new context of familiarity around that.

At 10:17 AM, Blogger JT said...

Hi Scott,
I like the depth of your analysis.
Do you see JSON and JSR-311 addressing a large percentage of the Java developers needs? What about NIO?

At 10:26 AM, Blogger scott said...

Hey JT -

I don't know if JSON will save 311 or not, but I suppose building JSON support in will make it presentation tier friendly for web app developers. I'm more interested in the server-side - I would hope that they would build on annotations and allow for some extremely simple exporting of entities without having a lot of coagulating infrastructure classes required.

I don't frankly know how NIO plays into this - do you? I am not terribly familiar with NIO, but it seems lower level than the APIs they will addres with 311.


At 1:50 PM, Blogger JT said...

Pleased to hear you mention annotations. There is interesting things emerging in the W3 working groups around annotations. Between XHTML, XFORMS, Annotea and SAWSDL it seems like we are do for an Aha! moment. The question is whether or not RDF will become supported by non-Oracle RDBMS. If not, I expect the XLINK groups to reinstate and hook in via FOAF. Take care!

At 6:58 PM, Anonymous James said...

"The burning question on my mind is: will it actually be simple enough to use?"

So crucial, but often ignored by developers.


Post a Comment

Links to this post:

Create a Link


<< Home