Advertisement
Advertisement

More Related Content

Advertisement

Magento 2: New and Innovative? - php[world] 2015

  1. Magento 2: New and Innovative? Presented by: David Alger
  2. Magento 2: New and Innovative? @blackbooker / #phpworld My Experience Magento developer since early 2009 Magento 1 & 2 contributor GitHub Community Moderator Director of Technology at Classy Llama 2
  3. @blackbooker / #phpworldMagento 2: New and Innovative? Magento 2 Everything Has a Story to Tell 3
  4. Magento 2: New and Innovative? @blackbooker / #phpworld History of Magento 4 2009 Enterprise Edition 2008 Magento 1.0 2007 Life Began 2010 1.5 Million DL 2012 4 Million DL 2014 PHP 5.4 2014 Went Responsive 2015 Magento 2.0
  5. Magento 2: New and Innovative? @blackbooker / #phpworld History of Magento 5 Q3 2015 Merchant Beta Q1 2015 M2 Dev RC Q4 2014 M2 Dev Beta November ?? ???????
  6. Magento 2: New and Innovative? @blackbooker / #phpworld Magento 2.0 6 https://github.com/magento/magento2/releases/tag/2.0.0 Available as of November 17
  7. @blackbooker / #phpworldMagento 2: New and Innovative? Terrible two or better brew? Why Magento 2? 7
  8. Magento 2: New and Innovative? @blackbooker / #phpworld The core platform needed to be updated to lay a foundation for future growth. 8
  9. Magento 2: New and Innovative? @blackbooker / #phpworld Magento 2 Platform Goals 9
  10. Magento 2: New and Innovative? @blackbooker / #phpworld Modern Tech Stack 10
  11. Magento 2: New and Innovative? @blackbooker / #phpworld Modern Tech Stack 11
  12. Magento 2: New and Innovative? @blackbooker / #phpworld PHP 7 / HHVM support out of the box 12
  13. Magento 2: New and Innovative? @blackbooker / #phpworld Code Quality & Testing Complete set of unit, integration and static tests Functional testing framework built-in 100% Decoupled Code XML Schema Definitions 13
  14. Magento 2: New and Innovative? @blackbooker / #phpworld Improved Performance & Scalability Full Page Cache in Magento 2 CE Background partial indexers Performance toolkit benchmarks Docker is now supported Split MySql master backends w/MySql Cluster support 14
  15. Magento 2: New and Innovative? @blackbooker / #phpworld Easier Installations & Upgrade Built-in command line tool for developers Web based wizard for simpler use cases Everything delivered via composer… …or a classic tarball for shared hosting providers Semantical versioning 15
  16. Magento 2: New and Innovative? @blackbooker / #phpworld Streamlined Customizations Elimination of the “Mage” God class Insanely less complex object manager Constructor based dependency injection Plugin to nearly anything using interceptors 16
  17. Magento 2: New and Innovative? @blackbooker / #phpworld Simplified External Integrations Consistently versioned PHP & Web Services API REST & SOAP support out of the box WebAPIs operate via same APIs as modules 17
  18. Magento 2: New and Innovative? @blackbooker / #phpworld PSR-0 to PSR-4 compliant 18
  19. Magento 2: New and Innovative? @blackbooker / #phpworld Developer documentation from day one! 19 devdocs.magento.com
  20. Magento 2: New and Innovative? @blackbooker / #phpworld New docs are published on at least a bi-weekly basis. 20 devdocs.magento.com
  21. Magento 2: New and Innovative? @blackbooker / #phpworld Don't waste time slogging through miles of stracktraces. 21 devdocs.magento.com
  22. @blackbooker / #phpworldMagento 2: New and Innovative? Developer Setup Tools you need to get started 22
  23. Magento 2: New and Innovative? @blackbooker / #phpworld System Requirements Apache 2.2 / 2.4 or Nginx 1.8 (or later) PHP 5.6.x or 5.5.x* Smattering of mostly default PHP extensions MySql 5.6.x *There are known issues with 5.5.10–5.5.16 and 5.6.0 23 bit.ly/1O8WxYr
  24. Magento 2: New and Innovative? @blackbooker / #phpworld Magento 2: Installing for Development Vagrant managed virtual machines Docker images per-site and/or service Zend Server also works 24
  25. Magento 2: New and Innovative? @blackbooker / #phpworld VagrantVirtual Machines Fully encapsulated environment Very simple to use Easily maintained / updated OneVM for everything down to one per-site basis 25
  26. Magento 2: New and Innovative? @blackbooker / #phpworld Vagrant Stack Runs single environment for all sites in development Two machines: one for database, one for application Defaults to PHP 5.6 / MySql 5.6 Supports PHP back to 5.3 and MySql 5.1 via alt nodes Works withVirtualBox orVMWare Fusion Currently only tested on OS X 26 https://github.com/davidalger/devenv
  27. Magento 2: New and Innovative? @blackbooker / #phpworld Vagrant Stack dalger:08:58 PM:/sites$ vagrant status Current machine states: db running (virtualbox) web running (virtualbox) web55 not created (virtualbox) web54 not created (virtualbox) web53 not created (virtualbox) db51 not created (virtualbox) solr not created (virtualbox) This environment represents multiple VMs. The VMs are all listed above with their current state. For more information about a specific VM, run `vagrant status NAME`. dalger:08:58 PM:/sites$ 27 https://github.com/davidalger/devenv
  28. Magento 2: New and Innovative? @blackbooker / #phpworld Vagrant Stack /Volumes ├── MacOS -> / └── Server ├── .git ├── .machines │   ├── Server_db_1443482979352_33441 │   └── Server_web_1444062437088_54508 ├── .shared │   ├── composer │   ├── npm │   └── yum ├── .vagrant │   ├── boxes │   ├── data │   ├── gems │   └── machines ├── mysql │   ├── data │   └── data51 ├── proj ├── sites │   ├── __localhost │   ├── m2.demo │   ├── m2.dev │   └── m2dev.dev └── vagrant ├── bin ├── etc ├── lib └── scripts 28 https://github.com/davidalger/devenv
  29. Magento 2: New and Innovative? @blackbooker / #phpworld Docker Images Cross-platform… but still needVM on non-Linux Flexible and powerful for complex deploy scenarios Ensure dev matches prod env 100% on a per-site basis Major downfall? Complexity = steep learning curve 29
  30. Magento 2: New and Innovative? @blackbooker / #phpworld MageInferno Images Single responsibility images Docker compose for easier daily use Built on top of Dinghy by CodeKitchen 30 https://github.com/mageinferno
  31. Magento 2: New and Innovative? @blackbooker / #phpworld Single Use Docker Image Provided by the Magento team Really only for development use Single image for all services Run one instance per-site Simple, but doesn't really utilize full power of docker 31 https://github.com/magento/magento2-docker
  32. @blackbooker / #phpworldMagento 2: New and Innovative? Plugins Amazingly simple… 32
  33. Magento 2: New and Innovative? @blackbooker / #phpworld Plugins Plugins work using technique called interception They are implemented in context of a module You write your plugins; interceptor code is generated 33
  34. Magento 2: New and Innovative? @blackbooker / #phpworld Makings of a Plugin app/code/Alger └── Skeleton ├── composer.json ├── etc │   ├── di.xml │   └── module.xml ├── Plugin │   └── Product.php └── registration.php 34 https://github.com/davidalger/phpworld-talk1
  35. Magento 2: New and Innovative? @blackbooker / #phpworld registration.php use MagentoFrameworkComponentComponentRegistrar; ComponentRegistrar::register( ComponentRegistrar::MODULE, 'Alger_Skeleton', __DIR__ ); 35 https://github.com/davidalger/phpworld-talk1
  36. Magento 2: New and Innovative? @blackbooker / #phpworld module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Alger_Skeleton" setup_version="1.0.0"> <sequence> <module name="Magento_Catalog"/> </sequence> </module> </config> 36 https://github.com/davidalger/phpworld-talk1
  37. Magento 2: New and Innovative? @blackbooker / #phpworld composer.json { "name": "alger/module-skeleton", "type": "magento2-module", "require": { "magento/framework": "*" }, "autoload": { "files": [ "registration.php" ], "psr-4": { "AlgerSkeleton": "" } } } 37 https://github.com/davidalger/phpworld-talk1
  38. Magento 2: New and Innovative? @blackbooker / #phpworld di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="MagentoCatalogModelProduct"> <plugin name="Alger_Skeleton::Product" type="AlgerSkeletonPluginProduct"/> </type> </config> 38 https://github.com/davidalger/phpworld-talk1
  39. Magento 2: New and Innovative? @blackbooker / #phpworld Plugin.php namespace AlgerSkeletonPlugin; use MagentoCatalogModelProduct as Target; class Product { public function afterGetName(Target $subject, $result) { return 'AWESOME << ' . $result . ' >> UNICORN'; } } 39 https://github.com/davidalger/phpworld-talk1
  40. Magento 2: New and Innovative? @blackbooker / #phpworld Installing our Plugin $ composer config repositories.alger/phpworld-talk1 vcs git@github.com:davidalger/phpworld-talk1.git $ composer require alger/module-skeleton:dev-master $ bin/magento setup:upgrade -q && bin/magento cache:flush -q $ git clone git@github.com:davidalger/phpworld-talk1.git app/code/Alger/Skeleton $ bin/magento module:enable Alger_Skeleton $ bin/magento setup:upgrade -q && bin/magento cache:flush -q 40 bit.ly/1POOly5 OR
  41. Magento 2: New and Innovative? @blackbooker / #phpworld Before vs After 41
  42. Magento 2: New and Innovative? @blackbooker / #phpworld Keep in Touch! 42 @blackbooker https://github.com/davidalger http://davidalger.com https://joind.in/14789 Developer Hub Documentation Community GitHub Magento U http://magento.com/developers/magento2 http://devdocs.magento.com http://github.com/magento/magento2 http://magento.com/training/catalog/magento-2
Advertisement