Author: Parris Khachi
My 15 minute braindump
Life used to be simple
Then life got complicated
10 requests later our JS can now run
Sooo many files!!!
Game: Find the Dependencies
Answer: Some of these?
You forgot a file somewhere...
What happens when a dev needs to do this multiple times per day? And ultimately gets hit with that feeling?
Answer: I'll just not reuse any code ever. Maybe I'll just quit.
We'll fix it!
Game: What are the dependencies?
How about here?
So wait... How did you integrate it at Eventbrite?
Questions that came up
- Wait it is Async? How does that work in production?
- How do you unit test now? How do you `x` now?- How about all the legacy files? How does it integrate?
Lots of Research
CommonJS vs. AMD... what are the options?
Async? How about Production?
Loading hundreds of files separately results in poor performance
Benefits of Async Feature Loading
By reducing the initial file size we:
- reduce js file download time
- reduce js compile time on page load
- modularize features
Example (multipage site, with common bundle and async):
How do you do `x`...
not a problem, there are online resources for every situation
Jasmine? Unit Testing?
Unit Testing PT2
Jasmine + Grunt
The hardest part isn't technical actually
- Convince people it is complicated/unmanagable
- Show business value (faster development)
Ultimately you'll get skepticism...
this is obviously complicated (400 files, 300kb code)
this is complicated but less obviously so (~50 files)
No feathers ruffled...
The feathers didn't even know I was there.
Oh yea we are hiring: https://www.eventbrite.com/jobs
Come by our booth!
By Parris Khachi