Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Magento 2 overview. Alan Kent

7,153 views

Published on

Magento 2 overview. Alan Kent

Published in: Technology

Magento 2 overview. Alan Kent

  1. 1. Magento 2 Overview Alan Kent Magento Chief Architect
  2. 2. MAGENTO 2 TIMELINE & GOALS
  3. 3. Release Approach 2014 2015 2016 2017 2.0 Dev Beta 2.0 Merchant Beta 2.0 Merchant GA 2.x Ongoing Releases 2.0 Dev RC WE WANT FEEDBACK! magento/magento2 (weekly code pushes)
  4. 4. Product and Software Versions CE EE Verticals? (Fashion & Apparel) 2.0 2.1 2.2 2.0 2.1 2.2 1.0 1.1 2.0 Modules Cart Catalog Sales 10.0.0 10.0.1 10.1.0 10.0.0 10.1.0 10.2.0 10.0.0 11.0.0 12.0.0 ? = 10 Products
  5. 5. MAGENTO 2: PLATFORM GOALS M2 Modern tech stack Improved performance & scalability Streamline customizations Simplify external integrations Easier installation & upgrades High code quality & testing
  6. 6. MODERN TECH STACK
  7. 7. Tech Stack
  8. 8. Integration
  9. 9. IMPROVED PERFORMANCE & SCALABILITY
  10. 10. Page Caching • CE Full Page Caching – Built-in: Filesystem/Redis – External: Varnish • Private/public content • Cache invalidation logic
  11. 11. Page Caching Indexing • Refactored: Catalog, Price, EAV, Stock, URL Rewrite, … • Partial indexing • Work in background • No manual re-indexing • Materialized View (Mview)
  12. 12. Page Caching Indexing Perf Toolkit • Standard toolkit for measuring performance • Benchmarking key flows • M2 performance analysis kicking off in earnest
  13. 13. Page Caching Indexing Perf Toolkit Scalability • Making it easier to scale • Blueprints for successful scaling strategies
  14. 14. Docker and Simplifying Cloud Scalability “Docker - An open platform for distributed applications for developers and sysadmins” • Public collaborative project (GitHub) to define standard recommended Docker images • Each server registers itself in etcd • Each server watches other clusters for changes in membership CDN Reverse Proxy Varnish … Admin Store Front Apache2 Job … MySQL SOLR REDIS … … … R/W RO RO Server Payment Gateway ETCD Varnish fan out PURGE requests NEW https://hub.docker.com/u/alankent/ 27 Magento images from 19 community members already on public Docker repository
  15. 15. STREAMLINE CUSTOMIZATIONS
  16. 16. Dependency Injection • Encourages loose code coupling
  17. 17. Mage Class • God Class “Mage::” is eliminated Mage::getModel('Magento_Customer_Model_Address')
  18. 18. Interceptors & Plugins • Before method • After method • Around method • Sorting
  19. 19. Magento Framework All framework code in one namespace
  20. 20. Modularity Block Rendering Framework/ View Template Engine Layout Infrastructure View Front Controller Framework/ App Request/ Response Boot-strapping Routers App *{Module}/ Adminhtml Magento/ Adminhtml Catalog/ Adminhtml Customer/ Adminhtml Admin
  21. 21. Modularity • Product: optional product types • Catalog: new modules, delete from code • Sales: extracted Recurring Payment • Shipping: carrier, decoupled shipping methods • Checkout: extracted Term&Conditions, multishipping • Payments: offline payment, decoupling payment methods
  22. 22. Price Logic • Price logic decomposition per price type • Price Interfaces • Price decoupled from Tax and Weee • Price “adjustment”
  23. 23. i18n • Global function __() • Phrase • RendererInterface • Composite, Inline, Placeholder, Translate • [Module]/i18n
  24. 24. Layouts • Layouts, templates (view) in Modules • Layout file responsible only for single page/block • Validation Layout XML (XML Schema) • Extend Layout • Merging Layouts • Override Layout • Page Types
  25. 25. Magento UI Library • Upgradability • Consistency • Reusable Magento UI components • Styling and design best practices • Good documentation • Simplifies customization
  26. 26. Blank Theme Mobile First Responsive Design
  27. 27. Multilevel Theme Inheritance • Simplifies customization • Flexible store design • Allows store to be special • Maintainability • Less code duplication
  28. 28. SIMPLIFY EXTERNAL INTEGRATIONS
  29. 29. Service Layer and Web API • Consistent, versioned PHP & Web Service API • REST & SOAP • Evolution strategy – Super-glued: No restriction of what is called – Tightly coupled: Restricts calls to “stable” API – Loosely coupled: Restricts access to interface based API (allows service replacement)
  30. 30. Side Benefit of Web Services: Exposing the Magento Schema Customer Account Services Customer Addresses Region Customer Group Cart Repository Cart Address Totals Data Model Cart Item Region Total Item
  31. 31. EASIER INSTALLATION & UPGRADES
  32. 32. Composer and Deployment Tool • Command line for advanced users • Web based for simpler use cases • Modules, extensions, faster patches magento/magento-composer-installer
  33. 33. HIGH CODE QUALITY & TESTING
  34. 34. Test Automation • Full set of tests: Unit, Integration, Static, Legacy • Functional Test – Magento Testing Framework (MTF) • Continuous Integration & Continuous Delivery • Performance Testing • Regression Testing magento/mtf
  35. 35. CONCLUSIONS
  36. 36. In a Nutshell • On track time-wise • Upgrade of tech stack • Decoupling and cleaning up the code base • Controlling cross module dependencies better • Marching towards full test automation
  37. 37. Thank You! @akent99 https://github.com/alankent http://alankent.wordpress.com/ https://registry.hub.docker.com/repos/alankent/

×