Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MicroObjects Technical Practices 20180419

Quinn
April 19, 2018

MicroObjects Technical Practices 20180419

What practices are used to wire in the microObjects style? This presentation goes over the 12 primary practices that produce simple, understandable, testable code resulting in a highly maintainable product.

Quinn

April 19, 2018
Tweet

More Decks by Quinn

Other Decks in Programming

Transcript

  1. @TheQuinnGil https://QuinnGil.com
    µObjects

    View Slide

  2. @TheQuinnGil https://QuinnGil.com
    Who Am I?
    ● Quinn Gil
    ○ @TheQuinnGil
    ○ https://QuinnGil.com
    ● Professionally programming 20 years
    ● Passion for helping others write better
    ● Coding is my hobby
    µObjects

    View Slide

  3. @TheQuinnGil https://QuinnGil.com
    Single Responsibility
    µObjects
    to the extreme
    µObjects

    View Slide

  4. @TheQuinnGil https://QuinnGil.com
    Encapsulation
    µObjects
    ?

    View Slide

  5. @TheQuinnGil https://QuinnGil.com
    Encapsulation
    µObjects
    Behavior

    View Slide

  6. @TheQuinnGil https://QuinnGil.com
    µObjects
    Never Return Your Data

    View Slide

  7. @TheQuinnGil https://QuinnGil.com
    µObjects
    Never Return Your Data

    View Slide

  8. @TheQuinnGil https://QuinnGil.com
    Immutability - Externally Immutable
    µObjects

    View Slide

  9. @TheQuinnGil https://QuinnGil.com
    Immutability - Externally Immutable
    µObjects

    View Slide

  10. @TheQuinnGil https://QuinnGil.com
    Immutability - Externally Immutable
    µObjects

    View Slide

  11. @TheQuinnGil https://QuinnGil.com
    Immutability - Internally Immutable
    µObjects

    View Slide

  12. @TheQuinnGil https://QuinnGil.com
    Immutability
    µObjects

    View Slide

  13. @TheQuinnGil https://QuinnGil.com
    No ‘new’ Inline - Inversion of Control
    µObjects

    View Slide

  14. @TheQuinnGil https://QuinnGil.com
    No ‘new’ Inline - Inversion of Control
    µObjects

    View Slide

  15. @TheQuinnGil https://QuinnGil.com
    No ‘new’ Inline - Injection
    µObjects

    View Slide

  16. @TheQuinnGil https://QuinnGil.com
    No ‘new’ Inline - All Knowing
    µObjects

    View Slide

  17. @TheQuinnGil https://QuinnGil.com
    No ‘new’ Inline - All Knowing
    µObjects

    View Slide

  18. @TheQuinnGil https://QuinnGil.com
    No ‘new’ Inline - DIY
    µObjects

    View Slide

  19. @TheQuinnGil https://QuinnGil.com
    Anti-Pattern: Primitive Obsession
    µObjects

    View Slide

  20. @TheQuinnGil https://QuinnGil.com
    Anti-Pattern: Primitive Obsession
    µObjects

    View Slide

  21. @TheQuinnGil https://QuinnGil.com
    Anti-Pattern: Primitive Obsession
    µObjects

    View Slide

  22. @TheQuinnGil https://QuinnGil.com
    Anti-Pattern: Primitive Obsession
    µObjects

    View Slide

  23. @TheQuinnGil https://QuinnGil.com
    Anti-Pattern: Primitive Obsession
    µObjects

    View Slide

  24. @TheQuinnGil https://QuinnGil.com
    Anti-Pattern: Primitive Obsession
    µObjects

    View Slide

  25. @TheQuinnGil https://QuinnGil.com
    Anti-Pattern: Primitive Obsession
    µObjects

    View Slide

  26. @TheQuinnGil https://QuinnGil.com
    Encapsulate Relationships
    µObjects

    View Slide

  27. @TheQuinnGil https://QuinnGil.com
    Encapsulate Relationships
    µObjects

    View Slide

  28. @TheQuinnGil https://QuinnGil.com
    No Nulls
    µObjects

    View Slide

  29. @TheQuinnGil https://QuinnGil.com
    No Nulls
    µObjects
    Null Object Pattern

    View Slide

  30. @TheQuinnGil https://QuinnGil.com
    ‘if’ Only as Guard Clause
    µObjects

    View Slide

  31. @TheQuinnGil https://QuinnGil.com
    ‘switch’ & ‘else’ Are Always Evil
    µObjects

    View Slide

  32. @TheQuinnGil https://QuinnGil.com
    ‘switch’ & ‘else’ Are Always Evil
    µObjects

    View Slide

  33. @TheQuinnGil https://QuinnGil.com
    ‘switch’ & ‘else’ Are Always Evil
    µObjects

    View Slide

  34. @TheQuinnGil https://QuinnGil.com
    Composition Over Inheritance
    µObjects

    View Slide

  35. @TheQuinnGil https://QuinnGil.com
    Composition Over Inheritance
    µObjects

    View Slide

  36. @TheQuinnGil https://QuinnGil.com
    µObjects
    Interface Everything

    View Slide

  37. @TheQuinnGil https://QuinnGil.com
    No Statics
    µObjects

    View Slide

  38. @TheQuinnGil https://QuinnGil.com
    No Public Constants
    µObjects

    View Slide

  39. @TheQuinnGil https://QuinnGil.com
    Never Type Inspection or Reflection
    µObjects

    View Slide

  40. @TheQuinnGil https://QuinnGil.com
    No Asymmetric Marriage
    µObjects

    View Slide

  41. @TheQuinnGil https://QuinnGil.com
    No Asymmetric Marriage
    µObjects

    View Slide

  42. @TheQuinnGil https://QuinnGil.com
    No Asymmetric Marriage
    µObjects

    View Slide

  43. @TheQuinnGil https://QuinnGil.com
    Operating System Abstraction Layer
    µObjects

    View Slide

  44. @TheQuinnGil https://QuinnGil.com
    µObjects Practices
    µObjects
    ● Never Return Your Data
    ● Always Immutable
    ● No ‘new’ Inline
    ● No Primitive Obsession
    ● Encapsulate Relationships
    ● No nulls
    ● ‘if’ Only as Guard Clause
    ● ‘switch’ & ‘else’ Always Evil
    ● Composition Over Inheritance
    ● Interface Everything
    ● No Statics
    ● No Public Constants
    ● No Asymmetric Marriage
    ● OS Abstraction Layer
    An Object Does A Single Thing

    View Slide

  45. @TheQuinnGil https://QuinnGil.com
    µObjects - What do we get?
    µObjects
    Maintainability

    View Slide

  46. @TheQuinnGil https://QuinnGil.com
    µObjects

    View Slide

  47. @TheQuinnGil https://QuinnGil.com
    µObjects
    µObjects
    Single Responsibility
    to the Extreme

    View Slide

  48. @TheQuinnGil https://QuinnGil.com
    µObjects
    Resources
    https://QuinnGil.com

    View Slide