Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 746233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:04:01+00:00 2026-05-14T14:04:01+00:00

Magento is a newish (past 5 years) PHP based Ecommerce system with an architecture

  • 0

Magento is a newish (past 5 years) PHP based Ecommerce system with an architecture that’s similar to the Java Spring framework (or so I’ve been told)

One of the features of the Framework is certain classes are not directly instantiated. Rather than do something like

$model = new Mage_Foo_Model_Name();

you pass an identifier into a static method on a global application object

$model = Mage::getModel('foo/name');

and this instantiates the class for you.

One of the wins with this approach is getModel checks a global configuration system for the foo/name identifier, and instantiates the class name it finds in the configuration system. This allows you to change the behavior of a Model system wide with a single configuration change.

Is there a formal, Gang of Four or otherwise, name that describes this system/design pattern? The instantiation itself looks like a classic Factory pattern, but I’m specifically interested in the whole “override a class in the system via configuration” aspect. Is there a name/concept that covers this, or is it contained within the worldview of a Factory?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:04:02+00:00Added an answer on May 14, 2026 at 2:04 pm

    This looks like the Factory design pattern.

    Quoting the wikipedia entry for Factory method pattern (emphasis mine) :

    it deals with the problem of creating
    objects (products) without specifying
    the exact class of object
    that will be
    created.
    The factory method design
    pattern handles this problem by
    defining a separate method for
    creating the objects, which subclasses
    can then override to specify the
    derived type of product that will be
    created.

    And :

    Outside the scope of design patterns,
    the term factory method can also refer
    to a method of a factory whose main
    purpose is creation of objects
    .

    A couple of other interesting links :

    • Factory (software concept)
    • Factory pattern
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Installed Magento 1.6.2.0, and noticed that the links are like http://MYSEUPERSTORE.com/ index.php /customer/account/ but
Magento shopping cart is built on the Zend Framework in PHP. This is the
Magento 1.4.1.1 Back in history, app/code/core/Mage/GoogleAnalytics/Block/Ga.php was copied over to app/code/local/Mage/GoogleAnalytics/Block/Ga.php and changes were
Magento 1.7.0.0 ok i'm using the product tabs that are available in the modern
Magento checkout broken in IE9 and IE8 for that matter When testing our checkout
I am using Magento eCommerce and I have modified my header.phtml via the Blank
Magento has this very nice MVC system where modules can register their 'frontname' and
My Magento verions is 1.3.2.1 In the admin When i click the System ->
Magento has a fallback mechanism that helps prevent errors and theming problems by checking
Magento seems to have a number of different formats that work for product URLs,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.