Joined April 2013
·

Jason Dobry

Developer Programs Engineer at Google
·
Seattle, WA
·
·
·

Posted to Building large apps with AngularJS over 1 year ago

$location.search(state)

Refresh the page, cache is cleared.

There will be no request listed on the dev-tools network tab when a resource is retrieved Angular's cache.

As far as seeing improvement, there are other factors involved than just enabling the cache: network latency on your local machine vs latency between a user and your servers thousands of miles away, browser performance, etc. However, with 550kb, I would definitely expect to see a performance improvement. Something along the lines of hundreds of milliseconds to retrieve the resource from the server and 0-10ms to retrieve it from the cache.

It is abnormal to not see any performance improvement. I see performance jumps even when my resource is 20kb. If the cache is enabled, the performance gain should be obvious (orders of magnitude better).

Posted to Building large apps with AngularJS over 1 year ago

It seems like your idea would help with reducing boilerplate. It was tiring listing the Require.js file dependencies AND listing the angular DI dependencies in every file.

Posted to Building large apps with AngularJS over 1 year ago

You're absolutely right. That's what I meant, but it ended up being a poorly worded sentence.

Thanks!

p.s. angular-cache 2.0.0 is out tonight with a new website! http://jmdobry.github.io/angular-cache

Posted to Building large apps with AngularJS over 1 year ago

Good catch!

Posted to Building large apps with AngularJS over 1 year ago

"Breaking things apart" is not new, it's a part of fundamental programming design (decomposition). You should do that no matter what framework you're using. Angular Modules all configure the same injector, meaning that all Controllers, Directives, Services, etc. all get thrown into one bucket with zero name-spacing capability. Misko talks about the current state of Angular Modules and their (near) uselessness here: https://www.youtube.com/watch?v=ZhfUv0spHCY&t=34m19s.

Rather than using Angular Modules to decompose your app, divide things up by feature (or view) and implement that division in your file/folder structure. In the future when Angular Modules are more useful, you'll be able to lazy-load modules, at which point it will be very useful to put the code for different features (or views) into their own modules.

Posted to Building large apps with AngularJS over 1 year ago

Thanks!

Achievements
3,265 Karma
253,990 Total ProTip Views