At the end of 2015, Magento launched v2.0 of the e-commerce platform. Magento powers some of the largest online stores, and boasts an impressive $100B in revenue through the platform!
Also, since the launch, there have been significant efforts by Magento to improve the developer community and experience. With over 6,500 certified developers, and over 200,000 active developers and users across 34 countries and six continents, Magento has postured itself as a staple e-commerce platform for mid-size and enterprise level retailers and B2B customers all over the world!
In this talk, David Stillson will be showing us the basics of the framework, some good design patterns to know about, and a rough overview of how routing and rendering work.
He'll also demonstrate how simple it is to get Magento up and running in a dev environment, and together, we'll build a simple module!
2. INTRO TO MAGENTO 2
WHAT IS MAGENTO?
▸ Magento is an Open Source E-commerce platform that is
available in two editions
▸ Community - Free to use, somewhat limited feature set
▸ Enterprise - Licensed on a sales volume basis, has more
advanced features out of the box
▸ Both editions are completely extendable/modify-able
16. INTRO TO MAGENTO 2
OUT WITH THE MVC, IN WITH THE MVVM!
▸ Model - handles all CRUD operations using Resource
Models and Collections
▸ View - template files that interact with a View Model ONLY
▸ View Model - A block object that will do any
programmatic reading of the CRUD models, request
objects, external systems, etc.
17. INTRO TO MAGENTO 2
SOLID PRINCIPLES
▸ S - Single Responsibility Principle
▸ A class should have one, and only one, reason to change.
▸ O - Open Closed Principle
▸ You should be able to extend a classes behavior, without modifying it.
▸ L - Liskov Substitution Principle
▸ Derived classes must be substitutable for their base classes.
▸ I - Interface Segregation Principle
▸ Make fine grained interfaces that are client specific.
▸ D - Dependency Inversion Principle
▸ Depend on abstractions, not on concretions.
18. INTRO TO MAGENTO 2
DEPENDENCY INJECTION PRINCIPLE
▸ Magento 2 uses dependency injection as an alternative to
the Magento 1.x Mage class. Dependency injection is the
concept of the external environment injecting
dependencies for an object instead of that object
manually creating them internally.
19. INTRO TO MAGENTO 2
DEPENDENCY INVERSION PRINCIPLE
▸ a coding principle that stipulates you use abstractions to
reduce code dependencies. This means that high level
classes should use the interface of a low level class instead
of working with it directly.
▸ The di.xml file maps an interface dependency to a
preferred implementation class.
25. What does M2’s layout
structure look like anyway?
Containers Blocks/Templates
Source: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/layout-overview.html
34. FURTHER STUDY AND RESOURCES
▸ Magento DevDocs
▸ http://devdocs.magento.com/
▸ Magento Code Samples
▸ https://github.com/magento/magento2-samples
▸ Alan Storm’s Blog
▸ http://alanstorm.com/
▸ Alan Kent’s Blog
▸ https://alankent.me/
▸ Twitter Hashtag
▸ #realmagento