Jump to content

Node.js


jimfog

Recommended Posts

the question is simple the answer though may not be:is node.js there to replace (php for example) or to "plug some hole" in the existing web technologiesis it just an addition to our arsenal(js,php...) or something more than that?

Link to comment
Share on other sites

Node.js is an I/O based concept written in javascript, binded to V8. http://nodejs.org/ It can be an alternative to the typical server software like Apache and makes exclusive use of Javascripts event oriented nature, dubbed the event loop. I have played around with it a little but not to the point of installing it on a server. I would consider it a tool and alternative. There are also some really good videos about it on YUI theater.

I've used it in conjunction with Mocha as a way to run unit tests purely in Javascript in the hopes of not having to rely in MVN/JUnit/Rhino to write and run our tests, since for these given project, since they are written in javascript. The long story is that we hope to be able to automate testing with Mocha as an alternative. I can understand Java, but it would be more intuitive for me if I could write my tests in Javascript though.
Link to comment
Share on other sites

Node.js is an I/O based concept written in javascript, binded to V8. http://nodejs.org/ It can be an alternative to the typical server software like Apache...
So it is an alternative to Apache you are saying and not PHP, correct?
Link to comment
Share on other sites

It's more about what Node is doing (I/O), rather than what it is (effectively server side javascript). Javascript is used in lots of places other than web browsers. I use it to write iTV applications at my work, where the HTML is essentially a form of XML specifically for this proprietary system. What Node is doing is applying the concept of an event loop to handling requests on a server, rather than a queue. This is a pretty cool concept, and it's because of javascripts syntax and nature that is can used that way, because events are arguably the core of javascript, and along with it come callbacks, lamda's, and anonymous functions. very useful for this particular implementation.

Link to comment
Share on other sites

Yes, but is it aiming to replace PHP, Ruby etc... or just to supplement them?

Link to comment
Share on other sites

http://en.wikipedia.org/wiki/Nodejs
Node.js is a software system designed for writing highly-scalable internet applications, notably web servers.[1] Programs are written in JavaScript, using event-driven,asynchronous I/O to minimize overhead and maximize scalability.[2] Node.js consists of Google's V8 JavaScript engine plus several built-in libraries.
it has it's own API and can do the things it was designed to do. I imagine it could work with other languages, but I can't say I've tried.http://nodejs.org/docs/latest/api/index.html
Link to comment
Share on other sites

well, I conversed with one of co-workers and got to the bottom of it:

Yeah. So, if you are asking about the server stack, You don't need Apache or PHP. You have V8, which runs the JS, and you have Node, which gives you the API, and you have your server code, which you run on V8 via Node. Most of what you got for free with Apache, you will need to build or find and install for yourself.
So I guess in summary it's more of a networking solution, allowing for more responsive applications that aren't bound to the conventional queue based I/O paradigm.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...