magento 2info2.magento.com/rs/magentosoftware/images/technical... · 2016-02-05 · console...
TRANSCRIPT
![Page 1: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/1.jpg)
![Page 2: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/2.jpg)
Magento 2.0
Technical Deep Dive
![Page 3: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/3.jpg)
Magento 2
Application
EnvironmentAnton Kril
Lead Architect
@AntonKril
![Page 4: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/4.jpg)
System Requirements
“System Requirements” section on Magento 2 Documentation Site
v1.8 + v2.2, v2.4
v3.5, v4.x
V5.6
V5.6, v5.6, v7.0.2+
v4.*V3.0
![Page 5: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/5.jpg)
How To Get?
“Installation” section on Magento 2 Documentation Site
![Page 6: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/6.jpg)
Console Installer
magento setup:install --<option>=<value> ... --<option>=<value>
![Page 7: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/7.jpg)
Web Installer
![Page 8: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/8.jpg)
app/etc/
<?phpreturn ['backend' => ['frontName' => 'admin’],'install' => [
'date' => 'Fri, 15 Jan 2016 10:48:39 +0000’],'crypt' => [
'key' => 'dd2efaadc096ace77890224257943a5c’],...
];
env.php
<?phpreturn [’modules' => [
’Magento_Store' => ’1’,’Magento_AdminNotification' => ’1’,’Magento_Directory' => ’1’,’Magento_Theme' => ’1’,...
],];
config.php
![Page 9: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/9.jpg)
Console Application$ bin/magentoMagento CLI version 2.0.0
Usage:command [options] [arguments]
Options:--help (-h) Display this help message--quiet (-q) Do not output any message--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug--version (-V) Display this application version--ansi Force ANSI output--no-ansi Disable ANSI output--no-interaction (-n) Do not ask any interactive question
Available commands:help Displays help for a commandlist Lists commands
adminadmin:user:create Creates an administratoradmin:user:unlock Unlock Admin Account
cachecache:clean Cleans cache type(s)cache:disable Disables cache type(s)cache:enable Enables cache type(s)cache:flush Flushes cache storage used by cache type(s)cache:status Checks cache status
catalogcatalog:images:resize Creates resized product imagescatalog:product:attributes:cleanup Removes unused product attributes.
...
![Page 10: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/10.jpg)
Application Modes
Default Developer Production
Error Output +
Automatic Code Generation + +
Class Definitions reflection-based reflection-based
requires compilation
Automatic Static File Materialization + ++ requires publication
Page Cache Debugging Info +
Config File Validation +
Automatic Theme Registration + +
> bin\magento deploy:mode:set
![Page 11: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/11.jpg)
Code Generation
• /var/generation folder
• Infrastructure classes
– Factories (‘Magento\Catalog\Model\ProductFactory’)
– Proxies (‘Magento\Framework\Event\Config\Proxy’)
– Interceptors (‘Magento\Framework\Event\Config\Interceptor’)
– Extension Attribute Interfaces
![Page 12: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/12.jpg)
Built-in Client-side Grunt
• Oyejorge PHP library
• ~40 seconds to compile
CSS
• Manual actions to re-
compile
• less.js official script• ~10 seconds to compile CSS• No actions to re-compile
• Command line script
• ~7 seconds to compile CSS
• Automatic browser refresh on
change in LESS
LESS Pre-Processing
![Page 13: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/13.jpg)
Advanced DB Deployment
Slave DBs
Checkout DB OMS DBMain DBNDB cluster NDB cluster
Product merchandizing Storefront Checkout Order management system
![Page 14: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/14.jpg)
Versioning
• Semantic Versioning (http://semver.org)
• One exception: minor release bumps minor versions of all modules
• Extension developers should depend on MajorVer.*.*
2.0.0 2.0.1 2.1.0 2.2.0
Magento_Catalog 100.0.0 100.0.1 100.1.0 101.0.0
Magento_Sales 100.0.0 100.0.0 100.1.0 101.2.0
![Page 15: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/15.jpg)
Documentation
• http://devdocs.magento.com
• http://alankent.me
• https://github.com/magento/magento2
• https://community.magento.com
• http://magento.stackexchange.com
• https://github.com/magento/magento2-samples
Minimal module, Theme, Page, Interception, etc.
![Page 16: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/16.jpg)
My New Slide
![Page 17: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/17.jpg)
![Page 18: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/18.jpg)
Max YekaterynenkoHead of Magento 2 Development
@maksek_ua
![Page 19: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/19.jpg)
Magento 2.0 & Quality
![Page 20: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/20.jpg)
Magento 2 Platform Goals
M2
Modern Tech Stack
Improved Performance &
Scalability
StreamlineCustomization
Simplify ExternalIntegrations
Easier installation & upgrades
High code quality
& testing
![Page 21: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/21.jpg)
Code Quality & Testing
Merchant Extension developer
System Integrator Magento Commerce
![Page 22: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/22.jpg)
“For the first time, testing was fun”
![Page 23: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/23.jpg)
Acceptance
Functional
Performance
Static
Integration & API
Unit
Test types in Magento 2
![Page 24: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/24.jpg)
Unit Test
• Isolated
• Fast
• Mocks, Stubs, Doubles
• Distributed with Module
• PhpUnit https://phpunit.de/
![Page 25: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/25.jpg)
Integration and API
• “Black-box”
• Integration Framework >dev/tests/integration/framework
• Not fast
• PhpUnit
![Page 26: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/26.jpg)
Integration and API
![Page 27: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/27.jpg)
Unit vs Integration
![Page 28: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/28.jpg)
Static
• PHPMD
• PHPCS
• PHPCPD
• Magento-specific integrity tests
• >dev/tests/static/
![Page 29: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/29.jpg)
Performance
• JMeter
• End-To-End Scenarios
![Page 30: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/30.jpg)
Magento Testing Framework
• End user experience testing
• >dev/tests/functional/
• Selenium Webdriver (+Grid)
• Slow, very slow
![Page 31: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/31.jpg)
Magento Testing Framework
![Page 32: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/32.jpg)
Magento Testing Framework
![Page 33: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/33.jpg)
Magento 2 Quality
Unit Tests Integration Web API Functional
16000+ CE4000+ EE
>35%
3200+ CE
400+ EE
640+ CE
50+ EE
300+ scenarios
1000 documented
![Page 34: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/34.jpg)
Magento 2 Quality Stack
![Page 35: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/35.jpg)
GitHub
![Page 36: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/36.jpg)
Code Review
![Page 37: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/37.jpg)
Bamboo
![Page 38: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/38.jpg)
Bamboo
![Page 39: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/39.jpg)
Acceptance Cycle
![Page 40: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/40.jpg)
Travis-CI
![Page 41: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/41.jpg)
Code Quality & Testing
Merchant Extension developer
System Integrator Magento Commerce
![Page 42: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/42.jpg)
![Page 43: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/43.jpg)
Thank you!
Q&A
Anton Kril & Max Yekaterynenko
maksek_ua
![Page 44: Magento 2info2.magento.com/rs/magentosoftware/images/Technical... · 2016-02-05 · Console Application $ bin/magento Magento CLI version 2.0.0 Usage: command [options] [arguments]](https://reader030.vdocuments.site/reader030/viewer/2022041104/5f04ae4a7e708231d40f2cc0/html5/thumbnails/44.jpg)