InfoQ

News

Phobos: Will we have JavaScript on the Server-side again?

Posted by Rob Thornton on Nov 15, 2006 04:19 PM

Community
Java
Topics
Javascript
Tags
Phobos

A recent editorial on Ajaxian asks what it would be like to write JavaScript on the client and server. Phobos, a Java.net project, is doing just that. The goal of Phobos, a lightweight web application environment, is to show that Java can be a successful platform for server-side scripting. Server-side JavaScript would allow code-sharing between the client and server and only one language required for web development.

Several recent toolkits (GWT, Ruby on Rails helpers) have focused on allowing developers to write in one language and generate JavaScript code. Instead of this trend, Dion asks:

...maybe we will end up developing end to end in JavaScript? Wouldn't it be nice to be in one language (that is very flexible, and allows you to code functionally, procedurally, OO-ally, etc)?

Michael Mahemoff agrees that server-side JavaScript has a lot of potential, though it was written off after failing in the 1990s in products such as Netscape Enterprise Server. JavaScript has come a long way in the last decade and is now prevalent in most organizations, though usually not the language of choice.  Phobos, announced in May, is a web application environment running on the Java platform that is composed of a set of JSR-223 compliant scripting engines, AJAX and Java libraries (Dojo, JDom, etc), and some scripting libraries.  Currently they're focused on JavaScript, using Mozilla Rhino as the engine, with some modifications such as the ability to subclass Java classes and support for the JavaScript language extensions for XML.

A Manageaility post asks if we know how we want to develop web applications:

It's quite a paradox, Javascript doesn't have the consistency, modularity and static checking that Java has so someone builds a compiler. Java's type checking system is not quick and dirty enough so someone builds a framework based on Javascript. Can't we ever make up our minds our are we doomed to repeatedly re-invent the way we do things?

No comments

Reply

Exclusive Content

Intentional Software - Democratizing Software Creation

Business users doing programming? Simonyi and Kolk presents how Intentional Software offers a radical new software approach that separates business knowledge from software engineering knowledge.

Getting Started with Grails

Jason Rudolph discusses Java/Grails integration, Grails plugins, creating a Grails sample application, Grails app structure, data querying and persistence, validation, controllers and tag libraries.

Creating Product Owner Success

The Scrum Product Owner role is powerful, valuable and challenging to implement. It brings healthier relationships between customers and developers, and competitive advantage - if you do it right.

Book Excerpt and Interview: Effective Java, Second Edition

Effective Java, Second Edition by Joshua Bloch is an updated version of the classic first edition, which won a 2001 Jolt Award. InfoQ asked Bloch questions about the areas that the new edition covers.

Tapestry for Nonbelievers

A new article by I. Drobiazko and R. Zubairov introduces v. 5 of the Apache Tapestry component-oriented web framework. The tutorial shows how to create a component and covers IoC in Tapestry and Ajax.

Pete Lacey on REST and Web Services

In this interview, Burton Group consultant Pete Lacey talks to Stefan Tilkov about his disillusionment with SOAP, his opinion on REST, and addresses some of the perceived shortcomings REST vs. WS-*.

Business Natural Languages Development in Ruby

Jay Fields presents his concept of Business Natural Languages - a type of Domain Specific Languages geared towards being readable by domain experts.

Distributed Version Control Systems: A Not-So-Quick Guide Through

Adoption and interest for Distributed Version Control Systems is constantly rising. We will introduce the concept of DVCS and have a look at 3 actors in the area: git, Mercurial and Bazaar.