SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
Legal Notice
Copyright © 2014 Magento, Inc. All Rights Reserved.
Magento®, eBay Enterprise™ and their respective logos are trademarks, service marks,
registered trademarks, or registered service marks of eBay, Inc. or its subsidiaries. Other
trademarks or service marks contained in this presentation are the property of the respective
companies with which they are associated.
This presentation is for informational and discussion purposes only and should not be construed
as a commitment of Magento, Inc. or GSI Commerce, Inc. d/b/a eBay Enterprise (“eBay
Enterprise”) or of any of their subsidiaries or affiliates. While we attempt to ensure the accuracy,
completeness and adequacy of this presentation, neither Magento, Inc., eBay Enterprise nor any
of their subsidiaries or affiliates are responsible for any errors or will be liable for the use of, or
reliance upon, this presentation or any of the information contained in it. Unauthorized use,
disclosure or dissemination of this information is expressly prohibited.
Magento 2 Development Practices:
Rolling up the Sleeves
Ben Marks
Magento Evangelist
Magento 2 Platform Goals
Magento 2 Platform Goals
•  Update Technology Stack
•  Streamline Customization Process
•  Enable Easier Upgrades
•  Improve Performance and Scalability
•  Maintain High Quality
•  Closely Engage with Community
Max Pronko
Engineering Manager
Commerce Services, Magento
A Day with Magento Team
Today’s Agenda
1.  Magento 2 Installation
2.  Building an Extension
3.  Contribution to Magento 2
Magento 2 Installation1
First you need to know…
Technology Stack
5.4+ 5.1+ 2.2+ 3.7+
Technology Stack - Client Side
user	
  interface	
  
Get latest Magento 2
git	
  clone	
  https://github.com/magento/magento2	
  
magento/magento2
Before you install…
1.  local.xml file shouldn’t exist
2.  Writable directories:
–  pub/media	
  
–  pub/static	
  
–  var	
  
3.  Create database
$	
  mysql>	
  create	
  database	
  magento2;	
  
Magento 2 Installation Wizard
Magento 2 Installation Tool
<magento>/dev/shell/install.php	
  
Install Application example:
$	
  php	
  -­‐f	
  install.php	
  -­‐-­‐	
  [-­‐-­‐<install_option_name>	
  <option_value>,	
  ...]	
  
Uninstall Application example:
$	
  php	
  -­‐f	
  install.php	
  -­‐-­‐	
  -­‐-­‐uninstall	
  
Display Available install options:
$	
  php	
  -­‐f	
  install.php	
  -­‐-­‐	
  -­‐-­‐show_install_options	
  
Building an Extension2
Your Development Environment
•  Xdebug PHP extension:
–  stack and function traces in error messages
–  memory allocation
–  code coverage analysis
–  … and more
•  Apache mod_env module
Your Development Environment
•  Developer mode
•  Magento Profiler (csv, firebug, html)
<VirtualHost	
  *:80>	
  	
  
	
  SetEnv	
  MAGE_MODE	
  "developer"	
  	
  
	
  SetEnv	
  MAGE_PROFILER	
  “firebug"	
  	
  
</VirtualHost>	
  
<magento>/.htaccess	
  file	
  
Application Mode
Default Developer Production
•  Not optimized
•  Static files
materialization
•  Errors in var/report
•  Exception is
displayed in output
•  System logging
•  Optimized
•  Disabled fallback
mechanism for view
files
•  Errors in var/report
Magento 2 Coding Standards
PHP
•  PSRs
•  Zend Framework
•  PHPMD and PMD
JavaScript
•  Google JavaScript Style Guide
PHP Standard Recommendation
PSR-0: Autoloader
Standard
PSR-1: Basic Coding
Standard
PSR-2: Coding Style
•  Top level namespace
“Vendor Name”
•  Lower and upper cases
for names
•  File <?php or <?=
tags only
•  UTF-8 for PHP code
•  StudlyCaps class
names
•  UPPER_CASE
constants
•  camelCase method
names
•  Spaces
•  Line length
•  Opening braces
•  Method and
properties visibility
•  Opening parenthesis
PSR-0: Autoloader Standard
lib/Magento/Framework/Code/Minifier.php	
  
namespace	
  MagentoFrameworkCode;	
  
	
  
use	
  MagentoFrameworkFilesystemDirectoryRead;	
  
	
  
class	
  Minifier	
  
{	
  
	
  	
  	
  	
  //some	
  code	
  
}	
  
1	
  
2	
  
3	
  
4	
  
5	
  
6	
  
7	
  
8	
  
PSR-1 and PSR-2
namespace	
  MagentoFrameworkApp;	
  
	
  
class	
  Area	
  implements	
  AreaInterface	
  
{	
  
	
  	
  	
  	
  const	
  AREA_FRONTEND	
  =	
  ‘frontend’;	
  
	
  
	
  	
  	
  	
  public	
  function	
  detectDesign($request	
  =	
  null)	
  
	
  {	
  
	
   	
  if	
  ($this-­‐>_code	
  ==	
  self::AREA_FRONTEND)	
  {	
  
	
   	
   	
  $isDesignException	
  =	
  $request	
  &&	
  $this-­‐>_apply($request);	
  
	
   	
   	
  if	
  ($isDesignException)	
  {	
  
	
   	
   	
   	
  $this-­‐>_design-­‐>loadChange(	
  
	
   	
   	
   	
   	
  $this-­‐>_scopeResolver-­‐>getScope()-­‐>getId()	
  
	
   	
   	
   	
  );	
  
	
   	
   	
   	
  }	
  
	
   	
  }	
  
	
  }	
  
}	
  
1	
  
2	
  
3	
  
4	
  
5	
  
6	
  
7	
  
8	
  
9	
  
10	
  
11	
  
12	
  
13	
  
14	
  
15	
  
16	
  
17	
  
18	
  
Documentation Blocks Coding Standard
http://www.phpdoc.org
Magento Coding Standard for Documentation Blocks
Developer's Guide / Coding Standards
/**
* Short description
*
* @param string $argument
* @return bool
* @link http://example.com
*/
Magento 2 Product Documentation
Guides
Product Updates
Webinars
Backwards Incompatible Changes
http://wiki.magento.com
Going to Production?3
We are going to production
Testing
Deployment
Preparation
Production
Mode
Available Tests
TestsUnit
Integration
JavaScript
Performance
Static Code
Analysis
Integrity,
Legacy
Functional
Running tests
•  Bulk run
	
  	
  
•  Test suite
$	
  php	
  -­‐f	
  dev/tools/tests.php	
  -­‐-­‐	
  type::all	
  
$	
  phpunit	
  dev/tests/<test_type>/	
  testsuite	
  
Running tests in IDE
Functional Tests
•  Requirements
–  Selenium WebDriver
–  Magento Testing Framework (MTF)
•  Install MTF with composer
•  Run tests
Magento Testing Framework
git	
  clone	
  https://github.com/magento/mtf	
  
Magento Testing Framework Guidelines
Developer's Guide / Testing
magento/mtf
Pre-deployment Tools
Internalization – I18n Tool
2 columns CSV-file example
"Add to Cart","Zum Warenkobrn hinzufügen"
"Add to Compare","Hinzufügen um zu vergleichen"
Files location
<magento>/app/code/Magento/Checkout/i18n/pt_BR.csv	
  
<magento>/app/design/frontend/magento_demo/i18n/pt_BR.csv	
  
<magento>/dev/tools/Magento/Tools/I18n/	
  
Internalization – I18n Tool
Recover phrases from source code
$	
  php	
  –f	
  generator.php	
  -­‐-­‐	
  -­‐d	
  page/to/Magento/source/code	
  >	
  
generated.csv	
  
<magento>/dev/tools/Magento/Tools/I18n/	
  
$	
  php	
  -­‐f	
  pack.php	
  -­‐-­‐	
  -­‐l	
  de_DE	
  -­‐p	
  /path/to/target/directory	
  -­‐s	
  
generated.csv	
  
Result: de_DE.csv
Create language package
Definition Compilation Tool
Generate
Factories Proxies Interceptors
Compile
Plugin Definitions Class Inheritance
$	
  php	
  compiler.php	
  -­‐-­‐	
  -­‐-­‐help	
  
<magento>/dev/tools/Magento/Tools/Di/	
  
View Files Deployment Tool
•  Templates
•  Locale files
•  Static files
Library
Modules
Themes
adminhtml
frontend
install
System View Files pub/static directory
Materializes
$	
  php	
  deploy.php	
  -­‐-­‐	
  -­‐-­‐help	
  
<magento>/dev/tools/Magento/Tools/View/	
  
Class Map Generator Tool
Class Map Generators
Log-based File system-based
array('MagentoClass'	
  =>	
  'app/code/Magento/Class.php')	
  
<magento>/var/classmap.ser	
  
$	
  php	
  -­‐f	
  fs_generator.php	
  ./app	
  >	
  ./var/classmap.ser	
  
<magento>/dev/tools/Magento/Tools/classmap/	
  
Generate class map command example:
Contribution to Magento 24
M2 Public GitHub Repository Status
Pull
requests
159
Issues
257
Processed, overall Average, month
12+
Verify changes with Travis CI
magento/magento2
Contribution to Magento 2
FUN.
EASY TO CUSTOMIZE.
BEING INVOLVED IN…
PLATFORM THAT GROWS
Links
https://wiki.magento.com/display/MAGE2DOC
https://github.com/magento
https://travis-ci.org/magento/magento2
Thank you
Q&A
mpronko@ebay.comMax Pronko
bemarks@ebay.comBen Marks

Contenu connexe

Tendances

Desenvolvimento Mobile Híbrido
Desenvolvimento Mobile HíbridoDesenvolvimento Mobile Híbrido
Desenvolvimento Mobile HíbridoJuliano Martins
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentIvan Chepurnyi
 
Aleksey Bogachuk - "Offline Second"
Aleksey Bogachuk - "Offline Second"Aleksey Bogachuk - "Offline Second"
Aleksey Bogachuk - "Offline Second"IT Event
 
WordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin PagesWordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin PagesBrandon Dove
 
2012.sandiego.wordcamp
2012.sandiego.wordcamp2012.sandiego.wordcamp
2012.sandiego.wordcampBrandon Dove
 
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsWhat Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsDoris Chen
 
So you want to build a Facebook app
So you want to build a Facebook appSo you want to build a Facebook app
So you want to build a Facebook appkamal.fariz
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsVforce Infotech
 
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...Peter Martin
 
Widget Summit 2008
Widget Summit 2008Widget Summit 2008
Widget Summit 2008Volkan Unsal
 
Joomla 3 Component programmeren met RAD - Joomladagen 2014
Joomla 3 Component programmeren met RAD - Joomladagen 2014Joomla 3 Component programmeren met RAD - Joomladagen 2014
Joomla 3 Component programmeren met RAD - Joomladagen 2014Peter Martin
 
User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!Greg Bell
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshopArjen Miedema
 
Magento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kcMagento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kcSuman KC
 
Troubleshooting Joomla! problems - Joomladay Germany 2014
Troubleshooting Joomla! problems - Joomladay Germany 2014Troubleshooting Joomla! problems - Joomladay Germany 2014
Troubleshooting Joomla! problems - Joomladay Germany 2014Peter Martin
 
How to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension TutorialHow to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension TutorialHendy Irawan
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Doris Chen
 

Tendances (20)

Desenvolvimento Mobile Híbrido
Desenvolvimento Mobile HíbridoDesenvolvimento Mobile Híbrido
Desenvolvimento Mobile Híbrido
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
 
Php 7 evolution
Php 7 evolutionPhp 7 evolution
Php 7 evolution
 
Aleksey Bogachuk - "Offline Second"
Aleksey Bogachuk - "Offline Second"Aleksey Bogachuk - "Offline Second"
Aleksey Bogachuk - "Offline Second"
 
WordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin PagesWordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin Pages
 
2012.sandiego.wordcamp
2012.sandiego.wordcamp2012.sandiego.wordcamp
2012.sandiego.wordcamp
 
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsWhat Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
 
So you want to build a Facebook app
So you want to build a Facebook appSo you want to build a Facebook app
So you want to build a Facebook app
 
PHP & MVC
PHP & MVCPHP & MVC
PHP & MVC
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web Applications
 
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
 
Widget Summit 2008
Widget Summit 2008Widget Summit 2008
Widget Summit 2008
 
Upload[1]
Upload[1]Upload[1]
Upload[1]
 
Joomla 3 Component programmeren met RAD - Joomladagen 2014
Joomla 3 Component programmeren met RAD - Joomladagen 2014Joomla 3 Component programmeren met RAD - Joomladagen 2014
Joomla 3 Component programmeren met RAD - Joomladagen 2014
 
User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
 
Magento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kcMagento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kc
 
