News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 2/1/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Visual Studio 2010 Release Candidate Available Today
A Visual Studio 2010 release candidate is available on MSDN.
02/09/2010 09:45 AM EST

Is Microsoft eyeing Office subscription pricing?
Microsoft may be preparing to offer a new Office pricing option called "union," which charges the same for cloud as on-premises.
02/01/2010 09:38 AM EST

Facebook rewrites PHP runtime
Facebook is about to open source its own PHP runtime, written from scratch for speed.
01/30/2010 08:53 PM EST

 

Events calendar tab
2/9/2010 to 2/13/2010
San Francisco
IDG World Expo

2/10/2010 to 2/12/2010
San Francisco
BZ Media

2/17/2010 to 2/25/2010
Atlanta
Python Software Foundation

2/19/2010 to 2/20/2010
Los Angeles
SCALE

2/21/2010 to 2/24/2010
Las Vegas
IBM


 
Most Read Latest News Blog Resources

Sun gives Java a REST




October 13, 2008 — 
The JCP is hoping to give SOAP a REST. Today, Sun Microsystems will release JAR files for the JAX-RS, the new Java API for RESTful Web services. REST (Representational State Transfer) substitutes the traditional SOAP practices in favor of a natively Web-based solution by encoding information directly into URLs and allowing the HTTP protocol to do much of the heavy lifting.

Dr. Marc J. Hadley, a senior staff engineer in the office of the CTO at Sun, was co-spec lead on JSR 311. He's been working with Web services since their inception and was also co-lead on the JAX-WS  specification, JSR 224. After years of experience with SOAP, Hadley said he now prefers REST.

"I think it's simpler,” said Hadley. “There's so much in HTTP that is still to be fully exploited. Without going to SOAP, there's so much you can already do that people don't realize. I can see there are cases where you can step up to SOAP. But JAX-RS is of the Web, whereas JAX-WS sort of inherits that SOAP thing where the Web is just a transport. JAX-WS is over the Web, rather of the Web.”

Hadley learned a great deal about the capabilities of HTTP during his time on JAX-RS. “One of the biggest thing is the whole precondition processing,” said Hadley, citing what he learned about HTTP. “It solves lots of problems, like lost updates. There's a lot of depth there that you don't realize when you first start working with HTTP. There's also a whole bunch there for a bunch of standard patterns for the Web, like creating a resource. You don't have to make a new method to do that, it's already baked into the protocol."

JAX-RS is built specifically to make the design process for RESTful Web services simple. And because of REST's new and simplistic design, Hadley said that this was an easier API to write than previous Java Web services APIs.

“We didn't really have a lot of baggage to bring along," said Hadley. "In JAX-WS, we had the JAX-RPC legacy, and for a long time JAX-WS was going to be JAX-RPC 2. That complicated things a lot. In JAX-RS, we didn't really need to do much about content mapping. We didn't have to bake in the things in SOAP where you serialize the messages. A final thing is that there's no real description side to JAX-RS, although we've implemented something. We didn't have to do all the mapping from WSDL."

For developers working with REST, JAX-RS makes use of modern Java conventions, said Hadley.

“I think we've applied Java annotations very nicely to the problem," said Hadley. "The whole thing is a fairly modern framework; we use pojos and we use annotations to put things declaratively into the code, so you don't need lots of method calls. I'm pleased with the builder approach we've taken. We've made it easy to build URIs up from components. You can append queries to an existing URI. We've applied the same kind of patterns to responses.”

JAX-RS is available in JAR form for the first time today. It can be downloaded for free from jersey.dev.java.net.


Related Search Term(s): JavaRESTSun


Share this link: http://www.sdtimes.com/link/32959
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading