lib/upworthy & mount it in routes.rb. 2. Migrate models and utilities. 3. Migrate assets. 4. Migrate front-end views and controllers. 5. Migrate CMS views to Bootstrap and use Rails controllers.
both front-end and back-end concerns. • Traffic spikes on public site could render CMS unusable. • Codebase becomes very large. God objects starting to appear.
split into. We chose two: www and cms. 2. Clone monorail into separate git repos to maintain history. 3. Split up controllers, views, assets and concerns.
applications. 5. Switch Fastly to point at new www app. Resulted in zero downtime. 6. De-duplicate code between the two apps, creating a core gem (mostly models) to keep code DRY.
to exercise the full system. • Commits across three different codebases (two Rails apps, one gem). • Specs run on three different codebases. • Coordinate versioning on the shared core gem. • Coordinate deploys amongst N apps. • Dependencies would get out of sync.
app: “umbrella” • Convert each existing app (www and cms) and the gem (core) into its own engine. First in its own codebase, then copy it over to umbrella with git subtrees. • Combine asset building and test suites
manage. • Each engine runs as its own app in production, but can both can be run together in one app for development. • When a small feature that involves both apps is built, that can be expressed in a single commit instead of three commits in three different codebases. • Specs can all be run at once.
emotional attachment. • Wait to make changes to your technical architecture until it really hurts. • It’s okay to take a really long time to migrate to the better solution. • Serve everything you possibly can from a CDN. • Remember: it’s just HTML, CSS, JavaScript, and JSON. Learn HTTP.