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


   

 
 
Download Current Issue
ISSUE 7/1/2009 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
A knockout blow for Borland?
MicroFocus has upped its offer for Borland Software to $1.50, hoping to chase off a mystery suitor also pursuing the ALM vendor.
07/06/2009 12:26 PM EST

Is the mystery Borland suitor Serena?
Borland software is considering an offer from another company after a preliminary deal with MicroFocus. Is Serena the new company?
06/30/2009 01:55 PM EST

Windows 7 - An eBayer's dream product?
Windows 7 pre-orders can make people money on eBay.
06/29/2009 03:48 PM EST

 

Microsoft Worldwide Partner Conf.
7/13/2009 to 7/16/2009
New Orleans
Microsoft

OSCON (Open Source Convention)
7/20/2009 to 7/24/2009
San Jose
O'Reilly Media

XBRL Technology Workshop & Summit
7/28/2009 to 7/30/2009
Santa Clara
XBRL US

ACM SIGGRAPH
8/3/2009 to 8/7/2009
New Orleans
ACM SIGGRAPH

OpenSource World (formerly LinuxWorld)
8/12/2009 to 8/13/2009
San Francisco
IDG World Expo


 
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