Home > SOA Tips > The Web Services Advisor > Project Zero, a RESTful new beginning for IBM
SOA Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

THE WEB SERVICES ADVISOR

Project Zero, a RESTful new beginning for IBM


William Brogden
04.29.2008
Rating: -4.20- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Yes, Project Zero really does deserve the "New Beginning" label. With this project, IBM is making a completely fresh start on Web services using the REST paradigm. The name comes from the slogan "Zero complexity. Zero overhead. Zero obstacles." Particularly striking is the emphasis on direct support of the popular scripting languages PHP, Groovy and JavaScript for rapid development. Generally speaking, Project Zero takes the "convention over configuration" and model-view-controller (MVC) pattern approach favored by Ruby on Rails. Standards such as WSDL and the WS-* group are ignored.

IBM considers Project Zero to be an "incubator" for exploring ideas without ties to previous architectures. However, this is not exactly open-source development, the site declares:

This community is an experiment in a new way to build commercial software, an approach we are currently calling Community-Driven Commercial Development.

There will shortly be commercial products based on Project Zero, IBM WebSphere sMash and IBM WebSphere sMash Developer Edition. These developer platforms provide visual tools for creating applications with a minimum of code writing. The name sMash is obviously intended to suggest ease of creating "mashup" applications, which draw resources from a variety of services. It is not clear to me whether or not deployment of Project Zero applications outside the WebSphere world will ever be possible.

Current state of development

Presently Project Zero is releasing new versions every month or so. At this time it is at "Milestone 7" roughly similar to the JAX-RS (Jersey) project which is also at version "early access 0.7" with roughly monthly releases. Note that JAX-RS is an evolving standard with Jersey as the reference implementation while Project Zero is evolving independently of any standard except HTTP

Project Zero architecture
The central problem of a RESTful Web service is interpreting the
URI and headers of a request routing it to the correct process so the desired representation is returned. In Project Zero architecture, processing an HTTP request can be thought of as firing a sequence of events. Each step accomplishes some phase of logical processing and may lead to the next step or an error. Advanced programmers can create their own event handling code. The default event processing sequence goes like this:

  • requestBegin - Builds a data structure representing the request.
  • secure - Requests which do not pass security checks cause return of a HTTP error code and control passes to the log step.
  • GET, PUT, POST, DELETE - The HTTP method and URI are used to locate code to generate the response.
  • log - Records according to the log configuration settings, always runs.
  • requestEnd - Clean up of resources used, always runs.

Note that only the method and URI are used to locate the code to generate a response. This is done through configuration files and a doXXX method naming convention in scripts. In other words, in step 3, if the request method is GET, the application will look for doGET methods in the scripts for a particular URI. Selection of the output rendering method to create the desired return type ( HTML, XML, JSON, etc.) is up to the programmer. Project Zero provides a library of Groovy and PHP "renderers" which can handle many of the typical output formats. For example, the Groovy template facility lets you create mostly static HTML page templates which get a few request specific values filled in during rendering.

Configuring Zero server
Project Zero makes extensive use of the Apache Software Foundation Ant make tool and the related Ivy dependency manager to coordinate assembly of all the parts of an application. Ant and Ivy files are in XML format. JavaScript Object Notation (JSON) script files are used extensively for application configuration and initialization of data structures where other toolkits might use XML or properties files.

The Zero Resource Model for Database Driven Applications
Following the MVC paradigm used in so many Web service architectures, Project Zero has the Zero Resource Model (ZRM) which uses JSON to define and declare databases (models) using conventions that simplify coding applications. Given a database defined with ZRM conventions, you can quickly create Ajax style dynamic HTML pages which use the Dojo toolkit, has been integrated into the Project Zero distribution.

Using the Eclipse plugin for Zero
Following the instructions on the Project Zero site, I started Eclipse (version 3.2.2 required) and set the search for new features path to the Project Zero update location. After agreeing to the license, Eclipse smoothly added Groovy support and examples plugins for the current Project Zero version (M7). Although the Project Zero site gives some information on what Java request handlers should look like, the current plugin emphasizes Groovy and does not contain a Java example. Given the ease with which Groovy scripts can call Java objects and libraries, using Groovy to interface with existing Java objects should be easy.

Contrast with JAX-RS
Project Zero will obviously be competing with Sun's JAX-RS API as used in the Jersey project for developer mindshare, so lets compare the two. The most obvious difference is language support. Although written partly in Java, Project Zero emphasizes the scripting languages Groovy, PHP and JavaScript. In contrast, JAX-RS is completely centered on Java and depends extensively on Java annotations, although JSON output is supported, application code will be in Java.

A developer's right to commercial use of Project Zero is tightly controlled in IBM's "community-driven commercial development" license and is currently tied to the WebSphere world. In contrast, the JAX-RS specification is freely available and has at least four independent implementations including the open-source Jersey project. Some JAX-RS implementations permit very compact RESTful services.


Rate this Tip
To rate tips, you must be a member of SearchSOA.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
The Web Services Advisor
Where does BPEL fit in?
Some notes on ESB configuration
Open source application development frameworks offer alternatives
What to expect with the new JavaScript standardization (ECMAScript 5)
Restlet framework wrestles RESTful Web applications
3 tips for choosing whether to use EGL
Use SoaML to facilitate Model Driven Architecture
Enterprise mashup patterns act as API enablers
XQuery learns to write using XUF
Descriptive Languages for RESTful Services

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



SOA Trends and Strategy - SOA Education, SOA Development, SOA Implementations
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2001 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts