OdeToCode IC Logo

Thoughts on Angular 2.0

Thursday, November 13, 2014

The Great Wave off KanagawaNeil Young once sang how “every wave is new until it breaks”. The line was a poke at trendiness in the music industry, but I find the lyrical snippet is applicable to software development, too, in a number of subtle ways.

There has been a lot of turmoil surrounding the future direction of Angular, which is fair. The preview and announcements made for Angular 2.0 during ng-europe were dramatic and conveyed no empathy for the customers and development teams who have taken a dependency on the framework. Those people are left wondering when the ng-wave will break.

The Blessings and Curses of Backwards Compatibility

Web developers have always faced incompatibilities, but have also been fortunate enough to build software on top of a set of technologies and standards that have diligently preserved backward compatibility. This diligence allows the nearly 20 year old web page for the animated movie Space Jam to live on. We’ve been accustomed to building software using web standards that keep working into the future. Stability is good for business.

But backward compatibility has a price. I believe the web moves at a snails pace, which is contrary to popular opinion. However, compare the evolution of the JavaScript language to some of its peers like C# or even Java. Next year’s ECMASCript 6 release is the first big move forward for the language in nearly 20 years. Also consider the XMLHttpRequest API. The API is central to today’s applications, but it has taken the industry 15 years to standardize the API  and build the tools to make mainstream developers productive with asynchronous requests and dynamic DOM updates.

Should Angular 2.0 be backward compatible? Or should Angular 2.0 follow Py3k?

Python 3.0, also known as “Python 3000” or “Py3K”, is the first ever intentionally backwards incompatible Python release. There are more changes than in a typical release, and more that are important for all Python users. Nevertheless, after digesting the changes, you’ll find that Python really hasn’t changed all that much – by and large, we’re mostly fixing well-known annoyances and warts, and removing a lot of old cruft.

Surfing the Waves of Change

Web development feels like a fast changing environment, but a closer look will show we mostly churn in the turbulence of small, incremental improvements. It’s rare for a wave to arrive and move everyone forward.

I still believe Angular 1.x is the best wave to ride today. I already have applications in production with Angular 1.2, and at least one more on the way with 1.3.  With the core Angular code base being only 25k lines of JSDoc’ed, tested, working, healthy code, I believe the wave can keep rolling for years to come.

I also believe Angular 2.0 should be a new wave that makes a break from Angular 1.x and evolves without being encumbered by backward compatibility or designs for an easy migration path. We’re still early in the history of application development on the web, and there will one day be a newer, bigger, better swell. It’s name might be Angular 2, or maybe something entirely new will come along. That’s life in the rough seas of web development, where you can either fight the waves and drown, or surf the waves and stay on top.

Gravatar Douglas Starnes Thursday, November 13, 2014
As a Python programmer, one of the biggest problems in the community is getting rid of the 2.x code. Basically, they had to stop innovation on Python 2.x (there will allegedly not be a Python 2.8) and give no choice but to move to 3.x or be left behind. Apple does similar things. And yes, Python 3 is 'better' but so many people were able to get the job done with Python 2 they just stuck with it. I only recently made the move. With the base of people using Angular right now, the Python lesson would be a good one for them to look at before they make too many drastic decisions. Python has had a hard time pulling it off. Of course marketing helps a lot too and Angular has that. :)
Gravatar Martin Kirk Friday, November 14, 2014
People are still using jQuery... And that has been a VERY bumpy ride, where 3 consecutive versions had breaking changes.
Gravatar Prasad Honrao Friday, November 14, 2014
Community [including me] got totally distracted with the "RIP" part. Perfect example of how NOT to present. I had to reach out to different Pluralsight authors, including you, to understand what's the impact, what is good / bad etc. IMO Angular 1.3 is the best option as of now. It's important to keep a watch on what's cooking in Angular 2.0 [& ECMAScript 6] and expect more changes to it.
Gravatar The Dude Abides Monday, November 17, 2014
Just write vanilla javascript. And only support modern browsers. Can't go wrong.
Gravatar Phillip Wednesday, November 19, 2014
Angular 2, what it's trying to achieve, will be great, but IMO it should NOT be called Angular. It should be released under a new name, and if the core devs want to abandon what Angular is, give it up to the community and put other people in charge. They have basically said "fuck you" to all existing users of Angular. Any investment now is absolutely worthless.
Gravatar Oleg Wednesday, November 19, 2014
It definitely feels as though the current wave of Angular 1.X is going to be completely replaced soon and the decision on whether or not to keep developing in Angular 1.39(X) will be obsolete pretty soon. Thoughts?
Gravatar Chris Thursday, November 20, 2014
I love the surfing analogy... great way to think of web development.
Gravatar Tahir Wednesday, December 3, 2014
I am a pretty big fan of Scott Allens videos as well as his opinions. On this I have to disagree with him. I have been using angular for over a year now and after learning more javascript libraries and javascript in general, I'd have to say that using angular (or any javascript FRAMEWORK altogether) that coerces you into building an app a certain way is a fail. After many years of doing web development, I found what works is vanilla.js, jquery (they've had minor breaking changes but a great migrate pluggin that allows for easy fixes), and knockout for two way data binding. I've discovered some other neat javascript libraries such as a templating library like handlebars.js and underscore.js that allows you to work with collections. I would recommend investing more time into learning javascript techniques and patterns rather than relying on frameworks that may die off. People don't like jquery because it invites DOM manipulation but you can avoid doing that by using other libraries that I mentioned above and learning other javascript patterns (like the module pattern) out there.
Gravatar Tor Sunday, December 7, 2014
Really enjoy working with frameworks like Angular, Knockout etc, but I try to create clean decoupled javascript logic and models that don't rely on a specific framework directly. The natural way to do this in Angular is to rely on services, which only require Angular in a minimal way for DI packaging. Then you can rely on the framework centric pieces like controllers and directives when integrating your plain javascript model to compose the UI. This approach is much more resilient to change in the framework, and even makes it possible to change course and go to a totally different framework should you choose to in the future. Have summarized some of my thoughts on the topic here: http://www.syntaxsuccess.com/#/viewarticle/548149ce33d9be142d14c423
Comments are closed.