Thursday, March 12, 2015

Is AngularJS ready for the enterprise?

AngularJS is the hottest word in Web application development today. But that's no guarantee it will remain relevant tomorrow.



To be sure, AngularJS has many factors going for it. For starters, the JavaScript front-end application framework was developed and is maintained by Google, which knows something about the Web. For another, as co-creator Miško Hevery tells InfoWorld, "Rather than writing everything inside of JavaScript and then having a bunch of templates to generate the UI, [AngularJS allows you to] write a lot of it in HTML, and HTML drives the assembly of the application."
It is this power, and the simplicity it engenders, that perhaps more than all else has crowned AngularJS the most popular JavaScript framework today.
Whether this makes it safe for the enterprise, however, is up for discussion. For enterprises accustomed to 10-year support guarantees on the software they buy, the AngularJS habit of breaking backward compatibility as it rushes to the future may cause concern.
Yet there are reasons to believe that this time, it's different -- that AngularJS will remain widely used long after the media hype circus moves on to the next shiny framework.

Popular, oh, so popular

The Web application market has seen leaders come and go. SproutCore, for example, spent years as the top framework. But it was displaced by BackboneJS which, in turn, has given way to EmberJS, as Google search trends show. But nothing compares to AngularJS.
Developed in 2009 by Brat Tech engineers Miško Hevery and Adam Abrons, AngularJS was open-sourced not long after. Hevery took on the burden of continued development after joining Google. By December 2012, as this Google Trends chart shows, AngularJS had already started to separate itself from the pack:
Angular.js popularity explodesGoogle Trends
Angular.js searches took off like a rocket two years ago and left the other JavaScript frameworks in the dust
By 2015, at least in terms of general interest, AngularJS had rendered every other framework a rounding error. The same trend holds true in jobs requiring AngularJS experience, as data from Indeed, the developer jobs site, shows.
The only framework that seems to have a chance of taking the lead from AngularJS is ReactJS, a framework developed at Facebook and now finding currency with Netflix and other mega players on the Web.
Despite significant concerns (RethinkDB developer evangelist Ryan Paul, for his part, finds the "way it discourages proper separation of concerns [to be] crazy"), developer Jeff Waugh insists"everything [is] begin[ning] to taste more like React," as other frameworks follow its lead.
Why? Because, as systems automation engineer Jeff Schroeder declares, "React is simply that much better" with a story about native apps that "changes the game for mobile entirely."

Popularity ... at a cost

This is essentially what developers said about AngularJS when it first came out. In JavaScript frameworks, "flavor of the month" may be too generous. It's more like "flavor of the minute," with popularity and hype waxing and then waning in rapid succession.
Is there any reason to believe AngularJS will hold off ReactJS (and, in turn, hold off The Next Big Thing)?
One reason to believe in AngularJS is its popularity despite boneheaded moves. For example, it regularly breaks backward compatibility, forcing its adherents to relearn AngularJS development.
Commenting on this tendency to regularly break with its past, AngularJS critic Danny Tuppeny laments:
Our current codebase has parts that are over 10 years old; and we hope our new codebase will last this long too. It seems that if we start writing Angular today; we'll be forced to rewrite the frontend in three to four years at latest (and with the way apps are going, the frontend is likely to be a large codebase). This doesn't sound very attractive.... We need frameworks that are stable and supported long-term; not that are constantly inventing new concepts and being rewritten with breaking changes every 5 minutes.
I've argued that it may be necessary to break the Web to keep up with the pace of Web innovation. Nene Bodonkor, a mobile Web developer, for example, posits that frameworks may be so replaceable because they become complacent and don't keep up with the market's needs.
Not everyone agrees. EmberJS creator Yehuda Katz argues that "forcing everyone to rewrite everything every few years is the best way to slow things down."
 
EmberJS, therefore, along with Facebook's ReactJS and others, strives toward maximum backward compatibility. This makes these frameworks more enterprise-friendly.
And yet AngularJS dominates. Despite inflicting serious trauma on its most vocal adherents, it thrives.
Does that mean an enterprise can depend on it and build upon it? As an enterprise, can you trust it?

Ready for a different kind of enterprise computing

Michi Kono, CTO of Monsoon, a mobile and Web application development company, believes that the answer is an emphatic yes.
While Kono told me in an interview that he was "distraught over the news of Angular 2.0" and its backward (in)compatibility, he delved into the underlying technical decisions and feels that AngularJS core developers' "decisions made sense on a technical level, but they were terrible at communicating it."
Furthermore, "Since they use this framework internally at Google, I can only assume supporting enterprise and legacy versions is a huge use case for them as well. In the coming months, I'm sure we'll start to see migration discussions emerge as key features are committed to the 2.0 spec."
When I asked about how an enterprise should view AngularJS, Kono was clear: AngularJS does many things right to make it safe for enterprise consumption:
You have to look at what made (and keeps) Angular so much more popular than its competitors. The framework does not have strong opinions about conventions; this makes learning it much simpler. While some argue that this flexibility is a what makes it worse than opinionated frameworks such as Ember, that is only looking at the downside.
The ease of getting started enables more developers to learn it and its usage better adapts to other technologies you might use along side it. These reasons are hugely important to large organizations that need to hire and develop at scale. This is how Angular got to where it is, and will likely continue that momentum for the near term.
Beyond making it possible for large organizations to pull from a large population of AngularJS developers, Kono also notes, "Angular is 'lower level' than some of the other frameworks," which can "make it feel less like a framework and more like a toolbox." This toolbox approach makes it very flexible for using in a wide array of use cases, like adding a single button on a website within whatever other framework you might be working with.
Finally, Kono believes strongly that "typed" JavaScript will be a massive trend in 2015. Microsoft, Google, and Facebook are all trying to "upgrade JavaScript" in ways that "enterprises will appreciate," he says, as these efforts tend to "make JavaScript look really, really similar to Java (in a good way)!" Given that AngularJS 2.0 will be written in Google's typed JavaScript (AtScript), Kono expects "a ton of interest in the first next generation JavaScript framework that lets developers leverage it."

Is it right for you?

All of which are compelling reasons to give AngularJS a try, regardless of the size of your enterprise. But should you stick with it?
Rackspace vice president Van Lindberg jokes that the very thought of "staying power" and "JavaScript framework" coexisting in the same sentence is an error. He may be right.
But there's a big difference between hype and actual adoption, and AngularJS seems to have both. As Waugh points out, "In the Cambrian explosion of the Web, some [JavaScript frameworks] attract attention and lots of users. They stick around, get maintained."
AngularJS definitely meets that definition of "attention and lots of users."
The trick now, as Adobe Web developer Brian Leroux insists, is to "optimize your architecture for change or get locked into big rewrites without forward progress."
To put it another way, the modern enterprise needs to be able to embrace fast-moving change on the Web, which also implies the need to accept fast-moving change within frameworks like AngularJS that make Web application development simple and powerful.
This story, "Is AngularJS ready for the enterprise?" was originally published byInfoWorld.

No comments:

Post a Comment