What's so special about Google's AngularJS

Co-author of popular JavaScript framework cites dependency injection, directive concepts as differentiators

Misko Hevery, of Google, is the founding co-author of AngularJS, a popular JavaScript UI framework that has seen considerable growth lately. Recently, Hevery outlined plans for AngularJS 2.0, which will improve on dependency injection but cut support for older browsers. InfoWorld Editor at Large Paul Krill met with Hevery at the HTML5 Developer Conference in San Francisco this month to talk about what makes AngularJS tick.

InfoWorld: What is so special about AngularJS? Why is there so much interest in it?

Hevery: There's a lot of Web frameworks out there. What's unique about Angular is a couple of things. First of all, we have dependency injection, which is very unique. Nobody else has that. But I think that the thing that really hits it home for people is that we have this idea of a directive. Rather than writing everything inside of JavaScript and then having a bunch of templates to generate the UI, you write a lot of it in HTML and HTML drives the assembly of the application. It's kind of the reverse thing. It's very unique. Nobody else has this particular approach.

InfoWorld: When did you first publish AngularJS?

Hevery: It started back, I think, in 2009. Back then it was just a thing that I started with a friend of mine. We wanted to see if we could make it easier for Web designers, not necessarily Web developers, but Web designers, to sprinkle a little bit of extra HTML into their code so that they could turn a static form to something they could actually send in an email. The idea would be that you could [for example] have a mom-and-pop shop that sells pizza or something, maybe you could [have] a simple ordering system just by adding a bunch of these tags and they could send an email to the server.

InfoWorld: I saw AngularJS described as a framework for building single Web pages, but they're more dynamic than static. Is that pretty much what it's about?

Hevery: Yes. That was the beginning. What happened afterward is that I was working at Google, and I was working on a project, and I said, "You know what? This crazy idea I'm kind of doing in my free time as an open source thing, I'll bet you this could actually be useful for building big Web applications, not just for a small-time, mom-and-pop kind of thing." Google started paying attention and slowly it became my full-time job, which is to work on this framework.

InfoWorld: So Angular is HTML-enhanced Web apps? How is it enhanced for Web apps?

Hevery: We take HTML, which is really good at static documents, and through this concept of directives, we add new markup to HTML that turns static content into dynamic content. Hence we say it's the HTML-enhancer, or I like to say it's what a Web browser would have been had it been designed for Web applications.

InfoWorld: Where might AngularJS not be a good fit?

Hevery: That's a good question. A lot of people have surprised me because I always thought that building [of] games would not be a good fit. Angular was meant for the form-based Web. You fill out the form, you see some report of your stock portfolio or something like that. And games are something very, very different. But people surprised me because they keep building games with Angular as well. Really, the sweet spot is form reporting-based [development], which is what 80 percent of the Web is.

InfoWorld: What are some of the more-famous applications that were built with AngularJS?

Hevery: The nature of Angular [is] it tends to be mostly used for internal apps because those are mostly form-driven. But externally at Google we have a few apps that we're proud of. There's DoubleClick, for advertisers. We also have YouTube Leanback, which is actually also available on PlayStation. You can watch YouTube on your TV. Some parts of administrative [Google] App Engine consoles are written on top of Angular as well.

InfoWorld: How does Google leverage AngularJS?

Hevery: We use it internally for many of our applications. One benefit is that because you can be more productive with Angular, people get to build more tools, and through tools you can be a more efficient company.

InfoWorld: What does Angular mean? Where did you get the name Angular?

Hevery: That's a good question. Actually, it was made up by my friend who I started work with. His name is Adam Abrons, and he basically thought that HTML has angle brackets, so angle brackets, Angular.

This article, "What's so special about Google's AngularJS," was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest business technology news, follow InfoWorld.com on Twitter.

Mobile Security Insider: iOS vs. Android vs. BlackBerry vs. Windows Phone
Recommended
Join the discussion
Be the first to comment on this article. Our Commenting Policies