Java Project Founder Outlines Benefits of Restlet
Jerome Louvel was looking for a Java framework to support the REST (Representational State Transfer) architectural style for a project he was working on. When he couldnt find one he decided to create one himself.
He dubbed his effort the Restlet Project and launched it as an open-ource initiative. Louvel granted eWEEK senior editor Darryl K. Taft an interview about his effort.
How do Restlets help with AJAX-style development or work with AJAX-based Web clients?
With natural support for REST style Web services, Restlets are in an excellent position to support AJAX-style applications. By nature, those applications need frequent exchanges of pure XML documents over HTTP.
This cant be naturally achieved by SOAP-style Web services stacks like Apache Axis. With Restlets, developers are taking back control of their Web containers and getting busy with the Web 2.0.
How is the Restlet Project progressing? I noticed you are on beta 0.18, when will we see a 1.0 version?
The technology is maturing quickly because Im depending on it for another private project. Also, Ive had enough feedback and suggestions recently to know the features scope needed for version 1.0. I hope to ship 1.0 beta 1 by the end of this month. Then Ill enter into testing mode until a stable 1.0 can be published, hopefully during Q2.
Are you the primary developer or do you have a team working on the project with you?
So far, Ive been the main developer, but other people are starting to show interest and will hopefully start to contribute fixes during Q1. So, Im currently looking to build a community around this project. But the technology and the concepts are still new to many developers, so it will take time to educate, interest and drive participation in.
Also, the project is separated in two parts: a Restlet API and a reference implementation. Eventually, Im considering submitting the API part to the JCP [Java Community Process] or to another standardization body like Apache.
Are Restlets replacements for Servlets?
Restlets are indeed a serious replacement for Servlets, even thought both technologies can work together. In the upcoming 0.19 beta release, a new HTTP connector based on a Servlet will ship, allowing the execution of Restlets within existing Web containers like Tomcat.
It will be an alternative to the current standalone deployments based on the lighter Jetty HTTP connector. This should facilitate the adoption of the technology and provide a smoother transition from Servlets to Restlets for people with existing investments.
What are the advantages of Restlets over Servlets?
I can list a few. Clean separation between the transport protocol aspects and the web application aspects; connectors for any protocol can be addedcurrently HTTP, SMTP and JDBC are provided; they allow the development of client-side applications as well as server-side ones, or both at the same time; Restlets dont control the actual writing on the output stream like Servlets do, which is a major issue when trying to take advantage of non-blocking NIO [New I/O]; Restlets support for REST-style architectures with a direct mapping of REST concepts to Java interfaces (Resource, Representation, Connector, Component, etc.); their resource-oriented design removes the need for in-memory sessions, a major scalability issue with Servlets; easier and more powerful manipulation of identifiers (URIs), Restlets are based on Java SE 5.0 regular expressions; and Restlets support for static file serving with automatic server-side content negotiation [similar to Apache 2.0 and based on HTTP standards].
Check out eWEEK.coms for the latest news, reviews and analysis in programming environments and developer tools.