$30 off During Our Annual Pro Sale. View Details »

Software Components @ RUG-B

shagemann
November 03, 2016

Software Components @ RUG-B

shagemann

November 03, 2016
Tweet

More Decks by shagemann

Other Decks in Technology

Transcript

  1. Software Components
    Why - How - What
    Stephan Hagemann - 2016-11-03 - RUG-B
    @shageman

    View Slide

  2. WRITE BETTER
    SOFTW
    ARE
    @shageman

    View Slide

  3. @shageman

    View Slide

  4. WHAT IS A
    COMPONENT?
    @shageman

    View Slide

  5. Labeled Content
    + 


    Explicit Dependencies
    @shageman

    View Slide

  6. Labeled Content
    + 


    Explicit Dependencies
    @shageman

    View Slide

  7. @shageman

    View Slide

  8. Labeled Content
    + 

    Explicit Dependencies
    @shageman

    View Slide

  9. @shageman

    View Slide

  10. @shageman

    View Slide

  11. @shageman

    View Slide

  12. @shageman

    View Slide

  13. @shageman

    View Slide

  14. A depends on B …
    A
    B
    @shageman

    View Slide

  15. thus B can not depend on A
    A
    B
    X
    @shageman

    View Slide

  16. and this doesn’t work either
    A
    B
    X
    C
    @shageman

    View Slide

  17. X and Y as the same thing
    @shageman
    Y
    X

    View Slide

  18. Uncle Bob says
    … I like to draw these lines. Architecture is the art of
    drawing lines. With the interesting rule that once you have
    drawn the lines, all the dependencies that cross that line go
    in the same direction…
    @shageman

    View Slide

  19. This is why objects are typically not components…
    @shageman

    View Slide

  20. @shageman

    View Slide

  21. WHY COMPONENTS?
    @shageman

    View Slide

  22. Growing size
    @shageman

    View Slide

  23. Exploding complexity
    SIZE
    POSSIBLE
    INTERACTIONS
    @shageman

    View Slide

  24. Effect of structure
    VS
    @shageman

    View Slide

  25. SIZE
    POSSIBLE
    INTERACTIONS
    Reduced exploding
    complexity
    @shageman

    View Slide

  26. @shageman

    View Slide

  27. Communication
    @shageman

    View Slide

  28. Collaboration
    @shageman

    View Slide

  29. Creation
    @shageman

    View Slide

  30. Maintenance
    @shageman

    View Slide

  31. Comprehension
    @shageman

    View Slide

  32. HOW TO IMPLEMENT
    COMPONENTS?
    @shageman

    View Slide

  33. View Slide

  34. Code!!
    @shageman

    View Slide

  35. And in other languages?
    Ruby/Rails: Gems + Engines
    Java: Modules
    Go: packages
    Javascript: packages (in npm lingo)
    C: file compiling + linking
    @shageman

    View Slide

  36. HOW TO DETERMINE
    WHAT SHOULD BE A
    COMPONENT?
    @shageman

    View Slide

  37. SUMMARY
    @shageman

    View Slide

  38. Components =
    Labeled Content
    + 

    Explicit Dependencies
    @shageman
    WHAT

    View Slide

  39. Components improve…
    communication
    creation
    collaboration
    maintenance
    comprehension
    complexity
    @shageman
    WHY

    View Slide

  40. In Ruby and Rails…
    gems and engines can be used as components
    @shageman
    HOW

    View Slide

  41. @shageman

    View Slide

  42. @shageman

    View Slide

  43. https://leanpub.com/cbra/c/rugb
    @shageman
    Discount Code!

    View Slide

  44. Further reading
    https://leanpub.com/cbra
    http://cbra.info
    https://github.com/shageman
    http://appcontinuum.io
    @shageman

    View Slide

  45. THANKS!
    @shageman
    https://leanpub.com/cbra/c/rugb

    View Slide