DEV Community

Cover image for JavaScript Is Eating The World

JavaScript Is Eating The World

Anthony Delgado on August 24, 2017

Incase you haven't heard the news, JavaScript and NodeJS are single handedly eating the world of software. NodeJS is an Open Source server-side Jav...
Collapse
 
ben profile image
Ben Halpern

Atwood's Law (10 years old already 😮)

"Any application that can be written in JavaScript, will eventually be written in JavaScript."

Collapse
 
rbanffy profile image
Ricardo Bánffy

I'm old enough to remember the time when it was "Any application that can be written in BASIC will be written in BASIC".

Collapse
 
marklester profile image
Mark Lester

I am old enough to have used MS BASIC 1.0. Nobody was saying that. They were saying PASCAL would be the language to follow as I remember. They werent even teaching C in most universities. Things have moved on somewhat from 1981. The kids are being taught Node as undergrads, it's really impressive.
History has not ended. We are neck deep in frameworks and all sorts, there plenty to argue the toss about. But the Perl->Python->PHP->JavaScript odyssey is over IMO. We are going to have all kinds of MochaBerryHotRoastScript and God knows what else, but they are all going to be ECMAScript compatible.
Lester's Proposition: If you are stood in a green field and your competitor is in the next field using JavaScript. If you dont follow suit they will rape you.

Collapse
 
hungvutw profile image
Hung Vu

never hear of this Atwood's law. :) thanks

Collapse
 
legosteen11 profile image
Wouter Doeland

Serious question: why do people like JavaScript so much? I thought people found it horrible. Also, because JS isn't type safe, does this mean it's prone to bugs and crashes because of this?

Collapse
 
damcosset profile image
Damien Cosset

Here is an article I read some time ago by Eric Elliott about static types. Static types doesn't seem to have enough impact on bug density based on his analysis.

I can't speak for anyone when it comes to Javascript love, but there is a quote from Bjarne Stroustrup ( creator of C++ ) that I like:

There are only two kinds of languages: the ones people complain about and the ones nobody uses.

I imagine all programming languages are horrible, if they were not, we would stop coming up with new ones.

Collapse
 
symbiat profile image
Ajai Khattri

Not all programming languages are applicable to all problems. Also tech changes. A lot.

Collapse
 
pedro2555 profile image
Pedro Rodrigues

complain != horrible. Javascript is horrible to work with. I complain about python all the time.

Those are diff statements.

Collapse
 
randyhill profile image
randyhill

A few reasons. It's syntax is easy to learn, and it opens the door to both client and server side development. You have to know it to do anything on client side, once you learn that much why not learn Node.js?

It's drawbacks are well documented in "Javascript, the good parts". Typescript will help improve it, but it will never help prevent programmer mistakes anywhere near as well as Swift (for example). But no language is perfect.

Collapse
 
bluejayoo profile image
bluejayoo

Is has been my experience that as your software gets larger and more complex, the lack of type safety causes more and more problems. That's why we use Typescript to compensate for the lack of type safety in JavaScript. I think that is one of the reasons JavaScript is becoming so popular. It doesn't matter what you develop in if the ecosystem allows everything to be compiled into JavaScript. Javascript and V8 are similar to the Microsoft CLR and Java JVM -- a universal run time.

Collapse
 
elmuerte profile image
Michiel Hendriks

Except that JVM and CLR are specifications, V8 is an implementation of no specification. There are multiple Java byte code interpreters, multiple JVMs. There is just one V8, and a hack build on top of it called NodeJS. NodeJS doesn't run on any other JavaScript runtime except V8.
NodeJS is like JavaScript as Microsoft VisualJ is like Java.

Thread Thread
 
dmytrolapshyn profile image
Dmytro Lapshyn

Maybe this was true back in 2017, but now there's a NodeJS build for the ChakraCore runtime as well.

Collapse
 
ben profile image
Ben Halpern

Yes. And this is where Elm fits into the ecosystem really nicely.

Collapse
 
wilsonsilva profile image
Wilson Silva

People don't really love it. It just happens to be the only language the browsers speak and they had to learn it. Then it expanded to other systems and things became more interesting. Even with all the improvements, JavaScript still feels hacky.

Collapse
 
ethan profile image
Ethan Stewart

"People don't really love it"

False, it's my favorite language.

Thread Thread
 
rudocris profile image
Rudolf Manusadzhyan

And it's the only programming language that you know well, isn't it? =)

Thread Thread
 
vedrantrebovic profile image
vedrantrebovic

Bingo.

Collapse
 
bheesma profile image
Bheesma

Now we have ES6 version of javascript that has classes etc., I haven't explored much, but I have seen it makes you write code in different way like other mature programming languages

Collapse
 
g105b profile image
Greg Bowler

Yes, but we can ignore the obvious flaws and use things like TypeScript to transpile our code rather than admitting there are better tools.

