Upload
sergii-shymko
View
94
Download
1
Embed Size (px)
Citation preview
Magento 1.x
• Linux x86, x64• Apache 1.3• PHP 5.2.13• MySQL 4.1.20
Server-Side Requirements
Magento 2
• Linux x86, x64• Apache 2.2• PHP 5.3.3• MySQL 5.1
NamespacesClosures
Late static binding__DIR__
?:Goto O_o
Magento 1.x
• Internet Explorer 7• Mozilla Firefox 3.5• Google Chrome 7• Apple Safari 5
Client-Side Requirements
Magento 2
• Internet Explorer 8• Mozilla Firefox 11• Google Chrome 18• Apple Safari 5
Removed configuration• Class prefixes
• Model• Resource model• Block• Helper
• Database tables
Reduced configuration size by ~12%
Convention over Configuration
Removed code pools – no classes overlapping• app/code/core/• app/code/community/• app/code/local/
Removed “code compilation” (Mage_Compiler)
Autoload by absolute path
Classes Lookup
DeprecatedMage::getModel(‘module_alias/class_alias’)Mage::getSingleton(‘module_alias/class_alias’)
Introduced• Dependency injection container (Zend_Di)• Constructor injection
__construct(Namespace_Module_Class $instance)• DI configuration
• Invariant – XML• Run-time – PHP
Dependency Injection
Theme N-1
Theme Inheritance
logo.png
slogan.png
Theme Nslogan.png
img.png
Overridden file
New file
Inherited file
…
Module can provide view filesapp/code/<Namespace>/<Module>/view/<area>/
Theme can override modular filesapp/design/<area>/<theme>/<Namespace>_<Module>/
Modules are independent of themes
View Files Modularity
Theme provides localized files
Consistent configuration: locale
Static Files Localization
Theme
Locale “de_DE”
logo.png
logo.png
Locale “fr_FR”
logo.png
Area defines• Routing / URLs• View files context• Services
• Authorization• …
Module can• Introduce new area• Be represented in existing areas
Formal Application Areas
Declared areas• Install• Frontend• Backend• API• Cron
Grid• Declaration through layout• AJAX
Form• Declaration through layout• Validation configuration
Simplified Customization
Automated Tests• Unit• Integration
• Integrity• Functional• Static
• Coding standards• Integrity• Legacy
• Performance
Continuous Integration
Quality Control