Key Takeaways
- Local Storage- Early on in the video he mentions that he uses local storage a lot to improve performance. This makes sense, and we know that of cookies, cache, etc. the local storage is the best because it will stay saves even after everything is closed and turned off (that is what you wanted, right?).
- Directives as "Reusable Things" - Jim talks briefly about his experience working with the ui designer and how he says to himself, "Oh, we're using this thing in a lot of places. Let's make it a directive!". I think this makes perfect sense. A directive can just be an html tag that you stick in the HTML wherever it's needed (although in 1.5 you might make it a 'component' instead of a directive).
- Angular on backend?? - He says, "Angular isn't great for everything", but then he starting talking about how Angular isn't good for the backend and how he wants to rewrite the backend in Angular (~6:00 in the video). First of all, I didn't even know 'Backend Angular' was a thing. And second, that's just weird. If I was writing a backend I would just use NodeJS, or even better: Node-Red.
- It's interesting that he mentions a blog post by Joel Hooks (the big egghead.io instructor) that basically says, "Jquery is a Crutch" and that you should just use the jqLite with Angular. I avoid using jquery selectors as much as possible, but honestly when I run to Gulp-Angular generator to scaffold a new project I usually just go with the default choice which is described in the yeoman answer as, "jQuery 2.x (new version, lighter, IE9+)".
- Memory Leaks - It was very interesting to heard his story about how they found huge memory leaks in the application. Basically, they had a clock directive that was calling a $timeout every second, and the memory was piling up. I was surprised that his performance profiling tools was just regular out chrome dev tools! He said the app would go up to several hundred megabytes and then just crash, and even showed the code that fixed the leak (calling the cancel method on the timeout that is triggered every second),