Page 1 of 1

Node.js vs PHP

Posted: Sun Aug 22, 2010 5:19 pm
by JellyFish
Hi everyone,

Lately, I've been really interested in something called Node.js. If you haven't heard of it, it is an awesome evented I/O framework for the V8 JavaScript engine. In this post I want to discuss about it. I'm just so fascinated with it that I want to know what everyone thinks of it. How do you think it compares to PHP or Apache? Is it as capable as PHP; can it do everything or more than what PHP can do?

Agh! I just wish I had some linux hosting to play with it. :x

PS: Has Node been discussed on devnet before? I haven't been able to find anything when searching.

Re: Node.js vs PHP

Posted: Mon Aug 23, 2010 3:14 am
by JakeJ
It runs on Windows if you install Cygwin. Other than that, I can't tell you much, I've never used it.

Chances are though, it's not mature enough yet to compete against PHP.

Re: Node.js vs PHP

Posted: Mon Aug 23, 2010 11:32 pm
by Jonah Bron
I found it a couple of weeks ago and fiddled with it minimally the other day. Really, it's pretty cool. But, so far I can't see how the event based model is useful to a server side script. Correct me if I'm wrong though. And as Jake pointed out, it's still pretty young. I might try to set it up and try it out as a HTTP server.
JellyFish wrote:Agh! I just wish I had some linux hosting to play with it.
VirtualBox anyone?

Re: Node.js vs PHP

Posted: Tue Aug 24, 2010 1:52 am
by JellyFish
VirutalBox is slow on my old, outdated, 512MB RAM computer. I know that you're thinking I should get an new computer. I will soon when I get the money to do so, and I'll get a mac anyway (id est unix) which would make the need for virtualization unnecessary. I think that maybe going with Cygwin might be the way I'll get my hands dirty and my feet wet.

Sure it's young. However, it changes server-side development a lot. I only need to know one programming language instead of three now (JavaScript and MySQL; no PHP) which I think simplifies things. Comet applications (WebSockets) work great with this. I also here Node is faster than Apache+PHP. I hear it's not so good with static HTTP servers, but I imagine only one static request for an initial load of an application and subsequent requests for data. Can't wait till it matures.