Live data from Hacker News

CGI Using Node.js

cgi-node.org

51–60 of 88 posts

Re: CGI Using Node.js

#51
post #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 th…

Node.js's sole purpose was to lower the barrier to entry of server-side development.

async nature of nodejs, prototype based OO, callback hells and scope chain make JS harder than Ruby and Python, IMHO.

I dont think nodejs lowers the barrier. Or am I mistaken?

Re: CGI Using Node.js

#52
This looks useful. HostGator will host a web site for $3.96 a month. You can't have any long-running processes. You're limited to CGI, PHP, and static pages. For low-traffic web sites that need some modest amount of host-side processing, that's an effective solution. There's nothing wrong with running a Javascript engine instead of the usual Perl or Python engines under CGI.

If your e-commerce site does one sale a minute, you don't need Docker containers running on AWS instances behind a content delivery network.

Re: CGI Using Node.js

#53
post #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 th…

Node.js's sole purpose was to lower the barrier to entry of server-side development. async nature of nodejs, prototype based OO, callback hells and scope chain make JS harder than Ruby and Python, IMHO. I dont think nodejs lowers the barrier. Or am I mistaken?

You're quite right. Node.js is more like a trap for inexperienced developers who probably won't even understand why Node.js is an awful tool when used to solve the wrong problem because they have no real experience (I believe Node.js is the wrong answer to the wrong problem in all but a very few exceptional circumstances).

Re: CGI Using Node.js

#54

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?

I could see that with node-cgi if you're mixing html+server side+client side in a single file.. that would be confusing.

In practice though (and if you're using the nodejs), you would have better organization... for ex, all of your nodejs code for in a directory, and then a directory with your templates (which is also where the inline client side js would go). Making it much easier to think about them separately.

Re: CGI Using Node.js

#55
post #50
post #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 th…

Node.js is great for REST API development but hey who's using those these days right ? But I agree that this project fixes a non-existing problem.

I agree that Node.js is pretty good for thin REST APIs, it's one of the few scenarios that Node.js actually works quite well. It's the other 99% of use cases that I take issue with.

Re: CGI Using Node.js

#56
post #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 th…

I don't understand what you mean by "shoving it further down the throats of the masses". Are people being ordered to use Node.JS against their will somewhere?

Re: CGI Using Node.js

#57
post #49
post #46

Earlier quoted context omitted.

While I am on your side of the fence, there are a lot of those whose sole language is Javascript (learned from client-side) and have no time/motivation/ability to learn a new language. For them, wouldn't it be cool if they could use their existing knowledge and develop on the server? I'm not saying it's a good or bad thing, I'm just saying that's how it is.

I don't think so. I'm all for lowering barriers to entry but there is a point where it becomes harmful to the ecosystem and to the developers themselves. Software development is, in my opinion, an engineering discipline, and so it's hugely important to use the right equipment for a specific task. If somebody truly can't learn how to do server-side development properly then they need to pass the job onto someone who c…

But there is a big difference between "professional" (their work affects others) and "hobbyist" (simple tasks nobody uses).

Think about the hobbyist... The PHP/Razor like templating, since you mentioned it, gently mixes known (html document that they can see) with the unknown (magic code). Do they really need anything more advanced for the type of things they're trying to produce?

Re: CGI Using Node.js

#58
It's crazy how some people in this thread get so emotional and negative about a new tool. If you don't like it, just don't use it. Yes, we know that CGI is slow and that you don't like Javascript.

Re: CGI Using Node.js

#59
post #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 th…

I don't understand what you mean by "shoving it further down the throats of the masses". Are people being ordered to use Node.JS against their will somewhere?

Yes, usually by their manager. Things like Node.js get over-marketed to the public, managers are fooled into thinking it's a valid solution to their problem, then they force developers to use it against their will. node-cgi increases the number of scenarios where Node.js can be inappropriately forced down the throats of otherwise competent developers.

And there's also the long tail of inexperienced developers who made their own decision to use it and left a broken application that an experienced developer is called in to fix.

I also prefixed my statement with "akin to", which is to say it's not literally being shoved down the throats of developers but the effect is similar.

Re: CGI Using Node.js

#60
post #55
post #50

Earlier quoted context omitted.

Node.js is great for REST API development but hey who's using those these days right ? But I agree that this project fixes a non-existing problem.

I agree that Node.js is pretty good for thin REST APIs, it's one of the few scenarios that Node.js actually works quite well. It's the other 99% of use cases that I take issue with.

Use cases like Walmart, LinkedIn, Paypal, Ebay, the New York Times, Uber, Voxer, Microsoft and Yahoo?
Post reply on HN