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 full-size slide

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

    View full-size 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 full-size slide

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

    View full-size slide

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

    View full-size slide

  6. Traits & Mixins?

    View full-size slide


  7. Interfaces

    View full-size slide

  8. Modules for reuse

    View full-size slide

  9. Magento - Composer

    View full-size slide

  10. packages.firegento

    View full-size slide

  11. Versioning
    1.0.2

    View full-size slide

  12. Composable
    Magento

    View full-size slide

  13. Service contracts

    View full-size slide

  14. Dependency Injection

    View full-size slide

  15. Abstraction
    away from the
    framework

    View full-size slide

  16. The naked
    Magento module

    View full-size slide

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

    View full-size slide

  18. Ephemeralization

    View full-size slide

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

    View full-size slide

  20. Reuse through reduced MASS

    View full-size slide

  21. Building LESS, well!

    View full-size slide

  22. Thank you...

    View full-size slide

  23. [We are hiring...]

    View full-size slide

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

    View full-size slide