Slide 1

Slide 1 text

Rails Components @ RMR 2015 Stephan Hagemann, Jeff Taggart @shageman, @jetaggart

Slide 2

Slide 2 text

Agenda 1. Who are you? And why components? 2. What are components? 3. The structure of your app 4. Real life example: The structure of P2Bi 5. The first refactor @shageman, @jetaggart

Slide 3

Slide 3 text

Who are you? Why components? @shageman, @jetaggart

Slide 4

Slide 4 text

Jeff… Stephan... @shageman, @jetaggart

Slide 5

Slide 5 text

What are components? @shageman, @jetaggart

Slide 6

Slide 6 text

https://github.com/barinek/uservices @shageman, @jetaggart

Slide 7

Slide 7 text

a context explicit dependencies @shageman, @jetaggart

Slide 8

Slide 8 text

Creating an application based on components creates constraints that will improve the overall maintainability of your app @shageman, @jetaggart

Slide 9

Slide 9 text

Creating an application based on components creates conversations that will improve the overall maintainability of your app @shageman, @jetaggart

Slide 10

Slide 10 text

The structure of your app @shageman, @jetaggart

Slide 11

Slide 11 text

@shageman, @jetaggart

Slide 12

Slide 12 text

@shageman, @jetaggart

Slide 13

Slide 13 text

@shageman, @jetaggart

Slide 14

Slide 14 text

@shageman, @jetaggart

Slide 15

Slide 15 text

Architecture Sketching Exercise @shageman, @jetaggart

Slide 16

Slide 16 text

Real life example: The structure of P2Bi @shageman, @jetaggart

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

JEFF: ARCHITECTURE DIAGRAM @shageman, @jetaggart

Slide 19

Slide 19 text

@shageman, @jetaggart

Slide 20

Slide 20 text

Discussion of P2B Code @shageman, @jetaggart

Slide 21

Slide 21 text

The first refactor @shageman, @jetaggart

Slide 22

Slide 22 text

For this example application, your imaginary client, who has limitless time and budget (unlike clients in the real world), wants you to develop a ticket-tracking application to track the company’s numerous projects. @shageman, @jetaggart https://github.com/rubysherpas/r4ia_examples

Slide 23

Slide 23 text

github.com/shageman/r4ia_examples gist.github.com/shageman/ 89d869ef8539f78312b0 @shageman, @jetaggart

Slide 24

Slide 24 text

Pros and Cons of persistence extraction ● mechanical refactoring (i.e., fast) ● shows entanglement of model layer ● works on every app ● scriptable ● creates a sample and pattern ● It does (not yet) create a meaningful “domain component” @shageman, @jetaggart

Slide 25

Slide 25 text

Discussion of extraction script @shageman, @jetaggart

Slide 26

Slide 26 text

Extraction exercise for everyone’s apps @shageman, @jetaggart

Slide 27

Slide 27 text

Wrapping up @shageman, @jetaggart

Slide 28

Slide 28 text

Working on it… 50% off: leanpub.com/cbra/c/rmr15 @shageman, @jetaggart

Slide 29

Slide 29 text

http://cbra.info Link collection about CBRA @shageman, @jetaggart

Slide 30

Slide 30 text

Check out: http://lotusrb.org/ Lotus MVC @shageman, @jetaggart

Slide 31

Slide 31 text

Thanks! @shageman, @jetaggart