Collapse
 
ben profile image
Ben Halpern

I don't particularly like JavaScript and wouldn't choose Node by default, but it's not a strict dichotomy. Circumstance is everything and there are a lot of circumstances where JavaScript really is the right choice, mostly because it's ubiquitous and models can be expressed the same across all environments. We got to this point not because of JS's greatness, but because of pragmatism. That can't be ignored.

Collapse
 
kspeakman profile image
Kasey Speakman

I think the reason JS gets so much attention is because it is probably the easiest language to get into, and a language web developers already (are required to) speak. Nearly every computer has a JavaScript runner and debugger built in -- the browser. Pick one of the many good syntax-highlighting editors and you are off to the races. Then it's a natural progression to exploit the required JS proficiency and use Node for the back-end.

This does not make JS a good language to actually use. But regardless it will continue to flourish as long as it maintains its monopoly as the only language browsers understand. And Node's fate is tied to JS.

For me the trade-offs are just not favorable for using node in back-end systems. Nor JS anywhere I don't have to.

Collapse
 
lexlohr profile image
Alex Lohr

JavaScript has grown beyond recognition in the last 10 years. The main reason to use it is because it is everywhere already: it's in your browser, in your PDF viewer, even your old flash plugin, the server and even embedded in microcontrollers.

It may not be the most beautiful or effective language, but it gets the job done. Miss strict types? Use either TypeScript or Flow. Tired of waiting for new language standards to become usable? Babel your way out of that. You don't like to write JS at all? Compile your Java or C(++) Code to JS using GWT or emscripten.

Not performant enough? Since Google broke into the market with V8, JS performance gains are found left, right and center - not only for your product, but for every product using JavaScript that runs V8 - and other engines will follow or even outperform V8.

Collapse
 
rhymes profile image
rhymes

"write once, run anywhere"

just not the language Sun hoped for :-D

Collapse
 
newmanbrad profile image
Brad Newman

I am happy to hear of JavaScript adoption in any enterprise business. Soon we will JS all the things!

Collapse
 
dameandaemon profile image
Manuel Abarca

Yeahh! all points towards that, Js is all over the place which is awesome, even hardware.

Collapse
 
petecapecod profile image
Peter Cruckshank

Great article it's always cool to read about what big companies were/are using and what they're up to.
Personally I think that JavaScript is the next Java
The way that the JS ecosystem is exploding right now totally reminds me of Java in the early 2000's. And what's not to love about it (OK there is a couple things)
But with ES6 and classes + TypeScript it's starting to head towards a more traditional route (optionally)
And Node.JS makes everything better

Collapse
 
terrylipford profile image
Terry Lipford

It is apparent that there is a lot of bias towards JQuery, and perhaps JavaScript as well. It would have been informative if this article had referenced the number of Fortune 1000 sites that use JQuery as compared to Node.js. To reference only a "few" doesn't tell the entire story....

Collapse
 
anthonydelgado profile image
Anthony Delgado

Agreed. jQuery is defanitly a needed skill to know if you are going to be doing web dev. If we tried to list all the websites using jQuery I think we would run out of room on the list. "According to recent research by W3Techs, jQuery is now used on half of all websites worldwide. The popular JavaScript library has come a long way since John Resig’s Selectors in Javascript blog post in 2005." We actually met John Resig, founder of jQuery, at a meet up and he admitted to not using jQuery in years and only using React on a daily basis for what ever that is worth.

Collapse
 
terrylipford profile image
Terry Lipford

Interesting that the JQuery creator moved on eh? Of course, the history of software has always been about the "next great thing" hasn't it? Anybody remember APL now?

I enjoyed your article, and responded only because I am still a big fan of JQuery.

Thread Thread
 
anthonydelgado profile image
Anthony Delgado

I enjoy using JQuery as well. I am pretty sure every single programing language out there gets a bad wrap by someone else. Don't listen to the trolls .... do what makes you happy and gets the job done!

Thread Thread
 
hsemix profile image
Hamid Semix

The reason for using jquery on sites is very simple "All css frameworks don't have libs for every js framework or lib but jquery", so to me, it doesn't make sense to have jQuery in an angular app just because i want a modal from bootstrap and other beauties from angular. In that case I would rather stick to using jQuery and jQuery alone.

Collapse
 
atilley profile image
atilley

I'd say that being able to spell would be the primary skill for any job. "My rabbit has one ear and he's def in it"

Collapse
 
aaronpowell profile image
Aaron Powell

Minor correction, Microsoft did fork Node.js to run on Chakra and contributed it back, the release is called Node-ChakraCore and can be downloaded from GitHub or Node.js's website. But it's not a fork like io.js was, it's a fork to enable a different runtime and address how to handle C++ node modules via NAPI.

Collapse
 
ratnasambhav profile image
Ratnasambhav Priyadarshi

JavaScript FTW!!! 🙌

