Friday, 10 April 2015

Migrating from Magento 1 to 2

 Magento2 is not just an update. It’s more like a giant stride upwards. Magento2 has been developed to empower developers to effectively address the needs of merchants. This includes making architectural changes, updating the technology stack and streamlining the customization process to improve performance. The update signals a sea-change from the past as Magento2 says goodbye to Mage, the God class of Magento.
Due to the absence of Mage God class, testing code is expected to be a lot easier as Integration, Unit, jUnit, Static, legacy and migration tests would all be wrapped under a single testing framework. This has been done to improve code quality and reduce complexity.
The new version will support PHP version 5.4 and above even though the CLI web server may not be fully supported. Also, MySQL 5.6 or above will be supported by the new version. Now, MySQL 5.6 brings with it a whole range of performance improvements such as multi range read, multi-threaded purge, file sort optimization, full InnoDB integration, memcachedAPI and reduced overhead.
Apart from these improvements, there are some major changes in Magento2 to be looked at in detail. The first among them is its New file structure. Firstly, everything is placed directly under the app structure and secondly, every module has its own VIEW directory which allows you to access all template, layout, js and css files of any specific module. This gives developers opportunities for customization without changing the functionality of the core site.
The four types of directories in the new file structure are Primary, System, Application and Public directories. The location of the application and public directories can be changed by running the EntryPoint class. The application and public directories can be configured via config.xml file.
The second most impressive thing about Magento2 is the streamlined customization process that provides swift implementation. The key changes in customization include:
1. Reduction in code coupling as the ‘Mage’ object has been broken down into many smaller objects
2. Limitless theme inheritance as new elements can easily be created by overwriting elements of an inherited theme.
3. Improved error reporting for XML files and speed translation such as streamlining of il8n localization dictionaries.
Yet another significant feature introduced in Magento 2 is Service Contracts for simplifying the use of APIs. It is basically a set of PHP Interfaces being used for improving and simplifying the use of APIs for different kinds of modules. With this feature, it is easier for the developer to gather an in-depth understanding of public API endpoints.

No comments:

Post a Comment