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

The how and why of composable Magento

The how and why of composable Magento

Ask any developer and they will likely say reuse is very important to them. They have been taught or learned about DRYand now apply it to their code. However, what about features of the application? Many features are similar between applications so why would we repeat the writing of them?

Composable applications can be reused in a myriad of different ways you just combine the features the way you need them this time around.

This presentation applies this thinking to Magento. Showing how this can be done with the Magento 1.x branch and the module ecosystem. It then goes on to show how this thinking is at the core of Magento 2.0

But why should you develop with composable, modular code?

Because it answers the intention of reuse and DRY in a much more tangible way. This presentation will show you not just how but why, with some real World experience to go beyond the theory.

Alistair Stead

November 07, 2015
Tweet

More Decks by Alistair Stead

Other Decks in Programming

Transcript

  1. The HOW
    & WHY
    of composable Magento

    View Slide

  2. James Cowie
    Technical Team Lead Session Digital
    t/@jcowie gh/jamescowie
    Alistair Stead
    CTO Session Digital
    t/@alistairstead gh/alistairstead

    View Slide

  3. Reuse...
    verb |riːˈjuːz| [ with obj. ]
    use again or more than once: the tape could be magnetically
    erased and reused.
    noun |riːˈjuːs| [ mass noun ]
    the action of using something again: the ballast was cleaned
    ready for reuse.

    View Slide

  4. Don't Repeat
    Yourself⌘
    ⌘ Cut: Command ⌘ - x, Copy: Command ⌘ - c, Paste: Command ⌘ - v

    View Slide

  5. “Every piece of
    knowledge should have
    one and only one
    representation.”
    — Dave Thomas and Andy Hunt

    View Slide

  6. Inheritance

    View Slide

  7. Traits & Mixins?

    View Slide

  8. Composition

    View Slide


  9. Interfaces

    View Slide

  10. Modules for reuse

    View Slide

  11. View Slide

  12. View Slide

  13. modman

    View Slide

  14. Composer

    View Slide

  15. Magento - Composer

    View Slide

  16. packages.firegento

    View Slide

  17. Versioning
    1.0.2

    View Slide

  18. Composable
    Magento

    View Slide

  19. Service contracts

    View Slide

  20. Dependency Injection

    View Slide

  21. Abstraction
    away from the
    framework

    View Slide

  22. The naked
    Magento module

    View Slide

  23. Your value as an engineer
    is not the sum of the code
    you have written
    — LoC !== $$

    View Slide

  24. Ephemeralization

    View Slide

  25. Doing more with lessFuller, 1938
    Fuller, 1938 Buckminster (Bucky) Fuller

    View Slide

  26. Reuse through reduced MASS

    View Slide

  27. Building LESS, well!

    View Slide

  28. Thank you...

    View Slide

  29. View Slide

  30. View Slide

  31. [We are hiring...]

    View Slide

  32. Credits
    • https://skillsmatter.com/skillscasts/6433-business-logic-a-
    different-perspective
    • https://www.youtube.com/watch?v=X8lqnO7aYe0

    View Slide