Skip to main content
Blog Magento 2

New Technologies in Magento 2

Mahalakshmi C
August 7, 2015 |
Magento-2

202 Magento users are in the internet Retailer Top 1000 list. Become a Magento user by choosing our Maganeto services and we’ll make it work for you.

Magento2 is touted as a milestone release that will change the face of B2C and B2B ecommerce industry. There is a palpable excitement and fervor among the Magento community as they eagerly await the release. Magento 2 is also widely discussed and dissected by merchants and developers in the blogs, webinars and social media.

Is the buzz real or is it a hyperbole? The Magento2 Merchant beta has been out in the open and is available in GitHub in the following URL…

https://github.com/magento/magento2

Magento also hosted a webinar on Magento 2 Merchant Beta recently. The recording can be viewed in the URL below.

https://goo.gl/agsb3m

The initial feedbacks are encouraging and Magento 2 lives up to the promise of ‘a cutting edge, feature-rich eCommerce solution that gets results’.

As the Magento community waits for the release, let us have a peek into the technologies that has gone into the making of this ground breaking solution.

Key technology changes in Magento2

  • PHP 5.6.x or 5.5.x
  • Apache 2.2 or 2.4
  • MySQL 5.6.x
  • Composer
  • HTML5
  • CSS3
  • RequireJS
  • jQuery
  • Less
  • PSR Compliance
  • Full page caching
  • Magento Testing Framework (MTF)
  • Coding Standards (PSR – 0 , PSR – 1 , PSR – 2 )

Let us dig a little deeper to see the advantages of each technology listed above:

PHP 5.6.x or 5.5.x

  • PHP 5.4 is no longer supported.
  • This highest version of PHP is used to improve the performance and security of the application.
  • Zend Framework2’s is slower when compared to the Zend Framework1 and symphony. So, Zend Framework1 is used.

The below diagram benchmarks the performance of various PHP frameworks…

New Tech in M2

Composer

Main Functionality of composer is as follows:

  • PHP Dependency Manager
  • Handles dependencies per project
  • Package Management (Install , Uninstall and Update)
  • Classes auto loading

Composer in magento2

  • Declaring project dependencies in composer.json
  • Installing dependencies using php composer.phar install
  • Autoloading dependencies by require ‘vendor/autoload.php’.

Required PHP Extensions are declared in composer as follows

HTML5 and CSS3HTML5

  • HTML5 offers a great shopping experience for customers on a variety of devices. Developers can use the powerful APIs and other new features available. 
  • Magento 2 Themes are built with high-responsive look using HTML5. 

CSS3

  • Improves page load speed. 
  • Supports new visual effects like multiple backgrounds, reflections and shadows. 
  • Magento 2 uses LESS, a CSS pre-processor, to address several frontend development requirements. 
  • Using LESS helps developers to customize themes faster and easier. 
  • LESS preprocessor & CSS URL resolver helps to enhance performance, speed up page load, and make the system SEO friendly.

RequireJS

  • The Javascript library used in Magento 2 is jQuery, prototype.js is not used anymore. In Prototype, objects created are represented as functions named ‘klass’, which hides internal methods and data from debugging developer tools. 

In contrast, jQuery libraries typically express objects using just simple javascript hashes.

  • Magento 2 supports RequireJS.

With the latest build however, RequireJS is responsible for loading jQuery UI. This means, we cannot call .autocomplete nor .dialog before we are certain that the UI library has been fully loaded.

RequireJS wraps the jQuery document.ready callback in a require() callback signaling a dependency on the jQuery UI library

Page caching

  • Magento 2 supports Full Page Caching in CE
  • Other Cache Applications:
    • File-system/Redis

Enabled via app/etc/di.xml or app/etc/env.php (NO local.xml)

    • Varnish

Enabled via Stores → Configuration → System → Full Page Cache

Magento Testing Framework (MTF)

  • Facilitates the improvement of Magento Core products.
  • MTF helps in avoiding duplication of test cases automated across the application utilizing data driven approach.
  • With the new and improved Magento Testing Framework, developers will be able to automate functional testing of the developed features/functionalities enabling frequent releases and higher product quality.

Coding Standards

  • PSR-0 (Autoloading standard)
  • PSR-1 (Basic Coding standard)
    • PHP Tags , Character Encodings , namespaces
  • PSR-2 (Coding Style Guide)
    • Declaration , Control statements , closures

The eco system is readying itself by downloading, installing and playing around with the beta code. How the technology changes will affect the themes, plugins, modules and other softwares in the Magento marketplace is yet to be seen. When all is done and over, the community hopes that Magento 2 will live up to its promises and help merchants to grow their business.

References

https://alankent.wordpress.com/2014/12/20/about-magento-2-0-developer-documentation/

https://alankent.wordpress.com/2014/12/06/which-framework-would-you-put-under-magento-2/

http://systemsarchitect.net/performance-benchmark-of-popular-php-frameworks/

http://www.php-fig.org/psr

http://www.quora.com/How-good-is-Magento-2-0-Is-it-fast

https://github.com/magento/mtf

http://www.hellothemes.com/blog/magento-2-say-good-bye-to-prototype/

http://magento.stackexchange.com/questions/33981/magento-2-and-zend-framework-2

http://blog.magestore.com/11-outstanding-features-of-magento-2-part-1/

Magento 2 uses Zend Framework 1 (but it’s not that bad)

Mahalakshmi C

More posts by Mahalakshmi C