Slide 1

Slide 1 text

Reclaim your architecture Stephan Hagemann

Slide 2

Slide 2 text

Rails developers?

Slide 3

Slide 3 text

STEPHAN GERMAN GERMANY BOULDER ROCK CLIMBING WHITE MALE NETHERLANDS CYCLING DIVING CONSULTANT RUBY RAILS GO XING PIVOTAL LABS

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Labeling in Software development

Slide 7

Slide 7 text

No Rails app starts with a namespace

Slide 8

Slide 8 text

All gems start with a namespace

Slide 9

Slide 9 text

Rails Gems

Slide 10

Slide 10 text

AEH FACE Rails Gems

Slide 11

Slide 11 text

! ! ! ! ! ! ! ! ! + active record + active support + action controller Rails Gems

Slide 12

Slide 12 text

How can you tell what still belongs?

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Try this! ! Namespace everything in your next app

Slide 15

Slide 15 text

Give yourself a box so you can start thinking outside of it

Slide 16

Slide 16 text

Can you prove small chunks?

Slide 17

Slide 17 text

Growing size

Slide 18

Slide 18 text

Exploding complexity SIZE POSSIBLE INTERACTIONS

Slide 19

Slide 19 text

Effect of structure VS

Slide 20

Slide 20 text

SIZE POSSIBLE INTERACTIONS Reduced exploding complexity

Slide 21

Slide 21 text

Slashing complexity SIZE COMPLEXITY SPLIT!

Slide 22

Slide 22 text

Making chunks early SIZE COMPLEXITY SPLIT!

Slide 23

Slide 23 text

Net win? SIZE COMPLEXITY SPLIT! $ $

Slide 24

Slide 24 text

You’re going to do it often SIZE DOUBLE SPLIT! COMPLEXITY NEW CODE
 IN ENGINE NEW CODE
 IN ENGINE

Slide 25

Slide 25 text

Never build large apps to build large apps

Slide 26

Slide 26 text

github.com/shageman/ the_next_big_thing

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

1 The one app

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

Examples ! diaspora, CF CC, canvas

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

ANNOYANCE ENTRY STRUCTURE

Slide 33

Slide 33 text

2 The modularized app

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

+ A higher level structure

Slide 36

Slide 36 text

ANNOYANCE EMAIL SIGNUP STRUCTURE

Slide 37

Slide 37 text

3 The gem component app

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

+ Provable independence

Slide 40

Slide 40 text

Choose modules that tell the story of the system and contain a cohesive set of concepts Eric Evans

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

HTTP://WWW.SMASHINGMAGAZINE.COM/INFORMATION-AND-INSTRUCTIONAL-SIGNS-PART-1/

Slide 43

Slide 43 text

ANNOYANCE EMAIL SIGNUP STRUCTURE

Slide 44

Slide 44 text

4 The Rails component app

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

+ Provable independence for Rails

Slide 47

Slide 47 text

Rails Engines

Slide 48

Slide 48 text

EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE

Slide 49

Slide 49 text

5 The loosely-coupled app

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

+ Clearer responsibilities

Slide 52

Slide 52 text

EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER

Slide 53

Slide 53 text

6 The service-oriented app

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

+ Reduced surface area

Slide 56

Slide 56 text

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

Slide 57

Slide 57 text

588 194 LOGGER::COUNT EVENTCOUNTER::*.METHODS.COUNT LOGGER 361 115 - OBJECT.METHODS LOGGER::COUNT LOGGER 394 0 247 1

Slide 58

Slide 58 text

EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER

Slide 59

Slide 59 text

7 The eco-system app

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

gem build event_counter..

Slide 62

Slide 62 text

gem push event_counter..

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER

Slide 65

Slide 65 text

8 The HTTP SOA app

Slide 66

Slide 66 text

PICTURE HERE

Slide 67

Slide 67 text

STRUCTURE EMAIL SIGNUP TEASER ANNOYANCE EVENT COUNTER

Slide 68

Slide 68 text

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

Slide 69

Slide 69 text

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

Slide 70

Slide 70 text

9 Architecture the reclaimed years

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

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

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

well, we just did that

Slide 78

Slide 78 text

EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER

Slide 79

Slide 79 text

Thanks! Stephan Hagemann @shageman [email protected]