There was a backlash on the web this week when the Angular team unveiled some of their details about v2.0. Some of the major gripes where:
- New AtScript language (a JS superset, a la TypeScript)
- Overhauled HTML markup/templating
- Removal of many 1.x concepts (Controllers, $scope, etc.)
- Lack of transparency
The outrage is understandable, but I also completely understand the Angular team's decisions. None of this really matters though in the long run.
What matters is hyperlinks. The more people blog and tweet about any tool, good or bad, the better for the business surrounding the tool over the long term. JS frameworks these days, like most things in a crowded market, are almost as much about search engine marketing as they are engineering.
For example, I always see charts like these used to justify choosing Angular:
Search engine metrics are a terrible way to make an important architectural decision. Sure, you want to try and measure the size of the "community" or "mindshare" and use the wisdom of crowds, but numbers like these are easy to game and can be misleading. Another example is comparing Stack Overflow topics. Do you really think AngularJS is more popular than Ruby? Of course not, it generally means people have slowed down asking questions, which naturally happens over time.
I'm not picking on Angular or implying their engineers are rocking the boat for nefarious purposes. I'm a fan of Angular and other tools like it. I am saying that any sort of dramatic cheese moving is an opportunity for trainers, publishers, tool vendors and biased consultants to capitalize on the FUD, get more link juice, and profit in the long run.
If you're in a position where you're choosing (or reconsidering) a JS library/framework for your project don't freak out or join a cargo cult. I know it can be daunting with the current state of the web, especially if you're new to this sort of thing.
There is some good objective guidance out there. There are also lots of good comparison articles and repos too. Unfortunately lots of this material is either too limited in scope (by necessity) or quickly becomes out-of-date as the libraries evolve. Also, the scope of these tools can vary quite a bit so it's rarely apples-to-apples. Then you need to swim in the muddy water of content trying to sell you something and some just plain awful hyperbole-laden clickbait. So what do you do?
Choosing any tool is about trade-offs, sweet spots, and discovering what is truly important to you. There are no shortcuts. My advice:
- Be conscious of who ultimately stands to profit from whatever content you are currently reading.
- Take the time to actually try things. Yes this takes time/money/focus but there is no substitute for spiking.
- A learning curve is a trade-off best experienced first-hand. Ride it for yourself, your teammates will eventually need to do the same.
- Embrace the fact that the web technologies are ephemeral. That's part of their charm. Be ready to refactor and replace things. Automated tests are very helpful here.
- Remember you can always opt for composing your own solution out of small libraries that each do one thing very well instead of choosing an all-in-one framework. It's not for everybody but it does work quite well.
- Seek advice from your local community. Get unbiased professional help if you are short on time.
- Understand the architectural patterns as much as you do specific implementations. For example, your skin should crawl when you see
$("#my-button").on("click", doStuff)in your controller, regardless of the framework. Similarly, just because a tool provides unit testing capabilities doesn't mean you instantly know how to write good tests.
- Consider the history and long-term strategy (financial backing, business model, motivation) of whatever tool you are considering.
Building competitive apps on the modern web is challenging. It would be done by machines already if it were easy. Gone are the days of monolithic, stable technology stacks with decade-long churn cycles. Maybe things will consolidate eventually but for now you need to roll up your sleeves. You can do it. You may actually have fun along the way.