Troubleshooting Joomla! problems - Joomladay Germany 2014
Troubleshooting Joomla! problems - Joomladay Germany 2014Troubleshooting Joomla! problems - Joomladay Germany 2014
Troubleshooting Joomla! problems - Joomladay Germany 2014
 
How to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension TutorialHow to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension Tutorial
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
 

En vedette

Progettazione architettonica struttura in legno
Progettazione architettonica struttura in legnoProgettazione architettonica struttura in legno
Progettazione architettonica struttura in legnoGiulio Canzanella
 
2015 2016 tourism advancement program initiatives
2015 2016 tourism advancement program initiatives2015 2016 tourism advancement program initiatives
2015 2016 tourism advancement program initiativesfiqihrifai
 
وطن الشموس
وطن الشموسوطن الشموس
وطن الشموسHussa Hamad
 
management basics(important notes)
management basics(important notes)management basics(important notes)
management basics(important notes)VAibhav Negi
 
Adverse effect of theraputic & and; drug of abuse
Adverse effect of theraputic & and; drug of abuseAdverse effect of theraputic & and; drug of abuse
Adverse effect of theraputic & and; drug of abusebabar ali
 
Top Images Internet R25
Top Images Internet R25Top Images Internet R25
Top Images Internet R25guestd9b2cb
 
Computer basics(revision notes)
Computer basics(revision notes)Computer basics(revision notes)
Computer basics(revision notes)VAibhav Negi
 
Intercostal space
Intercostal spaceIntercostal space
Intercostal spacebabar ali
 
Wbc's disorders
Wbc's disordersWbc's disorders
Wbc's disordersbabar ali
 
1 Vieillesaffiches
1 Vieillesaffiches1 Vieillesaffiches
1 Vieillesaffichesguestd9b2cb
 
Un Coeur D Amour Eb
Un Coeur D Amour  EbUn Coeur D Amour  Eb
Un Coeur D Amour Ebguestd9b2cb
 

En vedette (20)

Progettazione architettonica struttura in legno
Progettazione architettonica struttura in legnoProgettazione architettonica struttura in legno
Progettazione architettonica struttura in legno
 
2015 2016 tourism advancement program initiatives
2015 2016 tourism advancement program initiatives2015 2016 tourism advancement program initiatives
2015 2016 tourism advancement program initiatives
 
وطن الشموس
وطن الشموسوطن الشموس
وطن الشموس
 
management basics(important notes)
management basics(important notes)management basics(important notes)
management basics(important notes)
 
CV Europass
CV EuropassCV Europass
CV Europass
 
SulimanCV1
SulimanCV1SulimanCV1
SulimanCV1
 
Blackstone group
Blackstone groupBlackstone group
Blackstone group
 
Anecdote assignment
Anecdote assignmentAnecdote assignment
Anecdote assignment
 
Adverse effect of theraputic & and; drug of abuse
Adverse effect of theraputic & and; drug of abuseAdverse effect of theraputic & and; drug of abuse
Adverse effect of theraputic & and; drug of abuse
 
Top Images Internet R25
Top Images Internet R25Top Images Internet R25
Top Images Internet R25
 
Computer basics(revision notes)
Computer basics(revision notes)Computer basics(revision notes)
Computer basics(revision notes)
 
Conduite projet session 3
Conduite projet session 3Conduite projet session 3
Conduite projet session 3
 
Babarali
BabaraliBabarali
Babarali
 
Intercostal space
Intercostal spaceIntercostal space
Intercostal space
 
Wbc's disorders
Wbc's disordersWbc's disorders
Wbc's disorders
 
Genotype
GenotypeGenotype
Genotype
 
Bon Appetit!
Bon Appetit!Bon Appetit!
Bon Appetit!
 
1 Vieillesaffiches
1 Vieillesaffiches1 Vieillesaffiches
1 Vieillesaffiches
 
Un Coeur D Amour Eb
Un Coeur D Amour  EbUn Coeur D Amour  Eb
Un Coeur D Amour Eb
 
Joyeux Noel
Joyeux NoelJoyeux Noel
Joyeux Noel
 

Similaire à Zepplin_Pronko_Magento_Festival Hall 1_Final

php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101Mathew Beane
 
