Posts

Showing posts from June, 2014

Study and notes on "Angular for Large Scale Applications"

We're building a large scale angular app at twixt.it. So  Angular for Large Scale Applications is very interesting to me. Thanks to the presenters for sharing all this information, some good ideas here. Below are my notes & thoughts on each presentation (still working through all). Code Organization Patterns  Important for scaleability because Controllers grow as size of app grows Many DCM controllers have thousands of lines of code Avoid long controllers. Increase complexity. not Dry, not single responsibility Shows example of a Controller with over 3500 lines of code after moving "a ton of code out"..probably had 7k lines of code before reducing. Identified 5 patterns for reuse Regular Javascript 1. Inheritance - good for shared behavior but easy for hierarchy to become too deep and hard to share common code; How? a. use injector below in child controller and then         $injector.invoke(ParentController, this, {$scope, $scope})      b. ChildContro