Live data from Hacker News

CGI Using Node.js

cgi-node.org

31–40 of 88 posts

Re: CGI Using Node.js

#31
post #25

Is there a real use-case for this? IIS has run server-side JS for years, and nobody's really using it.

That's right, because it lacked Node's expansive set of robust modules. Now you can use iisnode [1] which allows IIS to host Node apps while also acting as the static file server and optionally also serving up ASP.NET/MVC/WebAPI requests.

In the past I wouldn't have considered running Javascript on IIS but with iisnode, it opens up a whole new world of possibilities that can be mixed into the .NET world.

[1] - https://github.com/tjanczuk/iisnode

Re: CGI Using Node.js

#32
Strange, 22 year old technology is resurrected for javascript? cgi is an expensive technology because it execs full application on every request. It would be a bit more sane if it was implemented with fast-cgi.

Sometimes, I wish people did not hack for the sake of hacking.

Re: CGI Using Node.js

#33
post #28
post #25

Is there a real use-case for this? IIS has run server-side JS for years, and nobody's really using it.

Some developers seem to be unwilling to learn anything else other than JavaScript.

Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.

Re: CGI Using Node.js

#34
I was under the impression Node.js could already be used to run back end code? Could someone explain to me (who is new to the industry) the difference between what this does and what Node.js already did?

Re: CGI Using Node.js

#35
post #34

I was under the impression Node.js could already be used to run back end code? Could someone explain to me (who is new to the industry) the difference between what this does and what Node.js already did?

This is designed to run without shell access, and without installing Node.js. Users on shared hosting cannot normally install Node.js, so are restricted to the usual LAMP stack, however this allows users to bypass this and process everything with Node.js.

Re: CGI Using Node.js

#36
PHP in JavaScript? Node.js itself is much more versatile and often easier than PHP (in my experience anyway), so I can only assume this is so Node.js can be used as a drop in replacement.

I think the only thing missing would be automaticly including PHP.js

Re: CGI Using Node.js

#37
post #34

I was under the impression Node.js could already be used to run back end code? Could someone explain to me (who is new to the industry) the difference between what this does and what Node.js already did?

It allows you to run NodeJS code in a shared server, the ones you buy when you're developing PHP apps, which are cheap and easily findable. Normally, you need a VPS, a dedicated or a cloud to host your NodeJS apps.

Re: CGI Using Node.js

#38
post #35
post #34

I was under the impression Node.js could already be used to run back end code? Could someone explain to me (who is new to the industry) the difference between what this does and what Node.js already did?

This is designed to run without shell access, and without installing Node.js. Users on shared hosting cannot normally install Node.js, so are restricted to the usual LAMP stack, however this allows users to bypass this and process everything with Node.js.

how would you install node modules though?

Re: CGI Using Node.js

#39
This is why Node.js is receiving an enormous backlash from the programming community. People keep peddling it as a solution to all problems when in reality it has very limited utility in all but a few use cases. Pushing this thing over old CGI technology and adding a hideous spaghetti-code HTML interleaving syntax is akin to shoving it further down the throats of the masses who don't want or need Node.js. The best thing to do is leave Node.js in its corner of the ecosystem and let people find it if they need it. Why are we even talking about CGI? It's 2015. This does nothing good for the developer ecosystem.

I've got a running theory for the next 10 or so years of development. Node.js's sole purpose was to lower the barrier to entry of server-side development. With the barrier to entry lowered, inexperienced developers with no knowledge of proper tooling are beginning to reinvent the wheel and make the same mistakes we did 10 or fifteen years ago. We're going to see a tragic repeat of the worst decisions made over the past few decades only this time they'll be running on what is arguably one of the most poorly designed programming languages, Javascript. Those who are too inexperienced to understand history are doomed to repeat it.

Re: CGI Using Node.js

#40

This might be a really bad question that is just as applicable to Node.js in general, but doesn't this get confusing distinguishing between the server-side and client-side aspects?

Not really. Compared to using separate languages on the server and client, I feel that using the same language makes it a bit easier because I don't need to switch "mode" when jumping back and forth in the code. Like, when working on iOS apps, I sometimes write `self` instead of `this`.

I have sometime seen the argument for Node of using the same code on client and backend simultaneously, but in practice I haven't found any use for that. The only big thing I can think of is form/model validation, but if you do ajax, you can just as well do all that on the server anyway.

Post reply on HN