Minimizing Magento Upgrade Downtime - Oleksandr Zarichnyi - Imagine Commerce ...
Minimizing Magento Upgrade Downtime - Oleksandr Zarichnyi - Imagine Commerce ...Minimizing Magento Upgrade Downtime - Oleksandr Zarichnyi - Imagine Commerce ...
Minimizing Magento Upgrade Downtime - Oleksandr Zarichnyi - Imagine Commerce ...Oleksandr Zarichnyi
 
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Sergii Shymko
 
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016Dusan Lukic
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2Sergii Shymko
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101Mathew Beane
 
Running Magento 1.x Extension on Magento 2
Running Magento 1.x Extension on Magento 2Running Magento 1.x Extension on Magento 2
Running Magento 1.x Extension on Magento 2Sergii Shymko
 
Magento 2 integration tests
Magento 2 integration testsMagento 2 integration tests
Magento 2 integration testsDusan Lukic
 
Hire Magento 2 developer India, Call us for more
Hire Magento 2 developer India, Call us for more Hire Magento 2 developer India, Call us for more
Hire Magento 2 developer India, Call us for more AResourcePool
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2Mathew Beane
 
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauMeet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauAmasty
 
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...I-Verve Inc
 
Mantis Bug Tracker Certification
Mantis Bug Tracker CertificationMantis Bug Tracker Certification
Mantis Bug Tracker CertificationVskills
 
Rock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment WorkflowsRock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment WorkflowsAOE
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsDECK36
 
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupMagento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupKelly Mason
 
Testing and deploying Hats Application on apache Geronimo Server 1.1
Testing and deploying Hats Application on apache Geronimo Server 1.1Testing and deploying Hats Application on apache Geronimo Server 1.1
Testing and deploying Hats Application on apache Geronimo Server 1.1Royal Cyber Inc.
 
Diagnosing WordPress: What to do when things go wrong
Diagnosing WordPress: What to do when things go wrongDiagnosing WordPress: What to do when things go wrong
Diagnosing WordPress: What to do when things go wrongWordCamp Sydney
 
Django Developer Certification
Django Developer CertificationDjango Developer Certification
Django Developer CertificationVskills
 

Similaire à Zepplin_Pronko_Magento_Festival Hall 1_Final (20)

php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Minimizing Magento Upgrade Downtime - Oleksandr Zarichnyi - Imagine Commerce ...
Minimizing Magento Upgrade Downtime - Oleksandr Zarichnyi - Imagine Commerce ...Minimizing Magento Upgrade Downtime - Oleksandr Zarichnyi - Imagine Commerce ...
Minimizing Magento Upgrade Downtime - Oleksandr Zarichnyi - Imagine Commerce ...
 
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2
 
Magento 2 development
Magento 2 developmentMagento 2 development
Magento 2 development
 
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101
 
Running Magento 1.x Extension on Magento 2
Running Magento 1.x Extension on Magento 2Running Magento 1.x Extension on Magento 2
Running Magento 1.x Extension on Magento 2
 
Magento 2 integration tests
Magento 2 integration testsMagento 2 integration tests
Magento 2 integration tests
 
Hire Magento 2 developer India, Call us for more
Hire Magento 2 developer India, Call us for more Hire Magento 2 developer India, Call us for more
Hire Magento 2 developer India, Call us for more
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2
 
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauMeet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir Kalashnikau
 
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
 
Mantis Bug Tracker Certification
Mantis Bug Tracker CertificationMantis Bug Tracker Certification
Mantis Bug Tracker Certification
 
Rock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment WorkflowsRock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment Workflows
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
 
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupMagento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
 
Testing and deploying Hats Application on apache Geronimo Server 1.1
Testing and deploying Hats Application on apache Geronimo Server 1.1Testing and deploying Hats Application on apache Geronimo Server 1.1
Testing and deploying Hats Application on apache Geronimo Server 1.1
 
Diagnosing WordPress: What to do when things go wrong
Diagnosing WordPress: What to do when things go wrongDiagnosing WordPress: What to do when things go wrong
Diagnosing WordPress: What to do when things go wrong
 
Django Developer Certification
Django Developer CertificationDjango Developer Certification
Django Developer Certification
 

Plus de Max Pronko

Mastering Declarative Database Schema - MageConf 2019
Mastering Declarative Database Schema - MageConf 2019Mastering Declarative Database Schema - MageConf 2019
Mastering Declarative Database Schema - MageConf 2019Max Pronko
 
