SlideShare a Scribd company logo
Page | 1© 2017 Magento, Inc.
Backward Compatibility
Page | 2© 2017 Magento, Inc.
Oleksii Korshenko
Software Architect, Magento 2
Why Backward
Compatibility?
Page | 4© 2017 Magento, Inc.
Where we are…
• 2.0.0 – November 16, 2015
• 2.0.1 – January 19, 2016
• …..
• 2.0.8 – July 18, 2016
• 2.0.9 – August 3, 2016
• 2.0.10 – October 7, 2016
• 2.0.11 – December 13, 2016
• 2.0.12 – January 27, 2017
• 2.0.13 – February 16, 2017
• 2.1.0 – June 23, 2016
• 2.1.1 – August 25, 2016
• 2.1.2 – October 10, 2016
• 2.1.3 – December 8, 2016
• 2.1.4 – January 23, 2017
• 2.1.5 – February 15, 2017
• 2.1.6 – March 27, 2017
• …..
• 2.2.0 - TBD
20 patch releases, 1 minor release
Page | 5© 2017 Magento, Inc.
For merchants
cost-effective process
For developers –
forward-compatible extensions
Why does Backward Compatibility matter?
Page | 6© 2017 Magento, Inc.
Does Magento have a lot of bugs?
Page | 7© 2017 Magento, Inc.
Are these bugs annoying
for Magento developers?
Page | 8© 2017 Magento, Inc.
Keep Magento backwards compatible
vs.
fixing its flaws?
Page | 9© 2017 Magento, Inc.
We MUST do BOTH
Page | 10© 2017 Magento, Inc.
Backward Compatible Fix
*it works (most of the time), but code quality
is far from good enough
Backward compatibility (BC)
policy for Magento code
Page | 12© 2017 Magento, Inc.
Semantic Versioning
Product Version
Minor Patch .
2 . 1 . 4
100 . 1 . 4
Major Minor Patch
Module Version
MAJOR . MINOR . PATCH
Page | 13© 2017 Magento, Inc.
Public vs Private code
Public – has @api annotation
Private – no @api annotation
Page | 14© 2017 Magento, Inc.
What examples of Public code Magento has?
• Class/Interfaces (PHP, Javascript)
• XML configuration
• Events
• ….
Full list is on the DevDocs: Versioning and compatibility
http://devdocs.magento.com/guides/v2.1/extension-dev-guide/versioning/index.html
Page | 15© 2017 Magento, Inc.
API vs SPI (Extension Points)
A PHP Interface usages:
• As an API
• As a Service Provider Interface (SPI)
• As both
Page | 16© 2017 Magento, Inc.
API vs SPI (Extension Points)
Who decides whether interface/class
belong to API or SPI?
YOU
Dependency Rules
Page | 18© 2017 Magento, Inc.
Rule #1
Dependency Rules
Usage Dependency
Calls API MAJOR
"require": {
"magento/module-customer": "100.*.*"
}
Page | 19© 2017 Magento, Inc.
Rule #2
Dependency Rules
Usage Dependency
Uses SPI MAJOR+MINOR
"require": {
"magento/module-customer": "100.5.*"
}
Page | 20© 2017 Magento, Inc.
Rule #3
Dependency Rules
Usage Dependency
Uses
private code
MAJOR+MINOR+PATCH
"require": {
"magento/module-customer": "100.5.2"
}
Prohibited Code Changes
Page | 22© 2017 Magento, Inc.
Prohibited Code Changes. PHP
2. Public/protected method removal
1. Interface/class removal
3. Introduction of a method to a class/interface
Page | 23© 2017 Magento, Inc.
Prohibited Code Changes. PHP
5. Parameter addition in protected methods
4. Parameter addition in public methods
6. Method argument type modification
Page | 24© 2017 Magento, Inc.
Allowed constructor modifications
class ExistingClass
{
private $newDependency;
public function __construct(
OldDependencyIntreface $oldDependency,
$oldRequiredConstructorParameter,
$oldOptinalConstructorParameter = null,
NewDependencyInterface $newDependency = null
) {
...
$this>newDependency = $newDependency ?: MagentoFrameworkAppObjectManager::getInstance()
->get(NewDependencyInterface::class);
...
}
public function existingFunction()
{
// Use $this->newDependency wherever the new dependency is needed
}
}
Page | 25© 2017 Magento, Inc.
Keep backward compatibility in:
Page | 26© 2017 Magento, Inc.
The main rule of backwards compatibility
Backwards compatibility is more important
than
effort of the implementation
Page | 27© 2017 Magento, Inc.
Do all backward
compatible fixes
look ugly?
Page | 28© 2017 Magento, Inc.
This is how Backward Compatible
fix should look like
http://devdocs.magento.com/guides/v2.1/ext-best-practices/extension-coding/backwards-compatible-development/index.html
Q & A
@okorshenko
Mli 2017 technical backward compatibility

More Related Content

What's hot

Magento 2 Declarative Schema
Magento 2 Declarative SchemaMagento 2 Declarative Schema
Magento 2 Declarative Schema
atishgoswami
 
Magento2.3 API Functional Testing
Magento2.3 API Functional TestingMagento2.3 API Functional Testing
Magento2.3 API Functional Testing
Vishwas Bhatnagar
 
Magento 2.3 Schema and Data Patches
Magento 2.3 Schema and Data PatchesMagento 2.3 Schema and Data Patches
Magento 2.3 Schema and Data Patches
atishgoswami
 
Igor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best PracticesIgor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best Practices
Atwix
 
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Atwix
 
Accelerating eCommerce Experiences: 2016 Holiday Case Study
Accelerating eCommerce Experiences: 2016 Holiday Case StudyAccelerating eCommerce Experiences: 2016 Holiday Case Study
Accelerating eCommerce Experiences: 2016 Holiday Case Study
rswint
 
Conversational Commerce and Magento 2: Breaking new ground with Facebook, Ale...
Conversational Commerce and Magento 2: Breaking new ground with Facebook, Ale...Conversational Commerce and Magento 2: Breaking new ground with Facebook, Ale...
Conversational Commerce and Magento 2: Breaking new ground with Facebook, Ale...
Phillip Jackson
 
Leveraging Dynamic Interactions on Salesforce Lightning Pages
Leveraging Dynamic Interactions on Salesforce Lightning PagesLeveraging Dynamic Interactions on Salesforce Lightning Pages
Leveraging Dynamic Interactions on Salesforce Lightning Pages
CodeScience
 
Flexible, Powerful, and Easy-to-Use Ingress Load Balancing with NGINX and Ope...
Flexible, Powerful, and Easy-to-Use Ingress Load Balancing with NGINX and Ope...Flexible, Powerful, and Easy-to-Use Ingress Load Balancing with NGINX and Ope...
Flexible, Powerful, and Easy-to-Use Ingress Load Balancing with NGINX and Ope...
NGINX, Inc.
 
Org-dependent Unlocked Packages for ISVs
Org-dependent Unlocked Packages for ISVsOrg-dependent Unlocked Packages for ISVs
Org-dependent Unlocked Packages for ISVs
CodeScience
 
ISV Error Handling With Spring '21 Update
ISV Error Handling With Spring '21 UpdateISV Error Handling With Spring '21 Update
ISV Error Handling With Spring '21 Update
CodeScience
 
Partnership Responsive Asp.Net CMS
Partnership Responsive Asp.Net CMSPartnership Responsive Asp.Net CMS
Partnership Responsive Asp.Net CMS
veerabhadradotnet
 
TechChat - What’s New in Sumo Logic 4/28/15
TechChat - What’s New in Sumo Logic 4/28/15TechChat - What’s New in Sumo Logic 4/28/15
TechChat - What’s New in Sumo Logic 4/28/15
Sumo Logic
 
Time to build and test results 3x faster - how we did it
Time to build and test results 3x faster - how we did itTime to build and test results 3x faster - how we did it
Time to build and test results 3x faster - how we did it
Aurélien Pupier
 
October 2020 GatherUp Webinar
October 2020 GatherUp WebinarOctober 2020 GatherUp Webinar
October 2020 GatherUp Webinar
GatherUp
 
7 Advantages of React JS in Application Development
7 Advantages of React JS in Application Development7 Advantages of React JS in Application Development
7 Advantages of React JS in Application Development
Rlogical Techsoft Pvt Ltd
 
Evolve 19 | Upen Manickam & Amanda Gray | Adventures in SPA with AEM 6.5
Evolve 19 | Upen Manickam & Amanda Gray | Adventures in SPA with AEM 6.5Evolve 19 | Upen Manickam & Amanda Gray | Adventures in SPA with AEM 6.5
Evolve 19 | Upen Manickam & Amanda Gray | Adventures in SPA with AEM 6.5
Evolve The Adobe Digital Marketing Community
 
Upgraded magento migration services and tools
Upgraded magento migration services and toolsUpgraded magento migration services and tools
Upgraded magento migration services and tools
Aegis Softtech
 
How to migrate from Magento 1 to Magento 2
How to migrate from Magento 1 to Magento 2How to migrate from Magento 1 to Magento 2
How to migrate from Magento 1 to Magento 2
Matthias Glitzner-Zeis
 
Gsx code two gsx final
Gsx code two gsx finalGsx code two gsx final
Gsx code two gsx final
GSX Solutions
 

What's hot (20)

Magento 2 Declarative Schema
Magento 2 Declarative SchemaMagento 2 Declarative Schema
Magento 2 Declarative Schema
 
Magento2.3 API Functional Testing
Magento2.3 API Functional TestingMagento2.3 API Functional Testing
Magento2.3 API Functional Testing
 
Magento 2.3 Schema and Data Patches
Magento 2.3 Schema and Data PatchesMagento 2.3 Schema and Data Patches
Magento 2.3 Schema and Data Patches
 
Igor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best PracticesIgor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best Practices
 
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
 
Accelerating eCommerce Experiences: 2016 Holiday Case Study
Accelerating eCommerce Experiences: 2016 Holiday Case StudyAccelerating eCommerce Experiences: 2016 Holiday Case Study
Accelerating eCommerce Experiences: 2016 Holiday Case Study
 
Conversational Commerce and Magento 2: Breaking new ground with Facebook, Ale...
Conversational Commerce and Magento 2: Breaking new ground with Facebook, Ale...Conversational Commerce and Magento 2: Breaking new ground with Facebook, Ale...
Conversational Commerce and Magento 2: Breaking new ground with Facebook, Ale...
 
Leveraging Dynamic Interactions on Salesforce Lightning Pages
Leveraging Dynamic Interactions on Salesforce Lightning PagesLeveraging Dynamic Interactions on Salesforce Lightning Pages
Leveraging Dynamic Interactions on Salesforce Lightning Pages
 
Flexible, Powerful, and Easy-to-Use Ingress Load Balancing with NGINX and Ope...
Flexible, Powerful, and Easy-to-Use Ingress Load Balancing with NGINX and Ope...Flexible, Powerful, and Easy-to-Use Ingress Load Balancing with NGINX and Ope...
Flexible, Powerful, and Easy-to-Use Ingress Load Balancing with NGINX and Ope...
 
Org-dependent Unlocked Packages for ISVs
Org-dependent Unlocked Packages for ISVsOrg-dependent Unlocked Packages for ISVs
Org-dependent Unlocked Packages for ISVs
 
ISV Error Handling With Spring '21 Update
ISV Error Handling With Spring '21 UpdateISV Error Handling With Spring '21 Update
ISV Error Handling With Spring '21 Update
 
Partnership Responsive Asp.Net CMS
Partnership Responsive Asp.Net CMSPartnership Responsive Asp.Net CMS
Partnership Responsive Asp.Net CMS
 
TechChat - What’s New in Sumo Logic 4/28/15
TechChat - What’s New in Sumo Logic 4/28/15TechChat - What’s New in Sumo Logic 4/28/15
TechChat - What’s New in Sumo Logic 4/28/15
 
Time to build and test results 3x faster - how we did it
Time to build and test results 3x faster - how we did itTime to build and test results 3x faster - how we did it
Time to build and test results 3x faster - how we did it
 
October 2020 GatherUp Webinar
October 2020 GatherUp WebinarOctober 2020 GatherUp Webinar
October 2020 GatherUp Webinar
 
7 Advantages of React JS in Application Development
7 Advantages of React JS in Application Development7 Advantages of React JS in Application Development
7 Advantages of React JS in Application Development
 
Evolve 19 | Upen Manickam & Amanda Gray | Adventures in SPA with AEM 6.5
Evolve 19 | Upen Manickam & Amanda Gray | Adventures in SPA with AEM 6.5Evolve 19 | Upen Manickam & Amanda Gray | Adventures in SPA with AEM 6.5
Evolve 19 | Upen Manickam & Amanda Gray | Adventures in SPA with AEM 6.5
 
