InfoQ

News

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

Posted by Rob Thornton on Nov 15, 2006

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

Watch Thread Reply

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.