

Ask HN: Best server-side Javascript framework - CoffeeDregs

I'm building a simple SaaS app and have been using Django+MongoDB for the server side bits, but my app is a very heavy JS RIA and I'd love to do the backend in JS, too.  Wanted to see what HNers recommended for server-side JS.  I'm a Rails guy, so am used to being spoon fed...  Have a VPS with a number of PHP and Rails apps, so am comfy administering stuff.<p>* I'm wary of Node.js because it's so young, I'm a touch worried about it crashing and it requires a new set of JS-derived drivers/libs.  But it has a huge range of frameworks that run on it and huge community.<p>* RingoJS seems like a very solid foundation and it gives access to a huge range of Java libs (of ever-varying quality).  But I'm not in love with its programming model and it has a relatively small number of add-on frameworks and a small community.<p>Any other contenders I'm missing?  Better to stick with Django?
======
jashkenas
Just to get it out there, the current 800lb gorilla of Node.js webframeworks
is Express:

<http://expressjs.com/guide.html>

That said, I think we're all still waiting for the real JS Application
framework to appear. For better or for worse, Express is more or less a
Sinatra clone for static pages. I'm hoping to see a true end-to-end JS system
emerge sometime in 2011: one that provides models that can run on both the
client and the server, live updating via Websockets as well as REST, views
that can generate HTML on either end, with a built-in plan of attack for
keeping common security holes in JS apps plugged.

~~~
CoffeeDregs
J,

Hadn't really noticed that feeling of not-quite-there-yet, but you summed up
my feelings about node.js frameworks pretty well. (This is where someone tells
me to start developing it myself...)

I'll check into Express again and see if it's getting to the point where it's
reasonable for a neophyte such as myself to invest in learning it and helping
to develop it.

~~~
percept
Also check out:

<https://github.com/tuxychandru/grasshopper>

------
monos
Ringo is fine.

The number of add-on frameworks is probably so small because Ringo came
bundled with a web-framework. But it will be removed from the core within the
next releases.

And additional frameworks for Ringo are already appearing, like
<https://github.com/hns/stick> or the proprietary <http://erbix.com> platform

~~~
mehi
Erbix launched the first server-side JavaScript Marketplace
(<https://secure.erbix.com/marketplace>). The apps and libraries within the
first apps developed by Erbix team are GPLed. They also use many other open
source libraries (check out the source code and app descriptions).

There's virtually no proprietary library in Erbix. The backend Single-Sign-On
module will be launched openly soon.

Virtually any open sourced app on Erbix Marketplace will run on RingoJS as
well.

------
jmtulloss
node.js is mature enough for serious work, I wouldn't worry too much about it.
It's fast, has a great community, and is improving all the time. In my mind,
it lives up to the hype.

------
ilya_b
Rhino itself is very slow. Sometimes it is 50-100 times slower than node. You
can check it by running some of benchmarks from V8 suite in node and Rhino
runtimes (just save .js files and redefine listeners in the runner code):
<http://v8.googlecode.com/svn/data/benchmarks/v5/run.html>

While Java provides many solid and useful frameworks, you may have
difficulties with them if you're not a Java guy.Node's module base, on the
other hand, is very variegated and the code is awful sometimes (and lacks any
documentation except README). But Node community is very responsive and open.
Finding help with Java maybe a very complicated task.

~~~
mehi
_RingoJS is not slow_. We use it in the Erbix backend, running a separate
Rhino/RingoJS engine for each account. It's really stable, fast, multi-
threaded.

We use it in conjunction with PostgreSQL JDBC driver, serving large source
code files, rendering templates written in JavaScript, static files
upload/download, etc.

<http://www.erbix.com> is an Erbix app running on a standard Erbix account.

~~~
ilya_b
If you are running Apache Tomcat (or anything based on Coyote), as I can see
from headers, you are _already_ serving slower than Node. Just because Tomcat
needs more time to parse and return the response than Node. Only Jetty with
NIO connector has comparably high speed. (Yes, I've tested by myself).

And, JFYI, you have to move static content to nginx or lighthttpd, Coyote
serves static files even worse than Apache web server.

All you say about functionality of the platform has no relation to the speed.

~~~
moe
Why this obsession with app container performance?

It does not matter either way in practice. People are running large websites
on _ruby_ , remember?

------
olegp
What don't you like about Ringo's programming model? I've found the community
to be very helpful, despite it's relatively small size.

~~~
mehi
I agree. I've just met the RingoJS developers at the RingoJS meetup in Vienna.
Very impressed!

The RingoJS/Helma team should make it more clear about how committed they are
to the development of future RingoJS libraries. RingoJS will benefit from more
contributors but it's doing just fine already.

Use the discussions group to find out more:
<http://groups.google.com/group/ringojs>.

------
jhrobert
I use Node.js -- but I don't use any framework. I don't need one.

When I need something, I dig, find something similar, read the code, and I re
implement the thing, my style.

~~~
Klonoar
Sup NIH, how you doin'?

------
DTrejo
If you haven't already seen this list, make sure to check it out:

<https://github.com/ry/node/wiki/modules>

~~~
CoffeeDregs
D,

Definitely had seen that, but, as with all things server-side-javascript, I'd
been a bit confused both by the number of choices and by the number of
defunct-ish projects. I'll dig into it again. Definitely is seeming as though
I oughta look at node.js again...

~~~
DTrejo
At this point, node is young enough and close enough to the ground, so to
speak, that you can copy / paste / implement a lot of things yourself.

I'd take a look at node-static for file serving, and journey for JSON routes.
Thingler.com is built with those pieces, I believe. You can read the article
about it over here: <http://www.couchone.com/case-study-thingler>

Edit: Cloudhead wrote all the above things, and is also the author of
lesscss.org, which you may have heard of.

Also, make sure to keep an eye out for example folders in github repos, as
they are generally super helpful.

Also also, stop into #node.js, as they are super nice :)

