Reclaim your architecture @ sbonrails

Affa5b7b3a311fcf5f868859d586b410?s=47 shagemann
February 12, 2014

Reclaim your architecture @ sbonrails

The slides of my February 12, 2014 talk at Santa Barbara on Rails

Affa5b7b3a311fcf5f868859d586b410?s=128

shagemann

February 12, 2014
Tweet

Transcript

  1. Reclaim your architecture Stephan Hagemann

  2. Rails developers?

  3. STEPHAN GERMAN GERMANY BOULDER ROCK CLIMBING WHITE MALE NETHERLANDS CYCLING

    DIVING CONSULTANT RUBY RAILS GO XING PIVOTAL LABS
  4. None
  5. None
  6. Labeling in Software development

  7. No Rails app starts with a namespace

  8. All gems  start with a namespace

  9. Rails Gems

  10. AEH FACE Rails Gems

  11. ! ! ! ! ! ! ! ! ! +

    active record + active support + action controller Rails Gems
  12. How can you tell what still belongs?

  13. None
  14. Try this! ! Namespace everything in your next app

  15. Give yourself a box so you can start thinking outside

    of it
  16. Can you prove small chunks?

  17. Growing size

  18. Exploding complexity SIZE POSSIBLE INTERACTIONS

  19. Effect of structure VS

  20. SIZE POSSIBLE INTERACTIONS Reduced exploding complexity

  21. Slashing complexity SIZE COMPLEXITY SPLIT!

  22. Making chunks early SIZE COMPLEXITY SPLIT!

  23. Net win? SIZE COMPLEXITY SPLIT! $ $

  24. You’re going to do it often SIZE DOUBLE SPLIT! COMPLEXITY

    NEW CODE
 IN ENGINE NEW CODE
 IN ENGINE
  25. Never build large apps to build large apps

  26. github.com/shageman/ the_next_big_thing

  27. 5 looser coupling 3 gems 1 one app 4 engines

    8 HTTP SOA 2 modules 7 eco-system 6 services
  28. 1 The one app

  29. HTTP://WWW.FLICKR.COM/PHOTOS/WIDNR/6589525327/

  30. Examples ! diaspora, CF CC, canvas

  31. If you are in the situation where you’re reading some

    text, investigating, trying to figure out what is going on... That is a very good property of a detective novel and a very bad property of code. ! Martin Fowler
  32. ANNOYANCE ENTRY STRUCTURE

  33. 2 The modularized app

  34. HTTP://EECUE.COM/P/31426/METAL-RECYCLING-YARD.HTML

  35. + A higher level structure

  36. ANNOYANCE EMAIL SIGNUP STRUCTURE

  37. 3 The gem component app

  38. None
  39. + Provable independence

  40. Choose modules that tell the story of the system and

    contain a cohesive set of concepts Eric Evans
  41. None
  42. HTTP://WWW.SMASHINGMAGAZINE.COM/INFORMATION-AND-INSTRUCTIONAL-SIGNS-PART-1/

  43. ANNOYANCE EMAIL SIGNUP STRUCTURE

  44. 4 The Rails component app

  45. None
  46. + Provable independence for Rails

  47. Rails Engines

  48. EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE

  49. 5 The loosely-coupled app

  50. None
  51. + Clearer responsibilities

  52. EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER

  53. 6 The service-oriented app

  54. None
  55. + Reduced surface area

  56. 588 194 LOGGER::COUNT EVENTCOUNTER::*.METHODS.COUNT LOGGER 361 115

  57. 588 194 LOGGER::COUNT EVENTCOUNTER::*.METHODS.COUNT LOGGER 361 115 - OBJECT.METHODS LOGGER::COUNT

    LOGGER 394 0 247 1
  58. EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER

  59. 7 The eco-system app

  60. None
  61. gem build event_counter..

  62. gem push event_counter..

  63. None
  64. EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER

  65. 8 The HTTP SOA app

  66. PICTURE HERE

  67. STRUCTURE EMAIL SIGNUP TEASER ANNOYANCE EVENT COUNTER

  68. 5 looser coupling 3 gems 1 one app 4 engines

    8 HTTP SOA 2 modules 7 eco-system 6 services
  69. 5 looser coupling 3 gems 1 one app 4 engines

    8 HTTP SOA 2 modules 7 eco-system 6 services
  70. 9 Architecture the reclaimed years

  71. None
  72. HTTP://WWW.CONFREAKS.COM/VIDEOS/759-RUBYMIDWEST2011-KEYNOTE- ARCHITECTURE-THE-LOST-YEARS

  73. None
  74. None
  75. None
  76. None
  77. well, we just did that

  78. EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER

  79. Thanks! Stephan Hagemann @shageman stephan@pivotallabs.com