Modern JavaScript Development Is Hard

Nilson Jacques
Share

It’s not uncommon these days to see people complaining about just how complex JavaScript development seems to have become. I can have some sympathy with that view when it’s coming from someone new to the language.

If you’re learning JS, it won’t take long for you to be exposed to the enormity of the ecosystem and the sheer number of moving pieces you need to understand (at least conceptually) to build a modern web application.

Package management, linting, transpilation, module bundling, minification, source maps, frameworks, unit testing, hot reloading… it can’t be denied that this is a lot more complex that just including a couple script tags in your page and FTPing it up to the server.

Some people who have been involved with web development for years are still pining for those ‘good old days’, and it’s this kind of complaining that I have much less sympathy for. One such comment I read this last week claimed that web development had been hijacked by those who enjoy using the command line and writing JSON config files.

For a long time, JavaScript was looked upon by many as a joke; a toy language whose only real use was to add non-essential eye-candy, such as mouseover changes, and was often a source of weird errors and broken pages. The language is still not taken seriously by some today, despite having made much progress since those early days. It’s not hard to have some sympathy with PHP developers.

For better or for worse, JavaScript was (and still is) the only language supported natively by the vast majority of web browsers. The community has worked hard to improve the language itself, and to provide the tooling to help build production-grade apps. I find it ironic that now people attack JavaScript development for being “too complicated”. Unfortunately, you just can’t have it both ways.

JavaScript developers are now some of the most in-demand (and well compensated) in the industry. Is there any reason to think that it should be ‘easy’? Try talking to a Java or a .NET developer; both these technologies have large ecosystems and build tooling setups for developing production-quality apps. And as for config files, many Java tools have XML files coming out of their… ears.

A lot of JavaScript tutorials often include things like module bundling and transpilation, because writing modular code with the latest language features are skills that are in demand in the job market. They are the necessary pieces for building large, complex applications in a team environment. Keep in mind that a lot of these build tools and development techniques are entirely optional. No one is forcing you to use them for your projects. Like all tools, they are a trade-off: they solve specific problems, at the cost of increasing your project’s complexity (in one form or another). Nothing is stopping you writing plain old ES5 JavaScript files and linking them to your HTML with script tags. You can even pull in frameworks like React and Vue from CDNs if you want to.

Are you happy with JavaScript’s evolution, or has modern web development taken all the joy out of coding for you? I’d be very interested to hear your thoughts on this, so please let me know in the comments or on Twitter.

PS. If you are new to JavaScript development or are coming back to the language after an extended break, be sure to check back tomorrow for our guide to the anatomy of a modern JavaScript application!