Web applications are massively shifting to the frontend, thanks to exciting new JavaScript / CSS technologies, expanding browser capabilities (visualizations, real-time apps, etc.) and faster perceived user experiences. However, client web applications can be a nightmare to maintain at scale, even for seasoned software architects and operations engineers. Deployment and production infrastructures are complex and rapidly changing. And, frontend JavaScript / CSS code ships to browsers worldwide, where errors and issues are notoriously difficult to systematically detect and diagnose.
In this talk, we will tackle the wild west of the frontend with pragmatic steps and seasoned advice from helping organizations from startups to Fortune 500 companies create some of the largest frontend web applications on the Internet. In particular, we will examine the many hard lessons gleaned from leading frontend application development and education for a team of 50+ engineers rearchitecting a top-five e-commerce site. Some of the topics we will cover include:
* Managing and building very large (500K+ line) frontend application / test code bases.
* Surviving production traffic and errors on the frontend and handling spikes like Black Friday / Cyber Monday for one of the highest traffic e-commerce websites in existence.
* How, where, and why your frontend application is likely to fail.
* Monitoring, logging, and debugging frontend web applications out in the wild.
* Automating checks, tests, and code introspection to protect your code in production.
* Creating an effective, fast, and engineer-friendly development-test-deployment frontend pipeline.
Whether your frontend application already supports millions of transactions a day or you are about to launch your first single-page-application, our aim is to prepare teams of all sizes for the most critical challenges and solutions facing modern frontend web applications.
25. Architecture Challenges
Browser is a single execution environment
Code size / duplication is critical
Hard to manage, easy to do wrong
"Cowboy" legacy vs. large scale organization
26. Let's look at the
architectural complexities
of just one page...
36. Build Challenges
Modern JS apps are complicated
(compression, polyfills, transpiling, etc.)
Multiple JS apps on the same page is even
more complex
Supporting development & production / CDN
37. Use a Build Tool
Choose an paradigm: AMD, CommonJS
Choose a build tool / loader: RequireJS,
Browserify, Webpack
Take time to learn & evaluate the tradeoffs
54. Our Meta JS Team
1.5 dedicated developers
6 "loaned" track developers
55. Our Meta JS Duties
~1 day of code review / week
Chat channel participation
Cross-track JS initiatives (i18n, multi-tenancy,
PCI, etc.)
56. Meta JS Benefits
Project-wide consistency & support
Help tracks consider other teams
Represent track interests in the core
More engineers to support the whole project
104. All Together Now
A "real" build
Organized code
The Meta team
Education
Code Review
Automate quality
Minimize risks
Require performance
Logging, Monitoring
Debugging helpers