A gentle introduction to "architecture" presented at DrupalCon Paris, 2009. Intended for the casual and intermediate web developer interested in considering the bigger picture.
Work with clients who need sustainable sites
Training, Planning, and suffering
Dries has talked about this for years
Who here used to be a webmaster?
You didn’t go away - you became a developer.
“Eliminate the developer” - CCK, Views, Panels, OG, d7ux!
I wrote “Using Drupal” - code free site recipes!
Are we dying?
More pieces than ever
Pieces are bigger
Nontrivial changes require deep understanding
“No-code” requires knowing the code enough to avoid it
Sarah Winchester’s mansion
cool features.
total chaos.
no master plan.
cool features.
total chaos.
no master plan.
that’s software architecture.
this is not canon, it’s fuzzy.
What’s the difference between a dev and an architect?
Too quick to jump to modules, features, “can we do X?”
Need context: Winchester house was fine for its goal
“Divide articles into pages!” break up long articles, or increase clicks?
“We need a content staging server!” Or use workflow? OR NOT
“We need X in core!” Do we?
Balance Features, legacy code, performance, growth, real-world workflow, external environment (business AND tech), timelines, available resources
we “know” many of these, but must be explicit
the flip side: my grandfather was a machinist, and he hated architects.
understand the details too, even if you delegate
otherwise you’re just project manager, not an architect.
If you only have one option, you’re doing it wrong
Might be only one GOOD option
Understand goals & constraints lets you get the spirit of the requests, not just the letter
silos are good -- but only if they’re planned
mismatched APIs in core
overlapping modules, duplicated work, performance collisions in sites
this is why architects love their diagrams
Things you’re doing over and over (nodes, taxonomy, flag)
Things you’re doing that others have (Pattern language)
Christopher Alexander
Patterns aren’t magic: they are lessons that have been learned
"Use Wordpress."
"Farm that out to an outside service."
"Learn lessons from Movable Type's template system..."
"How does the django team deal with scaling?"
Don't have to become an expert at everything, but knowing how to learn from others - and get help from them - is critical.
increase page views!
more social features!
escape $400,000 a year CMS!
simplify editorial!
Publication cycle? User participation levels? Traffic? Servers? Migrating newsroom to drupal, or just display? Legacy systems? Priorities?
This is why specs are gold.
How will we test?
How will we launch/transition?
How will we roll out new stuff AFTER launch?
See the Economist presentation for a great example
How are we going to get there?
What portions are most important?
Become wordpress?
Become django?
Facilitate distributions?
Avoid commitment?
Mostly volunteers
Shared hosting
Now Public (current client w/85,000 logged in users)
PHP Language
100 fewer lines of PHP?
10,000 new sites?
Code “feels better?”
Ghosts leave us alone?
Finding places where APIs collide
Finding cruft of half-implemented features
Eliminating things that are edge cases
Adding pieces that are constantly re-implemented
Not a code idea, but manifests in code
Split APIs (fapi, dbtng, menus, hooks...) from “features”
Push “features” to distros and profiles
Plan silos, reduce assumptions, allow specialization