Skip to content

Comment on AngularJS Performance in Large Applications

Comments

I disagree with 9.4 as I think you should try to use event emitting more. This is the best way to modularize your application and really separate your concerns.

For example, given a service in charge of dealing with the a part of user's data. All mutations should be done through the helpers given by the service and then it should emit an event telling everyone subscribed to deal with it and update themselves.

Doing it this way, you maintain much more sanity when you have to create a really reactive application.

Interestingly, this is essentially the React/Flux model in a nutshell.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.