Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Best server-side Javascript framework
21 points by CoffeeDregs on Dec 3, 2010 | hide | past | favorite | 22 comments
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.

* 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.

* 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.

Any other contenders I'm missing? Better to stick with Django?



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.


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.



waiting for the real JS Application framework to appear

Yes, please! This area is so ripe, it hurts.

Backbone.js (or similar) screams to grow into a client/server hybrid that could finally turn web development into what it should be - after all those years.

As a datapoint, I'm currently fleshing out a rails hack to auto-generate javascript form-validation code from the rails model validations. The impedance mismatch is nasty, to say the least.

And this is just a tiny fragment of the pains that would evaporate when we finally get to treat server and client as two sides of the same coin.


I'm working on some of that with my platform (which isn't done yet), but I'm pushing out a couple of products on it.

https://github.com/mathgladiator/win


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


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.


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.


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.


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.


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.


Why this obsession with app container performance?

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


please don't make such general statements about some program being X times slower then another program :|

you will not get good performance and easy scalability for free - no matter which tools you choose.

also see: RingoJS vs. Node.js: Runtime Values http://hns.github.com/2010/09/21/benchmark.html and the follow up http://hns.github.com/2010/09/29/benchmark2.html


I performed mentioned tests by myself while doing a tech research for online gaming startup. The code for V8 benchmarks is open, and it is very generic, so you can easily perform tests by yourself and see the difference.


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.


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.


Fair point. Clearly, I don't have enough experience with it to gripe about specifics, but it seemed more like a web programming library than like a Rails-ish web framework. I'm a huge fan of convention over configuration and RingoJS seemed more configuration-y. ...but the point of this "Ask HN" was to set aside my preconceptions and to get people's thoughts on what's happening in the JS Server Side world, so I'll go look at RingoJS with fresh eyes.


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.


Sup NIH, how you doin'?


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

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


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...


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 :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: