Try the Demo

Magento Forum

   
mapping the guts
 
tman_f
Sr. Member
 
Total Posts:  85
Joined:  2008-02-12
 

I am a web developer and am currently very interested in Magento. I have worked with the Zend framework and am currently working on my first project inside Magento. I have gutted the program and can navigate with some ease. I am, however, a little shady about what goes where. I would like to post a few questions and if anyone has any knowledge about any of them please feel free to respond.

1) First, the controller. It is my general understanding that inside the Zend framework the controllers are responsible for calling necessary models, preparing data, then rendering a view. It seems that Magento uses the controllers a little differently. Could somebody please elaborate?

2) Second, the model. It has been my understanding that the model is generally responsible for data manipulation and waits to be called upon. I am seeing that Magento uses the models to call on different areas and layout templates in some cases. Could somebody elaborate on this?

3) Or with the prior two questions in mind, could somebody explain explicitly the roles of each. For instance, what actions would always take place in one and never in the other. Without a model, would a module still function. Without a controller, would a module still function?

4) And finally, I would like to clarify that I assume we all understand what an MVC framework is and if we dont, we shouldnt be messing with Magento. That being said, please dont feel the urge to teach me about the fundamentals of the MVC. Rather, help me clarify the roles assumed with magentos implementation.

5) O I almost forgot. It seems as if the Magento engine reads the config.xml files and loads a module with its corresponding controllers and models according to the xml data. I would be very interested if someone could clarify what needs to be declared in the config.xml module specific file for the module to work.

I hope this isnt too much. As I was saying before, I would appreciate as much info as possible and in bits and pieces if necessary. Just, whatever you can contribute and hopefully others can learn from this post.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
kohril
Member
 
Total Posts:  44
Joined:  2007-12-23
Lille, northernFrance
 

As far as architecture is concerned, you might find answers here : http://www.magentocommerce.com/wiki/doc/magento-architecture

You’ll have a good idea of calls that may be done.

config.xml file defines a lot of things about your module, I am still confused with it. I understood that all config.xml files are read and merged into one file, that’s why you can contribute to a module with another one, rewrite some Models, etc.
I am currently working on modules, and I will share more informations when I will be sure they are right.

Hope this helps

Anthony

 Signature 

Fragento : communauté Magento francophone - http://www.fragento.org !

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top