It's all spinning wheels and self-doubt until the first pot of coffee.

JS versus PHP?

...on the other hand: With all these people getting reacquainted with JavaScript by way of AJAX, wouldn't it be cool if we had something as easy to deploy as PHP but based on JavaScript?

Archived Comments

  • Isn't that ASP?

    I know I've liked the idea of doing JavaScript on the server and client. Less confusing.

  • As of CFMX, the CFScript sub-branch of the language is similar to Javascript... the handling of curly brackets is the same, and Coldfusion Components are basically a server-side implementation of Javascript's approach to objects.

    The big difference is in operators. For some reason, they stuck with CF's standard, text-based operators, so you end up with stuff like this:

    if (i=1;i LT 10;i = i + 1) { // do something }

  • Jonathan: Well, yeah, JScript is one of the languages available in ASP... but ASP isn't a quick configure-and-make module for Apache.

  • Isn't Rhino the obvious solution? I'm sure there is an opensource jvm/compiler that it will run on too?


  • I'd love to give that a go. I like RoR for large applications but having an apache mod that interpeted JS along with some APIs to access the system and server environment would be great.

    I've been looking for someone to start that project with because unfortunately I know hardly any C. If anyone does an is interested then I'd love to give it a shot.

    I think mod_javascript was started years ago but stalled eventually before it came to anything. I think spidermonkey would be a better basis that rhino to get in all to run as fast as possible which is a shame because I can code Java..