Tuesday, September 13th, 2005

Treehouse Chat and Server Side JavaScript

Category: Chat, Editorial, JavaScript

Wesley Tanaka has written Yet Another Chat Client, and uses this experience to discuss some of the implementation details.

Wesley ends up wanting to have a <?JS … ?> construct a la PHP. Why does he want this? So he can share code between the client and server side of the application.

He rewrote the same functionality for a couple of the features (although you could of course use XHR to run that functionality on the server side and get the result back to the client).

This is another example of how JavaScript on the server side is probably going to grow.

With tools like Mozilla Rhino, you can do this right now.

Are many of you using JavaScript on the server?


Posted by Dion Almaer at 10:05 am

3.1 rating from 13 votes


Comments feed

>Are many of you using JavaScript on the server?
There’s Helma – a javabased web framework which you can script with serverside javascript – it’s fast, stable and nice to work with.


Comment by stefan — September 13, 2005

Back in the bad old days when I was writing ASP I made the shift from back-end VBScript to writing everything in backend JScript for exactly this reason. Generating dynamic front-end Javascript with backend Javascript sure got confusing though :)

Comment by Ian Davis — September 13, 2005

Stefan –

Will have to check into Helma.

I know that Jot does a lot on the server with JavaScript, and with Rhino it is simple to add JavaScript to any Java world.



Comment by Dion — September 13, 2005

Where i get this chat? I very like this chat (treehouse)..

Is possible download source this chat?

Comment by Felipe — October 28, 2005

I’m using JavaScript on server side since 1998. With Caucho Resin v. 2 (see: http://caucho.com), you can use pure JavaScript in place of Java in JSP.

JS is parsed in Java by Resin then compiled in a servlet, transparently. More : if you need to use a specific Java package to do some job, you can import it to use it directly with JavaScript.

Very nice !

Comment by Claude Pelletier — November 25, 2005

Hi, maybe you can take a look at firecat, a server-side JavaScript Webserver:

Comment by David Fu — January 24, 2006

With wxJS you can write server side JavaScript: http://wxjs.sourceforge.net

Comment by Franky Braem — May 18, 2006

Leave a comment

You must be logged in to post a comment.