Why JavaScript Tookover: Modulization

Every web programmer worth their salt can look around at the state of application development and know that today is vastly different from five or ten years ago. Many of my colleagues wonder how JavaScript became such a dominant language for developing applications on the web. But the answer is actually quite simple. JavaScript is easier to write applications in.

I don’t mean that complex systems are easier, the problems that web applications face will grow to match the power of the tools that we have. But it’s very frustrating to hear people belittle and make fun of JavaScript for being a ‘easy’ language. My reaction is always, “Well of course it’s easier!” That’s the whole point of programming, programming exists to make solving increasingly complex problems easier.

How does JavaScript accomplish this? Well that’s easy, it’s modular. By no means am I saying that other languages are not modular, all languages in any enterprise application have to be modular. But the release of NodeJS in particular as well as packaging tools like Webpack and Browserify and NPM turned JavaScript from a sort of useful web tool into a powerful, fully armed language; here’s why.

Programming is all about Abstraction. In programming you don’t do the same thing over and over again, that’s what the damn computer is for! If you need to do something over and over again, you abstract it! It amazes me that seasoned programmers treat JavaScript with such contempt when this is such a fundamental concept in programming.

Modules allow for complex abstraction, and I mean complex. Take, for example, an NPM package like KnexJS or Request. Turning API communication into a two parameter function is some powerful stuff. Don’t get me wrong there are dangers in abstraction, especially for the impatient. But the benefits far out way the costs in terms of the complexity you can build up.

Many people complain about getting package crazy or about an application becoming nothing more than a collection of packages. Well that’s great! I’m not concerned about writing the most efficient possible methods for each individual function, but if you are more power to you! It really comes down to this: It’s better to let people who are passionate about something work on it, they will always come up with more secure, better, and efficient ways to do something than someone who is writing code that they aren’t interested in that someone else has written a million times better.

The same principal applies to crypto, but no one bats an eyelash about using AES all day do they?

What I’m trying to say is this, well functioning complex systems have most of their functionality abstracted away by more qualified people so the developer can focus on… can you guess it? Developing!

Leave a Reply

Your email address will not be published. Required fields are marked *