Get Free Audit

Magento Codepool (Magento Certified Developer Exam)

Feb 9, 2012

3099 Sergei Guk

Both junior and senior developers, who work with Magento on a constant basis or just start learning this platform, think over the perspective to obtain Magento Developer Certificate some day. Benefits are innumerable, ranging from a catchy point in CV, worldwide job skills recognition to exciting career prospects on on a global scale.

BelVG can’t bypass the matter of many developers concern – Magento Certified Developer Exam, which contains of multiple-choice questions based on Magento Community Edition 1.5. Magento exam does not imply prerequisites. Find more information about Magento Developer Certification on Magento Commerce official website. Preparing themselves to exam, developers are offered to examine the Magento Certified Developer Study Guide.

We start a new section in our blog, dedicated to Magento Certified Developer Exam preparation, answering questions from above-mentioned Study Guide in series. Today we look through the first question Describe Magento codepools from the Basics chapter, High-level Magento architecture.

code2

Describe Magento Codepools

Magento has three different codepools:

  • Community
  • Core
  • Local

Core pool

First of all, this folder stores all the code that makes Magento so powerful, flexible and lovely. The chief rule of Magento development is that you should never make any changes in it. In other words, this folder belongs to Magento core developers only and if you are going to edit anything in this pool, their evil spirit could punish you even through the display.

Community pool

This folder belongs entirely to community developers. This is the right place for hundreds of 3rd party extensions, both free and paid, that can be found at MagentoConnect or available on extensions development store (for instance, http://store.belvg.com/). So basically, if you have installed any extension, it must be in app/code/community/ only.

Local pool

If you have your own Magento-based store and want to make everything by yourself or you are a Magento developer and have a purpose to change the logic somehow, local pool is the place where everything should be done. If you want to override Magento extensions, blocks or methods, copy the necessary folders from the Core pool and do whatever you are inclined to do. Apply the same rule for custom extensions that are created specifically for the website – all code should be in local pool.

How does the framework interact with the various codepools?

To identify the proccess let’s take a look at app/Mage.php

Igor Dragun
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Igor


This code snippet illustrates the order Magento is using to include paths – firstly it includes Local code pool, than community and after that – core, which allow developers to override classes without changing core files.

Igor Dragun
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Igor

18 Comments

  1. Great explanation, I just read few of your articles and they are so great that i will be reading them all. Thanx and well done.

  2. Hi Sudhir,

    At the top of Mage.php file this constants are defined:

    define(‘DS’, DIRECTORY_SEPARATOR);
    define(‘PS’, PATH_SEPARATOR);
    define(‘BP’, dirname(dirname(__FILE__)));

    Directory and path separator are default PHP constants and they look as follows:

    define (‘DIRECTORY_SEPARATOR’, “/”);
    define (‘PATH_SEPARATOR’, “:”);

    Thank you for reading our blog!

  3. Hi,
    This post is very helpful and i have a small query regarding thins post

    $paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘local’;
    $paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘community’;
    $paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘core’;
    $paths[] = BP . DS . ‘lib’;
    set_include_path($appPath . PS . Mage::registry(‘original_include_path’));

    What is PS, BP, DS in this post and what does it mean.

  4. For proper Magento development, Magento certification is really necessary and even companies are also hiring them who have this certification. So one should must do this exam!

  5. Thanks for sharing such a nice article, it helps in preparation of MCD. Description of article is too good..

  6. Thanks,

    we try our best to make blog articles useful and entertaining for experienced developers as well as newcomers.

  7. Magnificent items from you, man.I have read your blog and i got a very useful and knowledgeable information from your blog.its really a very nice article.
    I really like what you’ve acquired here, certainly like what you’re saying and the way in which by which you assert it. You’re
    making it entertaining and you continue to care for to stay it sensible.

  8. Pingback: Get Ready for Magento Certified Developer Exam.The Main Magento Design Areas and More… | BelVG Blog
  9. @Snowcore, you are not right. The autoloader firstly checks the local folder, than community, than core and than lib. And this is a reason why you can put Mage/Catalog/Model/Product.php in the local directory and it will be loaded instead of core class.

  10. Pingback: Get Ready for Magento Certified Developer Exam. Magento Module structure. | BelVG Blog
  11. @Snowcore
    Thank you for your thoughts! Will update the post, just not decided how much information (questions) should be described in one post…

  12. It would be nice to mention here about include path order. Autoloader is looking for classes in the following way: core poll, community, and the last one is local pool.

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *