The slides of my February 12, 2014 talk at Santa Barbara on Rails
Reclaim your architectureStephan Hagemann
View Slide
Rails developers?
STEPHANGERMANGERMANYBOULDERROCK CLIMBINGWHITEMALENETHERLANDSCYCLINGDIVINGCONSULTANTRUBYRAILS GOXINGPIVOTAL LABS
Labeling in Softwaredevelopment
NoRails appstarts with a namespace
Allgems start with a namespace
Rails Gems
AEH FACERails Gems
!!!!!!!!!+ active record+ active support + action controllerRails Gems
How can you tell whatstill belongs?
Try this!!Namespace everythingin your next app
Give yourself a box soyou can start thinkingoutside of it
Can youprove smallchunks?
Growing size
Exploding complexitySIZEPOSSIBLEINTERACTIONS
Effect of structureVS
SIZEPOSSIBLEINTERACTIONSReduced explodingcomplexity
Slashing complexitySIZECOMPLEXITYSPLIT!
Making chunks earlySIZECOMPLEXITYSPLIT!
Net win?SIZECOMPLEXITYSPLIT!$$
You’re going to do itoftenSIZEDOUBLESPLIT!COMPLEXITYNEW CODE IN ENGINENEW CODE IN ENGINE
Never build large appsto build large apps
github.com/shageman/the_next_big_thing
5 looser coupling3 gems1 one app4 engines8 HTTP SOA2 modules7 eco-system6 services
1The one app
HTTP://WWW.FLICKR.COM/PHOTOS/WIDNR/6589525327/
Examples!diaspora, CF CC,canvas
If you are in the situationwhere you’re reading sometext, investigating, trying tofigure out what is going on...That is a very good propertyof a detective novel and avery bad property of code.!Martin Fowler
ANNOYANCEENTRYSTRUCTURE
2The modularized app
HTTP://EECUE.COM/P/31426/METAL-RECYCLING-YARD.HTML
+A higher level structure
ANNOYANCEEMAILSIGNUPSTRUCTURE
3The gem component app
+Provable independence
Choose modules that tellthe story of the systemand contain a cohesiveset of conceptsEric Evans
HTTP://WWW.SMASHINGMAGAZINE.COM/INFORMATION-AND-INSTRUCTIONAL-SIGNS-PART-1/
4The Rails component app
+Provable independence forRails
Rails Engines
EMAILSIGNUPTEASERSTRUCTUREANNOYANCE
5The loosely-coupled app
+Clearer responsibilities
EMAILSIGNUPTEASERSTRUCTUREANNOYANCEEVENTCOUNTER
6The service-oriented app
+Reduced surface area
588 194LOGGER::COUNTEVENTCOUNTER::*.METHODS.COUNTLOGGER361 115
588 194LOGGER::COUNTEVENTCOUNTER::*.METHODS.COUNTLOGGER361 115- OBJECT.METHODSLOGGER::COUNT LOGGER394 0247 1
7The eco-system app
gem build event_counter..
gem push event_counter..
8The HTTP SOA app
PICTURE HERE
STRUCTUREEMAILSIGNUPTEASERANNOYANCEEVENT COUNTER
9Architecture the reclaimedyears
HTTP://WWW.CONFREAKS.COM/VIDEOS/759-RUBYMIDWEST2011-KEYNOTE-ARCHITECTURE-THE-LOST-YEARS
well, we just did that
Thanks!Stephan Hagemann@shageman[email protected]