Skip to main content

Introducing Project Phobos

Posted by robc on May 18, 2006 at 5:34 PM PDT

On Tuesday, at the very end of the JavaOne 2006 Technical Keynote, we demonstrated Project Phobos for the first time in front of an external (i.e. non-Sun) audience. The reception was very warm, as confirmed by a number of great conversations we've since had with conference attendees.

Project Phobos is investigating the use of scripting languages in the Java web tier. Currently, we are focused on JavaScript, but we are able to support any number of scripting engines via JSR-223. To prove this point, at our Birds-of-a-Feather session BOF (BOF-9450) we showed JRuby running in the same environment, with JavaScript invoking JRuby and, conversely, JRuby calling into the JavaScript libraries we developed, all courtesy of JSR-223.

The application we demoed is a mashup of two popular sites, reddit and del.icio.us. Since it's hard to describe in writing an AJAX-rich application, I'd like to point interested readers to the video replay of the session (the segment in question is the last one).

We intend to post as soon as possible a Glassfish build which incorporates Phobos support on the project site, including the source code to the demo, so you'll be able to run it on your desktop and see for yourself what the code looks like. (We are currently held up by some minor licensing issues.)

The role of scripting in the demo app is quite large: JavaScript is used not only for all controller code and as the embedded language in JSP-like views, but also to implement the URL dispatching logic underneath and currently even for implementing sessions via cookies. Of course, we are standing on the shoulders of giants, in that JavaScript can take advantage of all the convenient libraries and services that the Java platform provides free of cost. This leaves as our main task to exploit the dynamic nature of scripting languages to deliver a great developer experience for web applications, in particular AJAX-, RSS- and REST-enabled ones.

In subsequent blog entries I'll go over the contents and some of the ideas that are driving Project Phobos.

Related Topics >>