Ask HN: Why are there some many *.js frameworks/api's coming out

3 points by quietthrow ↗ HN
Its seems like, these days, everybody and their mother is writing a .js library or framework. Whats is causing this sudden phenomenon. Why do people want to use javascript the server or middlewhere or wherever ? what changed ? Would like to get the community's perspective.

9 comments

[ 6.6 ms ] story [ 34.4 ms ] thread
1. node.js happened

2. lots of devs already know the javascript API very well.. a lot of times these same devs write server backends. why not share code between client and server?

3. (maybe just me) it turns out writing in a language as dynamic and flexible as javascript is pretty fun

1. I guess why did node.js happen. Was the developer just trying to showcase his skills and did it for fun, and then went viral. And now everybody else is just doing that. To me then *.js are nothing more than a fad. 2. Reasonable. 3. Php is fun, has more support (atleast when it comes to doing more 'servery' stuff.
I'm not an expert on Node.js but my understanding is that Ryan Dahl wasn't happy with the performance that PHP and Apache provide. PHP is very feature complete but the way Apache handles web requests means that a web server has a relatively low max capacity. Apache handles requests by forking the process which is both slow and resource intensive.

The way Ryan explained it is that moving past that performance barrier is a solved by a single threaded application that can respond to event based input output. He liked Javascript because it is such a minimal language which already supports that paradigm and has advanced tools and community.

That's the main point that I recall from one of the talks of his that I watched. There are some tertiary reasons as well which make Javascript a good choice.

No, node.js needed to happen. Javascript makes it very easy to write event-driven code, which it turns out is a pretty good model for a web server, especially if you are routing real-time data between clients. It didn't just "go viral", it had solid proven performance stats.

Don't get me wrong, I started with PHP and it is solid, but yech I wouldn't call it fun.

JavaScript is fun and easier if you don't have to share code or data with other people. there are no contracts, no interfaces, no classes to slow you down, and most of the software world has a 'screw the other guy' mentality anyway. All you have to do is remember what your own data looks like for a short time. Most code will not be shared with outsiders and most people want to impede their coworkers rather than do extra work to make things easier. so the mentality is "why not use JavaScript for everything."
I never understood the 'fun' part when people refer to programming languages since its so subjective. Apart from that I agree with your comment, in that the field of software engineering is so young and as a result one has to deal with a lot of noise, because everybody is trying to contribute which is a good thing, but it also creates chaos.
When I call a language fun, I generally mean:

1. It delights me by doing what I want.

2. It makes normally complex programming tasks easy (try metaprogramming in php).

3. It is simpler than I originally imagined.

1 & 2 generally means... it's a "hackable" language (ruby is another good example). 3 is icing.

I think the biggest single thing to happen was significantly faster JavaScript processing. The speed boost has made things that were previously not worth doing possible. With out the V8 engine node.js was not a realistic proposition.
Agree. V8 is one part of the equation. However, in my opinion re-inventing the wheel for fun can be argued both ways.