What are the implications of node.js?
Asked Answered
B

4

6

I've been reading about node.js lately. I've seen many articles about how it's really great and all from some prominent people. Given the inertia that this project seems to have, and that I am currently learning javascript and jQuery, the project has gotten my attention. I get that many people are excited about it, but I don't quite understand what the implications are.

I understand that it is event driven and non-blocking and all of that, but where I'm confused is in regards to its intent.

Does node.js mean that we now have a foundation to run Javascript on the server-side, so that later maybe someone will create the Ruby on Rails or ASP.NET MVC equivalent for node.js/Javascript? Perhaps there already are web frameworks out there, but if so I haven't heard the hype machine yet.

I hope my question is clear.

Baziotes answered 12/9, 2010 at 4:4 Comment(2)
There are already web frameworks for node.js: expressjs.comArched
Yeah, and I've also seen geddyjs.orgEllissa
C
3

I think what you can hope for is going to be more like twisted for Python, rather than e.g. rails for Ruby -- a rich, powerful framework, but still one requiring skill and care to use properly, because asynchronous programming is always like that... it's the price you pay for its absolutely awesome performance potential.

There are and have been Javascript server-side frameworks, but with server-side Javascript never being a really popular option, such frameworks never got the "critical mass" of support and enthusiasm that, say, jQuery has, or rails for ruby on the server side of things.

I doubt async programming (with its subtleness and difficulty) will be the defining trigger for a "mass movement" (hey, I hope I'm wrong, but I see e.g. the relative popularity for Python of Django, with none of the awesome performance, compared with Twisted, with _all_ the awesome performance... but the intrinsic difficulty too!-).

OTOH other developments (such as, simply, the wide availability of powerful, high performing, solid Javascript engines like V8) are more likely to eventually result in wide availability of (non-async;-) server-side Javascript choices, and as a consequence the possibility of the development (or porting -- e.g., a framework like dojo could already offer a lot to a JS server-side app, only parts of it are actually client-side) of powerful, simple, and therefore eventually popular framework. Nevertheless, I wouldn't hold my breath waiting for that either...

Childs answered 12/9, 2010 at 4:14 Comment(3)
Thanks. Just as clarification though, I wasn't saying that node.js may become Rails, I was asking if node.js may lay the foundation for a potential 'rails equivalent' later on, built on top of node.js.Ellissa
@Blaenk, I got what you were saying -- and my opinion is that anything (that makes sense;-) built on top of an async mechanism will be async -- and that won't be as easy, and therefore won't be as popular, as, say, rails or django (rather, it may be as powerful, and not-all-that-overwhelmingly-popular, as, say, twisted).Childs
Ohhh, I see what you mean now. I guess it was kind of hard to grasp with your parallel commentary in the last paragraph (pun intended xD).Ellissa
B
4

I think the major implications are two-fold: huge performance and scalability gains, and the possibility of creating web applications where two or more people may work on the same web application at the same time, watching what the others are doing, in real-time. This latter one not only has big implications for web-based gaming, but also collaboration tools, etc.

It would appear that node.js is exactly what the real-time web needs. For that kind of thing, be sure to also checkout Socket.IO, which achieves cross-browser HTML5 web sockets. Combined with node.js, this makes for an incredible platform.

Check out what was made at the node.js knockout for some examples of what can be done.

Beitz answered 19/9, 2010 at 2:41 Comment(0)
C
3

I think what you can hope for is going to be more like twisted for Python, rather than e.g. rails for Ruby -- a rich, powerful framework, but still one requiring skill and care to use properly, because asynchronous programming is always like that... it's the price you pay for its absolutely awesome performance potential.

There are and have been Javascript server-side frameworks, but with server-side Javascript never being a really popular option, such frameworks never got the "critical mass" of support and enthusiasm that, say, jQuery has, or rails for ruby on the server side of things.

I doubt async programming (with its subtleness and difficulty) will be the defining trigger for a "mass movement" (hey, I hope I'm wrong, but I see e.g. the relative popularity for Python of Django, with none of the awesome performance, compared with Twisted, with _all_ the awesome performance... but the intrinsic difficulty too!-).

OTOH other developments (such as, simply, the wide availability of powerful, high performing, solid Javascript engines like V8) are more likely to eventually result in wide availability of (non-async;-) server-side Javascript choices, and as a consequence the possibility of the development (or porting -- e.g., a framework like dojo could already offer a lot to a JS server-side app, only parts of it are actually client-side) of powerful, simple, and therefore eventually popular framework. Nevertheless, I wouldn't hold my breath waiting for that either...

Childs answered 12/9, 2010 at 4:14 Comment(3)
Thanks. Just as clarification though, I wasn't saying that node.js may become Rails, I was asking if node.js may lay the foundation for a potential 'rails equivalent' later on, built on top of node.js.Ellissa
@Blaenk, I got what you were saying -- and my opinion is that anything (that makes sense;-) built on top of an async mechanism will be async -- and that won't be as easy, and therefore won't be as popular, as, say, rails or django (rather, it may be as powerful, and not-all-that-overwhelmingly-popular, as, say, twisted).Childs
Ohhh, I see what you mean now. I guess it was kind of hard to grasp with your parallel commentary in the last paragraph (pun intended xD).Ellissa
R
3

Node.js is an application server, not yet another webapp server. As the article says, it saves you the trouble of writing the event loop and using two languages to write apps (python/java/ruby/php backend, js frontend). As it is based in the V8 Engine by Google it's really fast and has a low memory footprint.

There's a web service framework called GeddyJS, and Node.js comes with a set of libraries for IO, database and math. It's also possible to extend it with addons, though last time I checked documentation was still a little rough on that.

Rowlett answered 12/9, 2010 at 4:20 Comment(0)
V
0

There is a node framework called bogart which you can easily use the MVC pattern and mustache or common-ejs for templating.

http://github.com/nrstott/bogart

Vanadinite answered 2/10, 2010 at 15:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.