Server side JavaScript on Mac OS X?

Discussion in 'Javascript' started by gh@nsbasic.com, Sep 26, 2007.

  1. Guest

    Is anyone doing server side JavaScript on Mac OS X?

    What tools work well for this?
     
    , Sep 26, 2007
    #1
    1. Advertising

  2. Stevo Guest

    Stevo, Sep 26, 2007
    #2
    1. Advertising

  3. On Sep 26, 9:37 am, "" <> wrote:
    > Is anyone doing server side JavaScript on Mac OS X?
    >
    > What tools work well for this?


    I'm doing server-side JavaScript on OS X right now :)

    Here is a list of some alive and dead projects:

    http://en.wikipedia.org/wiki/Server-side_JavaScript

    I've investigated the options related to the Mozilla JavaScript
    implementations. There are also Microsoft .NET things you can do, I
    believe.

    Spidermonkey is Mozilla JavaScript implementation in C. There are
    projects like Whitebeam, wxJavaScript, jsext, and several mod_js
    projects.

    Rhino is the Mozilla JavaScript implementation in Java. Helma is the
    leading JavaScript web framework based on Rhino. There is now also
    Phobos to consider.

    I've decided to mess around with Rhino and Jetty which are the basis
    for Helma. Using Rhino and all of Java seems like a huge jumpstart
    compared to "loosing" time messing with C libraries. I'd rather use a
    C implementation but that is a huge uphill battle to get to a really
    complete dev environment comparable to Perl/Python/Ruby.

    There is no doubt that JavaScript on the server-side is gaining some
    momentum since it allows code sharing with the client. This is more
    beneficial as client programs become heavier.

    The opposite approach is like GWT and haXe which compile source code
    down to JavaScript to send to the client.

    Peter
     
    Peter Michaux, Sep 26, 2007
    #3
  4. Guest

    On Sep 26, 5:39 pm, Peter Michaux <> wrote:
    > On Sep 26, 9:37 am, "" <> wrote:
    >
    > > Is anyone doing server side JavaScript on Mac OS X?

    >
    > > What tools work well for this?

    >
    > I'm doing server-side JavaScript on OS X right now :)


    Thanks, Peter - you're looking at the same things I am, for similar
    reasons.

    Unless I'm mistaken, there doesn't seem to be a clear answer as to
    what is the best SSJS implementation for the Mac.

    Have you gotten Rhino to respond to a CGI request?
     
    , Sep 27, 2007
    #4
  5. On Sep 27, 5:58 am, "" <> wrote:
    > On Sep 26, 5:39 pm, Peter Michaux <> wrote:
    >
    > > On Sep 26, 9:37 am, "" <> wrote:

    >
    > > > Is anyone doing server side JavaScript on Mac OS X?

    >
    > > > What tools work well for this?

    >
    > > I'm doing server-side JavaScript on OS X right now :)

    >
    > Thanks, Peter - you're looking at the same things I am, for similar
    > reasons.
    >
    > Unless I'm mistaken, there doesn't seem to be a clear answer as to
    > what is the best SSJS implementation for the Mac.


    There is not a clear "best" but if Rhino is the engine Helma and
    Phobos are the ones to consider.

    The "for the Mac" part is not so important as Mac is not a common
    deployment platform. "for Unix" would be better if you don't care
    about sharing with developers using Windows.


    > Have you gotten Rhino to respond to a CGI request?


    Here is a link to the first hacking attempt I made to use Rhino, the
    Jetty server, and MySQL together. This is not really a good example. I
    posted it hoping it would get others started doing something better.

    <URL: http://peter.michaux.ca/article/3019>

    Now I'm taking some of the ideas of this example and trying to make a
    "real" framework that I could use in production. It's slow going.
    Certainly not as fast as downloading Rails and buying a book on it.

    Peter
     
    Peter Michaux, Sep 27, 2007
    #5
  6. Guest

    I'm making good progress. After following Peter's recipe for Rhino
    (thanks!), the following program runs just fine from the command line:

    #!/usr/bin/java org.mozilla.javascript.tools.shell.Main
    print("Hello World");

    (I saved it as HelloWorld.js. It's the shabang that makes it a
    JavaScript program, not the .js)

    However, if I start it from Safari, I get the following message in the
    log:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/mozilla/
    javascript/tools/shell/Main

    Any ideas?
     
    , Sep 28, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Qw==?=
    Replies:
    1
    Views:
    3,256
    Hermit Dave
    Jan 16, 2004
  2. Shaul Feldman
    Replies:
    0
    Views:
    859
    Shaul Feldman
    Apr 16, 2004
  3. Guadala Harry
    Replies:
    4
    Views:
    1,528
    =?Utf-8?B?aGFyaSBwcmFzYWQ=?=
    Jun 15, 2004
  4. nick
    Replies:
    3
    Views:
    3,216
    Eliyahu Goldin
    Dec 15, 2004
  5. =?Utf-8?B?bGFuZW0=?=
    Replies:
    3
    Views:
    29,323
    Eliyahu Goldin
    Mar 30, 2005
Loading...

Share This Page