Collapse
 
anthonydelgado profile image
Anthony Delgado

🚀🚀🚀

Collapse
 
kushalvmahajan profile image
Kushal V. Mahajan

Microsoft as usual is on different keynote.
We shall avoid their monopoly.
They already are forcing to use IE.

They just don't give up and keep building something on top of a failed product(s)

Collapse
 
alanguir profile image
Alan Languirand

Working on this inside GM. Node is approved for future projects, and several teams within the company are working on being the first to production. Any advice welcome from people with experience deploying with node from within giant companies.

Collapse
 
djviolin profile image
István Lantos • Edited

Node.js is popular, because almost all build/automation tools that we use written in Javascript.

Node.js is popular, because almost all of use start to thinkering with JS first, then go to more well-respected languages like Go, Python, Ruby, C#, Java, PHP, etc.

One day, most of use ditch Javascript when we get to know the other languages...

Collapse
 
oathkeeper profile image
Divyesh Parmar

Java still powers the backend of Netflix, but all the stuff that the user sees comes from Node

Can you or someone please explain how is that possible to have 2 backend technologies working together. I'm sorry for stupid question I've just started creating simple web apps like blog and weather apps with node.js express.js now.

I also know Java but never know how it works on backend.

Collapse
 
joliveraunitec profile image
J Olivera

nodejs/javascript/typescript is actually the web development future.

imo serious software development will always use compiled langs. (computer os, hardware demanding software, videogames, native layers of hardware controlling) and maybe this changes if rams gets cheaper and faster (in the future ofc) but people should be interested on making current languages better than migrating from one to another.

Collapse
 
connorphee profile image
Connor Phee

I have found that Node is not applicable or the best choice in all scenarios, especially when a large system is already built in another language,but cases where it does seem to fit greatly are building small components or libraries that would take significantly longer to do the same in a language like Java. I have come to greatly enjoy working with Node.

Collapse
 
moumst profile image
Merli Thomas

"NodeJS is an Open Source server-side JavaScript environment based on the V8 JS rendering engine found in Google Chrome"

V8 a JS rendering engine really !!!! Is it a joke ?

Collapse
 
ben profile image
Ben Halpern

This comment was not constructive. If you want to make a correction, please do so politely.

Collapse
 
legolord208 profile image
jD91mZM2

Ok I wanna die now

Collapse
 
kaffiene_nz profile image
Peter Ashford

JS was successful because it is the ONLY option to run something on the browser. Not for any virtues it has as a language (of which there are very few).

Collapse
 
breeny profile image
Andrew Breen 👨‍💻

I'd argue that a language designed by need over time will out perform languages designed by "want". Yes, stock JS is pretty bad (ES5 anyways). But as the language has exponentially picked up adoption in both front end and back end use cases (not to mention CLI tooling, electron, hybrid apps etc. etc.), the quality of life additions that are added in each new version of the ECMA script make JS more and more appealing.

It could of been better from the start, but JS is where the web landed in the browser, so the world has run with it to improve it.

Collapse
 
zeropaper profile image
Valentin Vago

Sometimes I think about a product that Aptana tried to sell early 2010's which was already server-side JS (a few years before I first heard about NodeJS).
I can't recall its name though... :D

Collapse
 
mhingston profile image
Miles Hingston

Jaxer, I remember using it for a short while.

Collapse
 
zeropaper profile image
Valentin Vago

yeah... something like that.
it was tempted to use it but never did.
how was the experience?

Collapse
 
symbiat profile image
Ajai Khattri

NodeJS is not a good fit for every problem. Most of examples cited in th hyperbole above are mostly front end stuff - no one would use JS for machine learning for example.

Collapse
 
nijeesh4all profile image
Nijeesh Joshy • Edited

I Love Js

Collapse
 
rocteur profile image
Jerry Rocteur

Is this a bad thing ? And if so, why ?

Collapse
 
giovani1 profile image
mohammed choubby

can we compare it to javaee and spring or not?
if yes wild nodejs 'eat' javaee?

Collapse
 
ek121268 profile image
Eran Kinsbruner

I would also add to this thread the important fact that JS is backed by great testing tools with a wide community such as webdriverio, protractor, and others.

Collapse
 
narensgh profile image
Narendra Singh

I could not understand this, what Jeff Atwood and others, if any are trying to make a point with this statement.
Can any one explain me ?

Collapse
 
wangonya profile image
Kelvin Wangonya

I needed this today. Thanks :)

Collapse
 
dimpiax profile image
Dmytro Pylypenko

Don't forget about IBM investment in Swift as server-side language.

Collapse
 
dameandaemon profile image
Manuel Abarca

One language to rule them all xD

Collapse
 
travelerspb profile image
Nikolay Belov

All these companies uses Node for front-end servers only, to server content to users.
No one in clear mind will ever use Node for backend, for business logic.