Geertjan's Blog

  • June 4, 2010

REST Integration is a Piece of Cake on the NetBeans Platform

Geertjan Wielenga
Product Manager
Integration of REST resources into NetBeans Platform applications is trivial in 6.9—there's a new wizard in NetBeans IDE that lets you select a REST resource in the IDE:

Once selected above, lots of code is generated for making the connection to your REST resource, together with a client stub for further development in your application. I didn't need to do much work to integrate the Yahoo news service into a small application, as can be seen below (click to enlarge):

In the screenshot above, I only needed to create a TopComponent and a ChildFactory, after which I called into the generated client stub (where I hardcoded "oil" as my search string), which automatically hooked into the REST connection classes that had been created by the wizard. So, now I can focus on my domain only, which simply needs integration with the Yahoo news service, rather than needing to learn the low level details of how REST works. Hurray.

In other news. Now read the new tutorial Creating RESTful Service Clients in NetBeans Modules, which tells you everything you need to know.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.