Upgraded magento migration services and tools
Upgraded magento migration services and toolsUpgraded magento migration services and tools
Upgraded magento migration services and tools
 
How to migrate from Magento 1 to Magento 2
How to migrate from Magento 1 to Magento 2How to migrate from Magento 1 to Magento 2
How to migrate from Magento 1 to Magento 2
 
Gsx code two gsx final
Gsx code two gsx finalGsx code two gsx final
Gsx code two gsx final
 

Similar to Mli 2017 technical backward compatibility

Chernivtsi Magento Meetup&Contribution day. Miniailo.I.
Chernivtsi Magento Meetup&Contribution day. Miniailo.I. Chernivtsi Magento Meetup&Contribution day. Miniailo.I.
Chernivtsi Magento Meetup&Contribution day. Miniailo.I.
Elogic Magento Development
 
MageConf 2017, Design API Best Practices
MageConf 2017, Design API Best PracticesMageConf 2017, Design API Best Practices
MageConf 2017, Design API Best Practices
Igor Miniailo
 
Backward Compatibility Developer's Guide in Magento 2. #MM17CZ
Backward Compatibility Developer's Guide in Magento 2. #MM17CZBackward Compatibility Developer's Guide in Magento 2. #MM17CZ
Backward Compatibility Developer's Guide in Magento 2. #MM17CZ
Igor Miniailo
 
Magento 2 Best Practice MLUK17
Magento 2 Best Practice MLUK17Magento 2 Best Practice MLUK17
Magento 2 Best Practice MLUK17
Brent W Peterson
 
API design best practices
API design best practicesAPI design best practices
API design best practices
Igor Miniailo
 
Chernivtsi Magento Meetup&Contribution day. Naida V.
Chernivtsi Magento Meetup&Contribution day. Naida V.Chernivtsi Magento Meetup&Contribution day. Naida V.
Chernivtsi Magento Meetup&Contribution day. Naida V.
Elogic Magento Development
 
Oleksii Korshenko - Magento 2 Backwards Compatible Policy
Oleksii Korshenko - Magento 2 Backwards Compatible PolicyOleksii Korshenko - Magento 2 Backwards Compatible Policy
Oleksii Korshenko - Magento 2 Backwards Compatible Policy
Meet Magento Italy
 
Experience in Magento Community Projects
Experience in Magento Community ProjectsExperience in Magento Community Projects
Experience in Magento Community Projects
Magecom UK Limited
 
Testing in Magento 2
Testing in Magento 2 Testing in Magento 2
Testing in Magento 2
Igor Miniailo
 
Monitoring your cache effectiveness in Magento 2
Monitoring your cache effectiveness in Magento 2Monitoring your cache effectiveness in Magento 2
Monitoring your cache effectiveness in Magento 2
Tony Brown
 
Kendo UI workshop introduction - PUG Baltic Annual Conference 2017
Kendo UI workshop introduction - PUG Baltic Annual Conference 2017Kendo UI workshop introduction - PUG Baltic Annual Conference 2017
Kendo UI workshop introduction - PUG Baltic Annual Conference 2017
Alen Leit
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
Marco Parenzan
 
Multi Source Inventory (MSI) in Magento 2
Multi Source Inventory (MSI) in Magento 2 Multi Source Inventory (MSI) in Magento 2
Multi Source Inventory (MSI) in Magento 2
Igor Miniailo
 
Backward Compatibility Developer's Guide Webinar
Backward Compatibility Developer's Guide WebinarBackward Compatibility Developer's Guide Webinar
Backward Compatibility Developer's Guide Webinar
Igor Miniailo
 
The Evolution of Hosting and What's Next with Cloud
The Evolution of Hosting and What's Next with CloudThe Evolution of Hosting and What's Next with Cloud
The Evolution of Hosting and What's Next with Cloud
Josh Ward
 
API-first design - Basis for an consistent API-Management approach
API-first design - Basis for an consistent API-Management approachAPI-first design - Basis for an consistent API-Management approach
API-first design - Basis for an consistent API-Management approach
Sven Bernhardt
 
How to edit the core
How to edit the coreHow to edit the core
How to edit the core
dmanners87
 
Automated tests in Magento
Automated tests in MagentoAutomated tests in Magento
Automated tests in Magento
Yevhen Sentiabov
 
API design-first and Microservices
API design-first and MicroservicesAPI design-first and Microservices
API design-first and Microservices
Sven Bernhardt
 
Best Practices - By Lofi Dewanto
Best Practices - By Lofi DewantoBest Practices - By Lofi Dewanto
Best Practices - By Lofi Dewanto
GWTcon
 

Similar to Mli 2017 technical backward compatibility (20)

Chernivtsi Magento Meetup&Contribution day. Miniailo.I.
Chernivtsi Magento Meetup&Contribution day. Miniailo.I. Chernivtsi Magento Meetup&Contribution day. Miniailo.I.
Chernivtsi Magento Meetup&Contribution day. Miniailo.I.
 
MageConf 2017, Design API Best Practices
MageConf 2017, Design API Best PracticesMageConf 2017, Design API Best Practices
MageConf 2017, Design API Best Practices
 
Backward Compatibility Developer's Guide in Magento 2. #MM17CZ
Backward Compatibility Developer's Guide in Magento 2. #MM17CZBackward Compatibility Developer's Guide in Magento 2. #MM17CZ
Backward Compatibility Developer's Guide in Magento 2. #MM17CZ
 
Magento 2 Best Practice MLUK17
Magento 2 Best Practice MLUK17Magento 2 Best Practice MLUK17
Magento 2 Best Practice MLUK17
 
API design best practices
API design best practicesAPI design best practices
API design best practices
 
Chernivtsi Magento Meetup&Contribution day. Naida V.
Chernivtsi Magento Meetup&Contribution day. Naida V.Chernivtsi Magento Meetup&Contribution day. Naida V.
Chernivtsi Magento Meetup&Contribution day. Naida V.
 
Oleksii Korshenko - Magento 2 Backwards Compatible Policy
Oleksii Korshenko - Magento 2 Backwards Compatible PolicyOleksii Korshenko - Magento 2 Backwards Compatible Policy
Oleksii Korshenko - Magento 2 Backwards Compatible Policy
 
Experience in Magento Community Projects
Experience in Magento Community ProjectsExperience in Magento Community Projects
Experience in Magento Community Projects
 
Testing in Magento 2
Testing in Magento 2 Testing in Magento 2
Testing in Magento 2
 
Monitoring your cache effectiveness in Magento 2
Monitoring your cache effectiveness in Magento 2Monitoring your cache effectiveness in Magento 2
Monitoring your cache effectiveness in Magento 2
 
Kendo UI workshop introduction - PUG Baltic Annual Conference 2017
Kendo UI workshop introduction - PUG Baltic Annual Conference 2017Kendo UI workshop introduction - PUG Baltic Annual Conference 2017
Kendo UI workshop introduction - PUG Baltic Annual Conference 2017
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
 
Multi Source Inventory (MSI) in Magento 2
Multi Source Inventory (MSI) in Magento 2 Multi Source Inventory (MSI) in Magento 2
Multi Source Inventory (MSI) in Magento 2
 
Backward Compatibility Developer's Guide Webinar
Backward Compatibility Developer's Guide WebinarBackward Compatibility Developer's Guide Webinar
Backward Compatibility Developer's Guide Webinar
 
The Evolution of Hosting and What's Next with Cloud
The Evolution of Hosting and What's Next with CloudThe Evolution of Hosting and What's Next with Cloud
The Evolution of Hosting and What's Next with Cloud
 
API-first design - Basis for an consistent API-Management approach
API-first design - Basis for an consistent API-Management approachAPI-first design - Basis for an consistent API-Management approach
API-first design - Basis for an consistent API-Management approach
 
How to edit the core
How to edit the coreHow to edit the core
How to edit the core
 
Automated tests in Magento
Automated tests in MagentoAutomated tests in Magento
Automated tests in Magento
 
API design-first and Microservices
API design-first and MicroservicesAPI design-first and Microservices
API design-first and Microservices
 
Best Practices - By Lofi Dewanto
Best Practices - By Lofi DewantoBest Practices - By Lofi Dewanto
Best Practices - By Lofi Dewanto
 

More from Hanoi MagentoMeetup

Mli 2017 business navigating mcom
Mli 2017 business navigating mcomMli 2017 business navigating mcom
Mli 2017 business navigating mcom
Hanoi MagentoMeetup
 
Mli 2017 business success migrations on m2
Mli 2017 business success migrations on m2Mli 2017 business success migrations on m2
Mli 2017 business success migrations on m2
Hanoi MagentoMeetup
 
Mli 2017 business mbi
Mli 2017 business mbiMli 2017 business mbi
Mli 2017 business mbi
Hanoi MagentoMeetup
 
Mli 2017 business enhancing your career with the magento ecosystem
Mli 2017 business enhancing your career with the magento ecosystemMli 2017 business enhancing your career with the magento ecosystem
Mli 2017 business enhancing your career with the magento ecosystem
Hanoi MagentoMeetup
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
Hanoi MagentoMeetup
 
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
Hanoi MagentoMeetup
 
#3 Hanoi Magento Meetup - Part 1: Magento Around The World
#3 Hanoi Magento Meetup - Part 1: Magento Around The World#3 Hanoi Magento Meetup - Part 1: Magento Around The World
#3 Hanoi Magento Meetup - Part 1: Magento Around The World
Hanoi MagentoMeetup
 
#2 Hanoi Magento Meetup - Part 3: Panel discussion
#2 Hanoi Magento Meetup - Part 3: Panel discussion#2 Hanoi Magento Meetup - Part 3: Panel discussion
#2 Hanoi Magento Meetup - Part 3: Panel discussion
Hanoi MagentoMeetup
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
Hanoi MagentoMeetup
 
#2 Hanoi Magento meetup - Part 1: Be part of the world
#2 Hanoi Magento meetup - Part 1: Be part of the world#2 Hanoi Magento meetup - Part 1: Be part of the world
#2 Hanoi Magento meetup - Part 1: Be part of the world
Hanoi MagentoMeetup
 
#1HanoiMagentoMeetup_Magento 2 vs Magento 1
#1HanoiMagentoMeetup_Magento 2 vs Magento 1#1HanoiMagentoMeetup_Magento 2 vs Magento 1
#1HanoiMagentoMeetup_Magento 2 vs Magento 1
Hanoi MagentoMeetup
 

More from Hanoi MagentoMeetup (11)

Mli 2017 business navigating mcom
Mli 2017 business navigating mcomMli 2017 business navigating mcom
Mli 2017 business navigating mcom
 
Mli 2017 business success migrations on m2
Mli 2017 business success migrations on m2Mli 2017 business success migrations on m2
Mli 2017 business success migrations on m2
 
Mli 2017 business mbi
Mli 2017 business mbiMli 2017 business mbi
Mli 2017 business mbi
 
Mli 2017 business enhancing your career with the magento ecosystem
Mli 2017 business enhancing your career with the magento ecosystemMli 2017 business enhancing your career with the magento ecosystem
Mli 2017 business enhancing your career with the magento ecosystem
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
 
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
 
#3 Hanoi Magento Meetup - Part 1: Magento Around The World
#3 Hanoi Magento Meetup - Part 1: Magento Around The World#3 Hanoi Magento Meetup - Part 1: Magento Around The World
#3 Hanoi Magento Meetup - Part 1: Magento Around The World
 
#2 Hanoi Magento Meetup - Part 3: Panel discussion
#2 Hanoi Magento Meetup - Part 3: Panel discussion#2 Hanoi Magento Meetup - Part 3: Panel discussion
#2 Hanoi Magento Meetup - Part 3: Panel discussion
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
 
#2 Hanoi Magento meetup - Part 1: Be part of the world
#2 Hanoi Magento meetup - Part 1: Be part of the world#2 Hanoi Magento meetup - Part 1: Be part of the world
#2 Hanoi Magento meetup - Part 1: Be part of the world
 
#1HanoiMagentoMeetup_Magento 2 vs Magento 1
#1HanoiMagentoMeetup_Magento 2 vs Magento 1#1HanoiMagentoMeetup_Magento 2 vs Magento 1
#1HanoiMagentoMeetup_Magento 2 vs Magento 1
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 

