The RESTlet Framework and Building Web Services


All of you should have completed 601 and the infamous web mail project. Given your presumably intimate knowledge of building a web application, you should be able to envision how you would build a RESTful web application from scratch, using your own HTTP server. You could also build a RESTful application using a standard HTTP servere (like Apache) and CGI or something similar. More commonly, developers use some kind of framework such as Ruby on Rails or Django (for Python).

The RESTlet Framework

The RESTlet framework started as an effort to build RESTful applications using Java Servlets. It has evolved into a standalone framework that is focuses purely on building applications that are RESTful. The framework can be downloaded from and much of the material below has been taken from the tutorial and other documentation available on the RESTlet web site.

The generic RESTlet API provides a "a neutral API supporting the concepts of REST and facilitating the handling of calls for both client-side and server-side applications". The Noelios Restlet Engine (NRE) is a reference implementation of the API. The API and implementation come bundled together when you download the framework.

Conveniently, the framework provides a standalone web server. Therefore, you can develop your application without having to install Apache or another web server. The critical elements of the framework that you will need to understand are as follows:

Classpath required to run the example app:

Sami Rollins
Wednesday, 07-Jan-2009 15:13:20 PST