Is Node.js declining already?
quora.com
quora.com
Right now we seem to be in a client-side JS boom. New frameworks are being written, adoption is up, React and friends are getting tons of buzz, build tools like webpack or transpilers like babel are making developer lives easier, NPM is seeing tons of traffic (much of it supporting client-side development, either directly or indirectly), we're starting to routinely prerender SPAs on the server, etc., And it all runs on node.js. (Good luck writing a serious React app without some node.js processes running at some point.)
So I'd say we've yet to see peak node.js; it's still increasing in usage, and will likely do so for some time.
Now, some people made some wild claims about node.js being the BEST EVER SERVER FRAMEWORK, with super amazing webscale performance. That was nonsense and lies. Node.js was never going going to sweep the world and be the One True Framework for writing servers in, and that's becoming increasingly apparent. It's not a terrible choice, but then, neither is Rails. Or C#. Or Python. Or hell, PHP. And people are going to keep writing servers in all of those languages and frameworks.
If you listen to the hype, we went from Node.js being the BEST FOR PERFORMANCE to, I dunno, golang or something. And going from being the BEST to not even being talked about probably feels like a real decline. In the real world, Node.js went from a new and little used niche technology, to a slightly less new and very broadly used niche technology. That's not a decline at all.
If you stick around long enough, you see this play out over and over again. You learn not to get too worried over a lull in attention paid to your tools of choice.
Also, ES6 & ES7 make callback-heavy Javascript so much more pleasant to program in. That addresses Node's main pain point.
It's a feature in search of a problem. Nobody is rushing to replicate this, because it's difficult to leverage. There are few languages that do not have a way to parse json and are all easier to maintain.
I very much disagree. Using react and webpack I can render my views on the client and the server using the same code and using react-router I can even share the routing code unmodified on both ends. Having a fully powered SPA that cleanly falls back to server rendering for crawlers and no-script clients is pretty sweet, in my experience.
In the deploys I've worked with, this is never actually done. How many Node.js developers actually ship the exact same code to both locations?
I think node running JavaScript and having NPM were much more "killer features"
I mean, 99% of PHP-devs already knew JavaScript and NPM give you something like RubyGems without the need to learn Ruby.
On a different app I was working on yesterday, I was adding a feature. That feature was much easier to do on the server, so I moved a bunch of code from the client to the server. Less than an hour's work in Node, it would have taken several days in any other framework.
This way, we are making our web server "just another client."
In practice this (almost) never happens. The popularity of NodeJS has much more to do with asynchronous I/O, and having a package manager that is working very well for the community.
what the clueless eng manager says: the same code can run on the server and client. no more front end hiring hell!
You mean being single threaded?
I think you mean multi-tasking, not multi-threading. And isn't cooperative multi-tasking the Windows 3.1 model on DOS? Not sure how cooperative multitasking is better than OS threading.
And am I mistaken, or is Node.js the same thing as Windows programming model from 1990 repackaged in Javascript? Windows programs have single message loop, and Windows events and you write callbacks that handle those particular events, like when a mouse clicks, when it moves, etc.
In most cases that's not even completely true. Try to run in the browser anything with a node require... That's why we have to use ugly hacks like browserify :/ (not meant to bash browserify, it's really useful. The ugly thing is having to bundle 10s of thousands of javascript lines of multiple packages in a single file)
https://www.google.com/trends/explore#q=nodejs%2C%20php&cmpt...
Note that this is on the same scale as node, which is no longer visible hugging the x-axis...
https://www.google.com/trends/explore#q=php%2C%20javascript&...
But like node, laravel is also on fire...
When you think about it, PHP is not as high as you would expect in comparison.
Now that I've been doing so much front end javascript programming, I'm looking into Node just because I'm way less efficient at writing python and more efficient at writing javascript nowadays.
At least that's my personal decision criteria.
NodeJs doesn't have any concurrency capability. Sure you can fork, but then you need a message queue for interprocess communication. And frankly while javascript's getting better, some people are a bit sick of dynamically typed languages and prefer static typed languages.
How many people can go read a large JS source file and make sense of what is happening quickly? not a lot, in comparison, Go is easy to read,there is no "ninja trick" or metaprogramming stunts that makes code unreadable.
If written correctly, neither of those questions should be an issue.
1) JS devs shouldn't have "large" JavaScript source files, like most good programs, they should be broken into small, concise pieces.
2) JS devs shouldn't use "ninja tricks" or other BS, they should write for the next person that reads the code, again, like any language.
Yes, a lot of people still write bad JavaScript, but that is on them, not the language. It is pretty simple to write bery readable JavaScript if you so choose.
1) Breaking JS up into small files actually makes it less readable because then you have to guess at the context that the JS is running in. Without static typing, it's impossible to reason about certain blocks of code without going to find blocks of code that exist in other files and so on...
2) JS devs have to use ninja tricks because without a strong standard library they have to keep reinventing the wheels that should have been included.
There is no standard for how to write readable Javascript and there is too much flexibility. Isaacs, of Node.js fame, writes horribly unreadable code IMO due to the fact that he does not use semi-colons and he tends to put punctuation on the left. However, he swears by the fact that it's more readable...to him.
A week is a long time in JavaScript.
I personally do not believe that Node is a viable platform for building
multi-user server logic. Node is great for asynchronicity, but that
shouldn't be confused with concurrency* which is really what you want in
those scenarios (I can write a list of things Node doesn't do well for
building safe backend systems, but that's one example).
The Node platform is very good for single-user applications (games, web
apps, command line tools, "browserified" apps, Node+browser containers),
but I think a lot of people will come to regret using it for bigger
back-ends.
A company I work with occasionally is building a backend and client system in node+mongo, and I wonder if it is a good idea. The backend will be an app catalog of sorts, while the client will run these apps, which will animate stuff in a browser.I've read lots of warnings about mongo, and now this. I'm torn about these choices, I've tried and liked them, but am a bit out of my element as primarily a python/c developer.
- http://stackoverflow.com/q/22644328/417194
- http://www.future-processing.pl/blog/on-problems-with-thread...
- http://web.archive.org/web/20120911094357/http://dev.hasenj....
I'll just list the strengths of Node and JS in general, in no particular order:
- JavaScript was called "Java"Script for marketing. But the funny thing is that it has become the true "Write Once, Run Anywhere" alternative to Java. Including phones without installing additional software. And projects like React Native will take JS outside the browser into native apps.
- JS has a monopoly in the browser. To build any web-app, you/team need to know JavaScript anyway. Having to use only one language is an advantage for many companies. For larger IT companies, this also dramatically cuts down their training expenses.
- Very active community, perhaps the most active of any language ecosystem. What's remarkable is that the key people in standards and implementation bodies aren't operating on mailing lists alone, but work closely with product teams in their own companies and interact with the rest of the (very large) community through forums and social media. This has resulted in excellent prioritization of features and an active feedback loop. Also, peaking at a time when collaborating coding (GitHub) matured helped. (1)
- NPM and Packages. There's a package for everything. We often hear people complaining about hundreds of npm packages downloaded per install. That's also the strength of NPM. Packages range from monolithic to tiny 20-line functions. The fine grained granularity of packages makes it a simple, anytime-revocable decision.
- JS is a very expressive language like most dynamic languages are, but the years of performance wars by browser vendors have given it a significant lead.
- Tooling is excellent. There even plenty of academic-style research going on, like FaceBook's Flow.
- You could compile other languages down to JS. You can compile Doom to JS and play it inside a browser. (However, JS will retain that native-support advantage.)
- ECMAScript 2015 fixes the big issues with JS. We can treat it like an entirely new language, and in time we can forget the good parts/bad parts discussion.
- JS isn't trying to shoehorn performance into its expressive style. If you're using JS for performance critical work, you will be forced to use data-structures specifically designed for performance. If you need to operate at native-code levels of performance, you'd have to write code differently from the usual expressive and dynamic style. That's a fine compromise, it doesn't have to tread over the neither-here-nor-there territory. Also, pragmatic parallelism is coming (https://blog.mozilla.org/javascript/2015/02/26/the-path-to-p...).
And perhaps the most important one: Wikipedia took off because it made collaboratively editing documents easy and doable with just the browser. If it required downloading and installing additional tools, it may have never achieved the same success. Now, the future will have more people who know programming than ever before. Like writing articles, they might build apps together. The true USP of JS isn't that it runs everywhere, but that browser vendors have shipped billions of debuggers.
(1) Not saying other languages don't have vibrant, active communities.
People forget, documentation needs to be written, interpreted, then passed down through different channels, like programming communities, schools, person 2 person. This can take 4 years+. As soon as English speakers have mastered it, China is just starting to for example.
Node is here to stay, and it's already at a point with decent enterprise adoption, meaning it's going to take a lot of money and time to reverse the trend.
I'm sure people will be building stuff with Ruby forty years from now.