Menu

Joomla Blog

Tutorials, reviews, case studies and other tips to help website owners and website developers master the Joomla content management system.

MVC (Model-View-Controller)

Large software applications can be quite challenging to maintain and modify. The MVC architecture helps keep things manageable by passing specific jobs off to specific sections of code. This can make everything from troubleshooting problems to changing the layout of a Module much easier.

Model:
The Model makes up the code responsible for getting data in and out of your database. Actually, no matter how you store your data, it's the Model's job to handle it. Now that Joomla is expanding into databases other than MySQL, it will be the Model's job to interact with the various choices of data storage.

View:
The View is the section of code that determines how the stored data is presented to the user. Most Joomla users that actually touch code will most likely do so by modifying or adding to the View section of Joomla's code. This might mean installing a new template and tweaking it's layout a bit, or it might mean creating some template overrides to the Joomla core code. Either way, to change the "front end," it's never necessary to alter anything except the way Joomla data is displayed.

Controller:
The Controller is a sort of "go between" as it's job is to respond to user's actions and then trigger the Model to do its work on the data. The controller will then pass that data back to the View to display it to the user. The Controller doesn't modify any data or display it on its own.

Rate this blog entry:
Emphasize Your Content with the Simplicity of Shap...
New ThemeForest Template Features Responsiveness a...

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment

Free Joomla TutorialLearn Joomla for free with our 16 lesson, 2 hour course.

Get Started