Magento’s Architecture
The study of Magento’s Architecture is the basic need for Magento Development. To have the Magento code base secure and scalable, it is built on top of the Zend Framework. There are many reasons for choosing the Zend Framework to build Magento. The main reason is that Zend supports with an object-oriented library of code with a committed company standing behind it.
Using this framework, Magento was built with 3 important factors in mind.
1. Flexibility: We believe each solution should be as unique as every business is unique. Magento’s code facilitates for seamless customizations.
2. Upgradeable framework: Separate the core code from community and local customizations and Magento can be easily customized without interfering the ability to upgrade.
3. Speed with Security: The coding standards used by the developers in Magento development follow best practices to maximize the capability of the software and to provide a secure online storefront.
We shall see the key concepts and terminologies of Magento that will help you in Magento development when you set up your own online store.
Core |
The core of Magento consists of all the functions included in the downloaded version. The Magento core development team has developed and certified this core codes, a collection of modules. It is not recommendable to edit these core files. Moreover it will disable the ability to upgrade Magento in the future.
Local |
Local extensions are used in Magento customization and they reside only on a user’s local copy. These extensions will be placed in a local folder as they do not interfere with upgrades to the core code, and to differentiate them from community contributions. These local extensions function like core code, only the residing directory is different.
Community |
Community contributions are downloadable and reside in the community folder. Like local extensions, community functions are additional functionality kept separate from the core code Magento store owners can enjoy this additional functionality which will not interfere in upgrading to future Magento versions.
Extensions |
As the name says, one or more files packaged together which extend the functionality of Magento. Strict terms and conditions for these extensions prohibit them from modifying the core code, and will not interfere in upgrading to new version of Magento.
Extensions can be installed from the admin panel, or they can be downloaded from Magento Connect. Let’s look at the three types of extensions.
|
A module is an extension which extends the features and functions of Magento. A concrete example of module would be additional payment gateway integrations, or a featured items promotional tool.
|
An interface is a collection of themes which determines the visual output and frontend functions of your store. An interface can be assigned through the admin panel either at the website-level, store-level or website and store level. We will cover assigning interfaces later in the book, for now let’s take a look at the components of a theme.
|
A theme is any combination of layout, template and/or skin file(s) which creates the visual experience of your store. Magento is built with the provision to load multiple themes at once, and therefore distinguishes themes into two types:
§ Default Themes – Every interface comes with a default theme which is the main theme of an interface. The default theme must have all the required layouts, templates, skins to run a store error-free and hence it is the lowest theme in the theme hierarchy.
§ Non-Default Themes – A non-default theme is for creating temporary seasonal design changes to a store without creating a new theme. Create a few images and update some of the CSS, then you can easily turn your store from a bore to a stand-out seasonal store.
The components of a theme are
Layouts – Layouts are XML files that define the block structure for different pages, and also controls the META information and page encoding.
Templates – Templates are PHTML file containing (X)HTML markups and essential PHP tags for creating the logic for the visual presentation of information and features.
Skins – Skins are block-specific JavaScript and CSS and image files complimenting your (X)HTML.
Blocks |
Magento distinguishes the array of functionality in the system through blocks and provides a modular way to manage this array from both a visual and functional stand point. There are two types of blocks (Structural Blocks and Content Blocks) and they work together to create the visual output.
§ Structural Block are created for the sole purpose of assigning visual structure to a store page. Examples : header, left column, main column and footer.
§ Content Blocks are created to produce the actual content inside each of the structural block. Examples are the category list, mini cart, product tags and product listing.
The learning of these terms facilitates you in expertising Magento Development and Magento customization