Service Oriented Architecture in Magento 2
Service Oriented Architecture in Magento 2Service Oriented Architecture in Magento 2
Service Oriented Architecture in Magento 2Max Pronko
 
Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017Max Pronko
 
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMagento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMax Pronko
 
Checkout in Magento 2 by Max Pronko
Checkout in Magento 2 by Max PronkoCheckout in Magento 2 by Max Pronko
Checkout in Magento 2 by Max PronkoMax Pronko
 
Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Max Pronko
 
Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2Max Pronko
 

Plus de Max Pronko (7)

Mastering Declarative Database Schema - MageConf 2019
Mastering Declarative Database Schema - MageConf 2019Mastering Declarative Database Schema - MageConf 2019
Mastering Declarative Database Schema - MageConf 2019
 
Service Oriented Architecture in Magento 2
Service Oriented Architecture in Magento 2Service Oriented Architecture in Magento 2
Service Oriented Architecture in Magento 2
 
Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017
 
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMagento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
 
Checkout in Magento 2 by Max Pronko
Checkout in Magento 2 by Max PronkoCheckout in Magento 2 by Max Pronko
Checkout in Magento 2 by Max Pronko
 
Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2
 
Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2
 

Zepplin_Pronko_Magento_Festival Hall 1_Final

  • 1.
  • 2. Legal Notice Copyright © 2014 Magento, Inc. All Rights Reserved. Magento®, eBay Enterprise™ and their respective logos are trademarks, service marks, registered trademarks, or registered service marks of eBay, Inc. or its subsidiaries. Other trademarks or service marks contained in this presentation are the property of the respective companies with which they are associated. This presentation is for informational and discussion purposes only and should not be construed as a commitment of Magento, Inc. or GSI Commerce, Inc. d/b/a eBay Enterprise (“eBay Enterprise”) or of any of their subsidiaries or affiliates. While we attempt to ensure the accuracy, completeness and adequacy of this presentation, neither Magento, Inc., eBay Enterprise nor any of their subsidiaries or affiliates are responsible for any errors or will be liable for the use of, or reliance upon, this presentation or any of the information contained in it. Unauthorized use, disclosure or dissemination of this information is expressly prohibited.
  • 3. Magento 2 Development Practices: Rolling up the Sleeves
  • 6. Magento 2 Platform Goals •  Update Technology Stack •  Streamline Customization Process •  Enable Easier Upgrades •  Improve Performance and Scalability •  Maintain High Quality •  Closely Engage with Community
  • 8. A Day with Magento Team
  • 9. Today’s Agenda 1.  Magento 2 Installation 2.  Building an Extension 3.  Contribution to Magento 2
  • 11. First you need to know… Technology Stack 5.4+ 5.1+ 2.2+ 3.7+
  • 12. Technology Stack - Client Side user  interface  
  • 13. Get latest Magento 2 git  clone  https://github.com/magento/magento2   magento/magento2
  • 14. Before you install… 1.  local.xml file shouldn’t exist 2.  Writable directories: –  pub/media   –  pub/static   –  var   3.  Create database $  mysql>  create  database  magento2;  
  • 16. Magento 2 Installation Tool <magento>/dev/shell/install.php   Install Application example: $  php  -­‐f  install.php  -­‐-­‐  [-­‐-­‐<install_option_name>  <option_value>,  ...]   Uninstall Application example: $  php  -­‐f  install.php  -­‐-­‐  -­‐-­‐uninstall   Display Available install options: $  php  -­‐f  install.php  -­‐-­‐  -­‐-­‐show_install_options  
  • 17.
  • 19. Your Development Environment •  Xdebug PHP extension: –  stack and function traces in error messages –  memory allocation –  code coverage analysis –  … and more •  Apache mod_env module
  • 20. Your Development Environment •  Developer mode •  Magento Profiler (csv, firebug, html) <VirtualHost  *:80>      SetEnv  MAGE_MODE  "developer"      SetEnv  MAGE_PROFILER  “firebug"     </VirtualHost>   <magento>/.htaccess  file  
  • 21. Application Mode Default Developer Production •  Not optimized •  Static files materialization •  Errors in var/report •  Exception is displayed in output •  System logging •  Optimized •  Disabled fallback mechanism for view files •  Errors in var/report
  • 22. Magento 2 Coding Standards PHP •  PSRs •  Zend Framework •  PHPMD and PMD JavaScript •  Google JavaScript Style Guide
  • 23. PHP Standard Recommendation PSR-0: Autoloader Standard PSR-1: Basic Coding Standard PSR-2: Coding Style •  Top level namespace “Vendor Name” •  Lower and upper cases for names •  File <?php or <?= tags only •  UTF-8 for PHP code •  StudlyCaps class names •  UPPER_CASE constants •  camelCase method names •  Spaces •  Line length •  Opening braces •  Method and properties visibility •  Opening parenthesis
  • 24. PSR-0: Autoloader Standard lib/Magento/Framework/Code/Minifier.php   namespace  MagentoFrameworkCode;     use  MagentoFrameworkFilesystemDirectoryRead;     class  Minifier   {          //some  code   }   1   2   3   4   5   6   7   8  
  • 25. PSR-1 and PSR-2 namespace  MagentoFrameworkApp;     class  Area  implements  AreaInterface   {          const  AREA_FRONTEND  =  ‘frontend’;            public  function  detectDesign($request  =  null)    {      if  ($this-­‐>_code  ==  self::AREA_FRONTEND)  {        $isDesignException  =  $request  &&  $this-­‐>_apply($request);        if  ($isDesignException)  {          $this-­‐>_design-­‐>loadChange(            $this-­‐>_scopeResolver-­‐>getScope()-­‐>getId()          );          }      }    }   }   1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18  
  • 26. Documentation Blocks Coding Standard http://www.phpdoc.org Magento Coding Standard for Documentation Blocks Developer's Guide / Coding Standards /** * Short description * * @param string $argument * @return bool * @link http://example.com */
  • 27. Magento 2 Product Documentation Guides Product Updates Webinars Backwards Incompatible Changes http://wiki.magento.com
  • 29. We are going to production Testing Deployment Preparation Production Mode
  • 31. Running tests •  Bulk run     •  Test suite $  php  -­‐f  dev/tools/tests.php  -­‐-­‐  type::all   $  phpunit  dev/tests/<test_type>/  testsuite  
  • 33. Functional Tests •  Requirements –  Selenium WebDriver –  Magento Testing Framework (MTF) •  Install MTF with composer •  Run tests
  • 34. Magento Testing Framework git  clone  https://github.com/magento/mtf   Magento Testing Framework Guidelines Developer's Guide / Testing magento/mtf
  • 36. Internalization – I18n Tool 2 columns CSV-file example "Add to Cart","Zum Warenkobrn hinzufügen" "Add to Compare","Hinzufügen um zu vergleichen" Files location <magento>/app/code/Magento/Checkout/i18n/pt_BR.csv   <magento>/app/design/frontend/magento_demo/i18n/pt_BR.csv   <magento>/dev/tools/Magento/Tools/I18n/  
  • 37. Internalization – I18n Tool Recover phrases from source code $  php  –f  generator.php  -­‐-­‐  -­‐d  page/to/Magento/source/code  >   generated.csv   <magento>/dev/tools/Magento/Tools/I18n/   $  php  -­‐f  pack.php  -­‐-­‐  -­‐l  de_DE  -­‐p  /path/to/target/directory  -­‐s   generated.csv   Result: de_DE.csv Create language package
  • 38. Definition Compilation Tool Generate Factories Proxies Interceptors Compile Plugin Definitions Class Inheritance $  php  compiler.php  -­‐-­‐  -­‐-­‐help   <magento>/dev/tools/Magento/Tools/Di/  
  • 39. View Files Deployment Tool •  Templates •  Locale files •  Static files Library Modules Themes adminhtml frontend install System View Files pub/static directory Materializes $  php  deploy.php  -­‐-­‐  -­‐-­‐help   <magento>/dev/tools/Magento/Tools/View/  
  • 40. Class Map Generator Tool Class Map Generators Log-based File system-based array('MagentoClass'  =>  'app/code/Magento/Class.php')   <magento>/var/classmap.ser   $  php  -­‐f  fs_generator.php  ./app  >  ./var/classmap.ser   <magento>/dev/tools/Magento/Tools/classmap/   Generate class map command example:
  • 42. M2 Public GitHub Repository Status Pull requests 159 Issues 257 Processed, overall Average, month 12+
  • 43. Verify changes with Travis CI magento/magento2
  • 44. Contribution to Magento 2 FUN. EASY TO CUSTOMIZE. BEING INVOLVED IN… PLATFORM THAT GROWS