The Evolution of Facebook’s Mobile App Architecture
summary
Facebook moves from an HTML5 webview to native and faces a 30-second startup on iPhone 4, fragile runtime crashes from string IDs, and sprawling inter-module dependencies. The team removes the early initializer, introduces a synchronous pre-fetch API, replaces dynamic modules with static C function mappings generated from Buck metadata and JSON, and validates navigation at build time. The result is faster startup, eliminated missing-module crashes, and pluggable lightweight implementations via Buck-based code generation.
AI-written summary · about
chapters (12)
- 0:00Intro
- 0:16History (2007-2010)
- 2:01Building a Screen (2012)
- 3:30App Startup Time
- 4:00Flaw #2: Runtime failures
- 4:31Runtime failures A code-sharing nightmare.
- 8:07Breaking apart FBAppModule Moved away from runtime object discovery - static mappings.
- 8:45C Functions + Static Mappings
- 11:30Generating metadata
- 12:20Generating code via using metadata
- 13:19Adding Validation to Code Generation
- 14:53Fixing the Dependency Issues Lightweight objects which add metadata to the graph. Validation checks 1:1 mapping between nav objects and modules.
related talks
21mTwo Mobile Transformers
32mThe Next Evolution of Facebook Platform for Mobile
17mBuilding The New Facebook With React and Relay
30mRebuilding Facebook Chat
21mThe Art of Changing Large Software Systems in Place
14mBuilding the New Facebook with React and Relay
46mMobile: Past, Present, Future - Tech Choices and Architecture Impact
41mApps vs Web: Lesson from Zappos.com
