Frustrated by JavaScript?

Frustrated by JavaScript?

I decided to write this blog after reading this post of a frustrated developer (he goes by the nick pistacchio) who couldn’t create a simple single-page application (SPA) in JavaScript in several days. Typically frustration is a result of unmet expectations and this is the case here as well.

If pistacchio would decide to create a simple app using the JavaScript framework he already knew, he could achieve his goal in 2-3 days allocated for this job. The problem is that he decided to achieve two goals:

1. Learn what’s going on in the modern JavaScript ecosystem
2. Develop a simple SPA

The first task takes months of studying, but he had 2-3 days. As a result, he “got stuck in an analysis paralysis loop”. Such paralysis could have happened in any modern technology. Learning the syntax of a programming language is one thing, but mastering frameworks and the tooling is a completely different ball game. My main programming language is Java, and in the past I also was frustrated with JavaScript until I accepted three facts of life:

1. JavaScript is here to stay.
2. JavaScript is THE ONLY programming language that can run on any browsers and any old and new hardware.
3. You can run, you can hide, but you can’t escape JavaScript.

The fact that you can quickly learn how to write Hello World in JavaScript is not the reason to assume that JavaScript is a toy that should just work. You have to study it. Yes, there are way too many large and small libraries. Yes, there are several package managers. Yes, there are various automation tools. This means that you need time to get familiar with some of them and pick a reasonably small gentlemen set that works for you.

I’ve been developing Web applications with Adobe Flex framework for six years. This was the best Web framework I’ve ever seen (batteries included). So what? Flash Player is dead. Accepted it and moved on. I spent two years trying to find a JavaScript framework that would make me as productive as I was with Flex. None. Nada. Nyet.

There seems to be the light at the end of the tunnel though. Here’s what works for me now (subject to change):

Web framework and the language: Angular 2 with TypeScript
Package manager: npm
Preparing application bundles: Webpack
Unit testing: Jasmine with Karma
Deployment: npm scripts
IDE: WebStorm

If this list looks too long take a look at the skills section in the resume of any professional Java developer. If it has less than 10 Java-related tools and frameworks – it’s a resume of a junior developer.

I just came back from a large conference DevNexus where most of the attendees were Java developers. After my presentation on developing with Angular 2 and TypeScript one person stopped by and said, “I used to hate JavaScript, but now I’ll look at it again”. Please do, but take it seriously and allocate enough time for learning the JavaScript ecosystem. Manage your expectations.

P.S. If your JavaScript is a little rusty watch this video, which is an excerpt from one of the online trainings I ran for Java developers.

12 thoughts on “Frustrated by JavaScript?

  1. Sigh … the ecosystem is a mess. And that a necessary skillset is getting more similar to Java is a proof of that. There are so much more useful things to learn than the next JS framework.

  2. As pistacchio rightfully noted, JavaScript is not used any longer just for displaying “The current time is” on a simple Web page. Modern JavaScript is used for creating pretty complex Web applications. So if you want to be called a duck, you need to walk like a duck, quack like a duck, and look like a duck🙂

  3. “I also was frustrated with JavaScript until I accepted two facts of life:
    1. JavaScript is here to stay.
    2. JavaScript is THE ONLY programming language that can run on any browsers and any old and new hardware.
    3. You can run, you can hide, but you can’t escape JavaScript.”

    Which one didn’t you accept?

  4. Hi Yakov, what about Bower, Grunt/Gulp? Do you use these tools?
    Actually it would be really interesting to know more details about JS/Angular development environment, full-cycle development process and integration. Especially how it works in real-life projects.
    Thank you.

    1. Bower is pretty much dead (check the statistics of downloads there).

      So far using simple npm scripts works for me. If need be I’ll look at gulp.

      One day I’ll blog about the tooling/workflow we use.

  5. Agree with you on some points. As a 15years Flash/Flex developer who migrated to Angular/NPM/Webpack tooling, i would not say i’m frustrated with javascript, but clearly frustrated with “mentality” of other devs… That’s more a problem of developer community maturity in my point of view.
    Also true that at the time i migrated from Flex to JS i had no time for that, and a manager who looked at me like “javascript is easy if you cannot handle this in two days you are dead…” That can be very frustrating too…

    So again i’m not frustrated with javascript, but i’m frustrated with “javascript is easy myth” and “community immaturity”…

  6. Yes, Flex is dead but what are some real alternatives for a RIA/LOB/Desktop class application built on web. Where are the widgets, rich components? Extjs is the only one with comparable features yet is bloated, slow, expensive and already old. Kendo seems like a nice collection on the surface until you realize it’s missing basic layouting or you need a hack to add an id to a menu. I guess this type of application is also dead, too niche. Any suggestions? Thank you.

    1. We’re facing the same issue. The lack of a rich library of UI components stops us from migrating a large Flex app to the JavaScript-based app. We stated a new development with Angular 2, and sometime this year they will release the library Material Design 2 that will work with Angular 2. We’ll wait for it.

      We tried the Polymer library, which gives you a nice foundation for developing your own UI component and using third-party libraries, e.g. from Vaadin.

      You may also look at the PrimeNG library for Angular:

  7. Thank you for the response. This a game of hope of frustration. I am often thinking all this time searching, hoping and trying would be much better spent developing something in house (maybe this is why there are so many frameworks, and so many failures). This would also bring some small victories instead of mostly lost hopes. I guess the market for this kind of UI is so niched that we cannot expect much after all. Yet in this niche the need is real and is a sad regression that flex, a technology so old and daemonized is still years ahead of what we can do now.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s