magento 2 overview. alan kent

37
Magento 2 Overview Alan Kent Magento Chief Architect

Upload: meetmagentony2014

Post on 24-Jun-2015

1.194 views

Category:

Technology


2 download

DESCRIPTION

Magento 2 overview. Alan Kent

TRANSCRIPT

Page 1: Magento 2 overview. Alan Kent

Magento 2 Overview

Alan KentMagento Chief Architect

Page 2: Magento 2 overview. Alan Kent

MAGENTO 2 TIMELINE & GOALS

Page 3: Magento 2 overview. Alan Kent

Release Approach

2014 20162015 2017

2.0 Dev Beta

2.0Merchant Beta

2.0Merchant

GA

2.xOngoing Releases

2.0 Dev RC

WE WANT FEEDBACK!

magento/magento2(weekly code pushes)

Page 4: Magento 2 overview. Alan Kent

Product and Software Versions

CE EE Verticals?(Fashion & Apparel)

2.0 2.1 2.2 2.0 2.1 2.21.0 1.1 2.0

Modules

Cart Catalog Sales10.0.0 10.0.1 10.1.0

10.0.0 10.1.0 10.2.010.0.0 11.0.0 12.0.0

? = 10

Products

Page 5: Magento 2 overview. Alan Kent

MAGENTO 2: PLATFORM GOALS

M2

Modern tech stack

Improved performance& scalability

Streamlinecustomizations

Simplify externalintegrations

Easier installation& upgrades

High code quality& testing

Page 6: Magento 2 overview. Alan Kent

MODERN TECH STACK

Page 7: Magento 2 overview. Alan Kent

Tech Stack

Page 8: Magento 2 overview. Alan Kent

Integration

Page 9: Magento 2 overview. Alan Kent

IMPROVED PERFORMANCE & SCALABILITY

Page 10: Magento 2 overview. Alan Kent

Page Caching • CE Full Page Caching– Built-in: Filesystem/Redis– External: Varnish

• Private/public content• Cache invalidation logic

Page 11: Magento 2 overview. Alan Kent

Page CachingIndexing

• Refactored: Catalog, Price, EAV, Stock, URL Rewrite, …

• Partial indexing• Work in background• No manual re-indexing• Materialized View (Mview)

Page 12: Magento 2 overview. Alan Kent

Page CachingIndexingPerf Toolkit

• Standard toolkit for measuring performance

• Benchmarking key flows• M2 performance analysis

kicking off in earnest

Page 13: Magento 2 overview. Alan Kent

Page CachingIndexingPerf ToolkitScalability

• Making it easier to scale • Blueprints for successful

scaling strategies

Page 14: Magento 2 overview. Alan Kent

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

Varnish

Apache2

MySQL REDISSOLR

Reverse Proxy

…… …

Master

ReplicaReplica

R/W RO RO

Store FrontAdmin JobServer

Payment Gateway

ETCD

Varnish fan outPURGE requests

NEW

https://hub.docker.com/u/alankent/27 Magento images from 19 community

members already on public Docker repository

Page 15: Magento 2 overview. Alan Kent

STREAMLINE CUSTOMIZATIONS

Page 16: Magento 2 overview. Alan Kent

Dependency Injection• Encourages loose code coupling

Page 17: Magento 2 overview. Alan Kent

Mage Class

• God Class “Mage::” is eliminated

Mage::getModel('Magento_Customer_Model_Address')

Page 18: Magento 2 overview. Alan Kent

Interceptors & Plugins• Before method• After method• Around method• Sorting

Page 19: Magento 2 overview. Alan Kent

Magento Framework

All framework code in one namespace

Page 20: Magento 2 overview. Alan Kent

Modularity

Framework/ View

Block Rendering

Template Engine

Layout Infrastructure

View

Framework/ App

Front Controller

Request/ Response

Boot-strapping

Routers

App

Magento/ Adminhtml

*{Module}/ Adminhtml

Catalog/ Adminhtml

Customer/ Adminhtm

l

Admin

Page 21: Magento 2 overview. Alan Kent

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

Page 22: Magento 2 overview. Alan Kent

Price Logic• Price logic decomposition per price

type • Price Interfaces• Price decoupled from Tax and Weee• Price “adjustment”

Page 23: Magento 2 overview. Alan Kent

i18n• Global function __()• Phrase• RendererInterface• Composite, Inline, Placeholder, Translate • [Module]/i18n

Page 24: Magento 2 overview. Alan Kent

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

Page 25: Magento 2 overview. Alan Kent

Magento UI Library• Upgradability

• Consistency

• Reusable Magento UI components

• Styling and design best practices

• Good documentation

• Simplifies customization

Page 26: Magento 2 overview. Alan Kent

Blank Theme

Mobile First Responsive Design

Page 27: Magento 2 overview. Alan Kent

Multilevel Theme Inheritance• Simplifies customization• Flexible store design• Allows store to be

special• Maintainability• Less code duplication

Page 28: Magento 2 overview. Alan Kent

SIMPLIFY EXTERNAL INTEGRATIONS

Page 29: Magento 2 overview. Alan Kent

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)

Page 30: Magento 2 overview. Alan Kent

Side Benefit of Web Services:Exposing the Magento Schema

Customer

Addresses

Region

Customer Group

Customer Account Services

Cart

Cart Repository

Address Totals

Region Total Item

Cart ItemData Model

Page 31: Magento 2 overview. Alan Kent

EASIER INSTALLATION & UPGRADES

Page 32: Magento 2 overview. Alan Kent

Composer and Deployment Tool• Command line for advanced users• Web based for simpler use cases• Modules, extensions, faster patches

magento/magento-composer-installer

Page 33: Magento 2 overview. Alan Kent

HIGH CODE QUALITY & TESTING

Page 34: Magento 2 overview. Alan Kent

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

Page 35: Magento 2 overview. Alan Kent

CONCLUSIONS

Page 36: Magento 2 overview. Alan Kent

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

Page 37: Magento 2 overview. Alan Kent

Thank You!

@akent99

https://github.com/alankent

http://alankent.wordpress.com/

https://registry.hub.docker.com/repos/alankent/