Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Magento 2 in Today's PHP Universe

Magento 2 in Today's PHP Universe

How is the Magento 2 architecture going to be relevant in today's rapidly-evolving PHP ecosystem? This talk will not only provide a general overview of Magento 2's architecture, but also put it face-to-face with the latest PHP development practices: like the use of Composer, unit and functional testing, modular design, the PSRs, and more!

Gabriel Somoza

October 28, 2015
Tweet

More Decks by Gabriel Somoza

Other Decks in Programming

Transcript

  1. About Me • Started coding around the year 2000 •

    Started working with Magneto around 2011 • PHP Architect @ Cu.be & owner @ Strategery • ZCE & Magento Certified Developer (PLUS) • Organizer of the PHP Limburg meetup in Belgium • Regularly contribute to open-source: • Strategery Infinite-Scroll for Magento • Author of Debugging Magento with NewRelic tutorial • Co-creator of Baleen.org • Contributor to Zend Framework 2, Apigility and related modules
  2. PSR & Magento Standards 0&4 Autoloading Standards 1&2 Code and

    Style Standards 3 Logging Standards Pre-commit hook for phpcs
  3. Additional Magento Standards Standards JS and CSS only inside their

    own separate files HTML only inside PHTML files or jQuery Templates Standards for Semantic HTML structures Javascript & jQuery Coding Standard (w/ JSHint) PHP: DocBlock Standard LESS Coding Standard
  4. Contributions & DoD Standards BC breaks must justify their business

    value Documentation for all changes Unit Tests for all new code (100% covered) Functional Tests to cover external interactions
  5. Installable through Composer Magento 2 CE / EE + Sample

    Data 3rd-party Libraries & Modules Themes Magento 2 and Composer https://repo.magento.com/
  6. Framework Dependencies Magento Framework ACL Zend Framework 2 Cache Currency

    JSON Zend Framework 1 DB Filter HTTP Mail Validate OAuth Uri Stdlib Code HTTP Uri 3. Framework Other (minor)
  7. Object Manager (DI Container) 3. Framework Dependency injection means giving

    an object its instance variables. James Shore, 22 March 2006 Really. That's it. Don’t call us, we’ll call you. The Hollywood Principle
  8. Object Manager (Container) 3. Framework Dependency Injection Lifecycle Management Factory

    & Proxy Compiler Virtual Types Arguments: Literals & String Translation XML Configuration Configuration Scopes Special Patterns
  9. Object Manager (Container) 3. Framework Dependency Injection Lifecycle Management Factory

    & Proxy Compiler Virtual Types Arguments: Literals & String Translation XML Configuration Configuration Scopes Special Patterns
  10. Service Contracts 29 Domain Layer Controllers Blocks Web Services PHP

    Clients Other Modules Data Interfaces Service Interfaces Service Contracts Models Resources Implementations
  11. CSS & LESS 6. Front-end @nice-blue: #5B83AD; @light-blue: @nice-blue +

    #111; #header { color: @light-blue; } UI Library Modular Updates Grunt Tasks & Watchers
  12. Coverage: Other PHP Frameworks 40 Testing 22% WooCommerce 0% PrestaShop

    Being worked on! ? OpenCart Few & not working
  13. Other Types of Tests 41 Testing Unit Integration JavaScript Performance

    Static Code Analysis Functional (Selenium) Integrity magento2/dev/tests