Thursday, 18 July 2013

Magento 2 Features

After grand success of Magento in last 4-5 year since 2008,  now Magento Inc is planning for Magento 2. This revolution was expected after June 6, 2011 when eBay owns 100% of Magento. eBay already announced that Magento would join eBay's new X.Commerce initiative. Magento 2 is the part of the same initiative. They have already started the development of magento 2. The biggest thing in magento 2 is it is community developed project. Core of the magento has been modified a lot.

What is new in Magento 2
Almost everything is new in the Magento 2. Lot of major changes in the core of the magento has been performed by the Magento community. Here are some of the glimpse of such changes below:

Directory Structure:
Magento 2 directory structure are little bit different than the magento 1.x directory structure. The major change in the directory structure started from the root directory. In magento 1.x there was 10 directory on the root however in the magento 2 only 6 directories are on the root level. They have created a directory name "pub" and moved JS , SKIN , ERROR, MEDIA folder from root to PUB. Now we can put our valuable code outside of the webserver document root. This is the great Magento 2 Feature.



Module Structure:

Now module become component oriented. This is also one of the good changes made in the magento. Component oriented means the set of module with high code coupling. In one set of the component all module will be packed with the relationship. We can either change the component or enable or disable the component. Now if we want to use magento as the catalog then it is bit eaiser. Because we can disable checkout component. it is the really cool feature.

Goodbye to the Factory Names:

Mage::getModel(‘catalog/product’); is not going to work further in Magento2. From the Magento 2 they have removed the class alias. Now we simply need to put the the Class name in the mage class design pattern method. Like $a = Mage::helper(Mage_Adminhtml_Helper_Data) instead of earlier $a = Mage::helper('adminhtml/helper') or $a = Mage::getModel(‘Mage_Catalog_Model_Product’) instead of Mage::getModel(‘catalog/product’);.
Means all factory method are removed. The way to call models, helpers, controllers and blocks will be different with Magento 2 comparing to previous version.
Now instead of factory name we'll have to use the full class name as below:
=>Mage::helper(‘Mage_Catalog_Helper_Product_View’)
=>Mage::getModel(‘Mage_Catalog_Model_Category’)
=> Mage::getSingleton(‘Mage_Catalog_Model_Session’)

EAV is going to Die slowly:

In the magento 2 they do not have plan to completly remove the EAV. But they are trying to convert more and more section into typical RDBMS tabular structure. Developer of the Magento 2 are planning to provide NoSQL adapter. I think removing EAV is removing complexity. Which make magento 2 more robust. Also it will adapt other RDBMS like Oracle etc easily.

Concept of the View:

They have added the concept of the view in the module. This is the one of the major new changes in the magento 2. This is the replacement of the base design package. Magento has removed the base design package from the Magento 2. Now we didn't need to create configuration file. Just create the view and it will work. Removing the base directory and incorporation of the view is the major new changes in the magento 2. It will save time, complexity and something the module code will be at one place.

ORM:

Magento is planing to support more than one database tool. So as per my assumption they will create their own orm or they will use doctrine or any good orm which support mysql and other database. This change will also make magento more eaisy. Current ORM of the magento is bit complex. If any popular orm will be introduced then it will make our life much easier.

Core Re-factory:

In the Magento 2 all core code is not new but they have made lots of refractory. Major refactory in the code should made magento 2 more robust. Hope new magento will be more efficient and faster then old one.

Performance Optimization:
Lots of complains for the Magento performance till now as it’s built with heavy modular coding framework and EAV (Entity-Attribute-Value) database structure. It’s always recommended that Magento works OKAY on dedicated and cloud servers. Therefore official Magento Developers are keep working to improve performance of Magento in each versions by versions. And with Magento 2.0 the performance of Magento will be more than 20% for sure.

JavaScript Library Changes:
JQuery is presented with Magento 2.0 as main Magento JavaScript Library, and it’s the best action performed by Magento Company. It was always required due to lots of third party graphical feature are built with jQuery and Current Magento is built with Prototype JS library so it was always creating jQuery conflicts

Module Switch ability:
In current version of Magento 1.0 all the main modules like catalog, cms, customer, orders, reports were interrelated and when someone disable any of the module from config.xml it’s always throwing exception as the module you have disabled is dependent to other module. In Magento 2.0 Magento have flexibility to switch and disable any module as those are not interrelated on configuration level.

New Template Structure:
Magento is built on Zend MVC structure, but in Magento 1.0 it was hard to find out direction structure for the Layouts, Skin and HTML files as this files were not followed as per the Zend Folder Structure. Magento 2.0, all the directory structure are similar to Zend Framework Structure. In Magento 2.0 have removed skin and app/design folder and created view folder under the app/code/Namespace/ModuleName and View Folder in it for each module which will include all the images, layout.xml, JS, CSS. So if you want to call any of this files to your phtml file then you have to use new function in PHP which is echo $this->getViewUrl() instead of echo $this->getSkinUrl();

Visual Design Editor:
Now it’s time to rock and roll for the Magento site owner because they need not to worry if they required technical knowledge to operate Magento admin panel to perform layout and Magento eCommerce Web Design related tasks, because Magento 2 have introduce Visual Design Editor with Drag and Drop functionality to manage pages, blocks and other designing related stuffs to align and modify the layout. Almost Design related changes can be done using this visual design editor from Magento backend. It’s nice UI related tool presented with Magento 2.0 to amaze its users with great experience.
Also look and feel of the Magento 2 admin panel is changed with some new and good UI and UX related changes.

Magento2 introduces the new concept of containers:
- Containers can contain blocks.
- Containers can contain other containers.
- Containers render all childrens.

The idea behind containers is to have a new logic structure to clearly organize blocks and define sections of the layout. Containers are used heavily by the Visual Design editor to move blocks around.
Html Blocks-
Block is HTML-Level element on any page which can be easily manipulated using Visual Design Editor, It’s not necessary that if an element contains any content or not, the design editor visually differ it from other elements and supply required controls to drive this stuffs.

Container-
Container is like block a block-level HTML element which will visually differs and drive easily by the visual design editor. Container don’t have its own content but its consists of one or more other blocks or containers. Sort order information is stored by the containers and also it represent area for Dropping.

Introduction of Test and Migration tools:
Magento2 introduced various testing tools like unit testing and api testing located under the dev folder. Apart from this Magento2 comes with the migration tools. Magento2 team has actually put a lot of effort into building a set of migration tools that can be located under dev/tools/migration:
- factory_names.php
- factory_table_names.php



Both files will look for occurrences and calls using the factory names, and it will try to replace the factory names with the actual class names; saving developers a lot of time trying to find and replace all this calls.

Further more:
» Category selection tree is removed from the Magento create and edit product section.
» Drag and Drop features introduced for the product images on product create section in admin panel.
» Also it will allow admin to change attribute sets while adding and editing products.

2 comments :

  1. Thanks for sharing as it is an excellent post would love to read your future post
    Hire Magento Developers

    ReplyDelete
  2. Thanks for sharing this information

    ReplyDelete