Mli 2017 technical backward compatibility

  • 1. Page | 1© 2017 Magento, Inc. Backward Compatibility
  • 2. Page | 2© 2017 Magento, Inc. Oleksii Korshenko Software Architect, Magento 2
  • 4. Page | 4© 2017 Magento, Inc. Where we are… • 2.0.0 – November 16, 2015 • 2.0.1 – January 19, 2016 • ….. • 2.0.8 – July 18, 2016 • 2.0.9 – August 3, 2016 • 2.0.10 – October 7, 2016 • 2.0.11 – December 13, 2016 • 2.0.12 – January 27, 2017 • 2.0.13 – February 16, 2017 • 2.1.0 – June 23, 2016 • 2.1.1 – August 25, 2016 • 2.1.2 – October 10, 2016 • 2.1.3 – December 8, 2016 • 2.1.4 – January 23, 2017 • 2.1.5 – February 15, 2017 • 2.1.6 – March 27, 2017 • ….. • 2.2.0 - TBD 20 patch releases, 1 minor release
  • 5. Page | 5© 2017 Magento, Inc. For merchants cost-effective process For developers – forward-compatible extensions Why does Backward Compatibility matter?
  • 6. Page | 6© 2017 Magento, Inc. Does Magento have a lot of bugs?
  • 7. Page | 7© 2017 Magento, Inc. Are these bugs annoying for Magento developers?
  • 8. Page | 8© 2017 Magento, Inc. Keep Magento backwards compatible vs. fixing its flaws?
  • 9. Page | 9© 2017 Magento, Inc. We MUST do BOTH
  • 10. Page | 10© 2017 Magento, Inc. Backward Compatible Fix *it works (most of the time), but code quality is far from good enough
  • 12. Page | 12© 2017 Magento, Inc. Semantic Versioning Product Version Minor Patch . 2 . 1 . 4 100 . 1 . 4 Major Minor Patch Module Version MAJOR . MINOR . PATCH
  • 13. Page | 13© 2017 Magento, Inc. Public vs Private code Public – has @api annotation Private – no @api annotation
  • 14. Page | 14© 2017 Magento, Inc. What examples of Public code Magento has? • Class/Interfaces (PHP, Javascript) • XML configuration • Events • …. Full list is on the DevDocs: Versioning and compatibility http://devdocs.magento.com/guides/v2.1/extension-dev-guide/versioning/index.html
  • 15. Page | 15© 2017 Magento, Inc. API vs SPI (Extension Points) A PHP Interface usages: • As an API • As a Service Provider Interface (SPI) • As both
  • 16. Page | 16© 2017 Magento, Inc. API vs SPI (Extension Points) Who decides whether interface/class belong to API or SPI? YOU
  • 18. Page | 18© 2017 Magento, Inc. Rule #1 Dependency Rules Usage Dependency Calls API MAJOR "require": { "magento/module-customer": "100.*.*" }
  • 19. Page | 19© 2017 Magento, Inc. Rule #2 Dependency Rules Usage Dependency Uses SPI MAJOR+MINOR "require": { "magento/module-customer": "100.5.*" }
  • 20. Page | 20© 2017 Magento, Inc. Rule #3 Dependency Rules Usage Dependency Uses private code MAJOR+MINOR+PATCH "require": { "magento/module-customer": "100.5.2" }
  • 22. Page | 22© 2017 Magento, Inc. Prohibited Code Changes. PHP 2. Public/protected method removal 1. Interface/class removal 3. Introduction of a method to a class/interface
  • 23. Page | 23© 2017 Magento, Inc. Prohibited Code Changes. PHP 5. Parameter addition in protected methods 4. Parameter addition in public methods 6. Method argument type modification
  • 24. Page | 24© 2017 Magento, Inc. Allowed constructor modifications class ExistingClass { private $newDependency; public function __construct( OldDependencyIntreface $oldDependency, $oldRequiredConstructorParameter, $oldOptinalConstructorParameter = null, NewDependencyInterface $newDependency = null ) { ... $this>newDependency = $newDependency ?: MagentoFrameworkAppObjectManager::getInstance() ->get(NewDependencyInterface::class); ... } public function existingFunction() { // Use $this->newDependency wherever the new dependency is needed } }
  • 25. Page | 25© 2017 Magento, Inc. Keep backward compatibility in:
  • 26. Page | 26© 2017 Magento, Inc. The main rule of backwards compatibility Backwards compatibility is more important than effort of the implementation
  • 27. Page | 27© 2017 Magento, Inc. Do all backward compatible fixes look ugly?
  • 28. Page | 28© 2017 Magento, Inc. This is how Backward Compatible fix should look like http://devdocs.magento.com/guides/v2.1/ext-best-practices/extension-coding/backwards-compatible-development/index.html