How deeply should I integrate AngularJS into an enterprise component library?

191 views
Skip to first unread message

Matt Steele

unread,
Nov 6, 2013, 6:34:57 PM11/6/13
to ang...@googlegroups.com
I work for a large company, and we're looking to revamp our homegrown reusable component library. It's based off jQuery; has been around for 5 years, and has buttons, groupboxes, accordions, etc: very similar to jQuery UI.

We've also started building some applications with AngularJS. Right now we're building directives that call our component library with $watch, $apply, etc. This is kind of annoying.

We're considering building our next version of our component library with 100% Angular integration: only through a directive can a developer build a groupbox, etc. I like this idea, but am worried about what might fall through the cracks if we build this way.

So I'm looking for examples of folks that have build an enterprise library off Angular. Did you find instances where you wish you had a pure JS (or jQuery) API, rather than forcing folks to make an ng-app? And would you make the same decision now?

Owen M

unread,
Nov 7, 2013, 2:23:07 PM11/7/13
to ang...@googlegroups.com
My company is building a large application for enterprise use. A key difference is that our old version was built using MS Silverlight (before I came on the scene). As such we couldn't use any of the components in the re-write. We made the decision to not include jQuery in our application to ensure we fully embrace the way Angular does things for a while. This has a big benefit of very clean code. However, the speed of development has been hindered as we can't use nearly as many existing components and have to roll a lot of our own.

From what you've described, my suggestion would be to wrap your current components as Angular directives. That way you aren't losing that knowledge and effort, as well things aren't falling through the cracks. As time goes on, update and migrate those jQuery directives to a pure angular implementation. Improve the system over time. That would be my suggestion. This is assuming you have a large number of components. If it's only a dozen, perhaps just straight up Angular is best.

Cheers,
~Owen
Reply all
Reply to author
Forward
0 new messages