tracing-the-new-model

Basic Idea:

When you call a page link, like index.php?option=com_<name>, the Joomla! Platform tries to find and load the file components/com_<name>/<name>.php from whichever folder you have installed Joomla! into. So, if your component is ‘com_read’ you should have a ‘com_read’ folder and a file named ‘read.php’ inside of it.

I will call this file the ‘base file’. It is in this file that you make the decision whether to use an old flat model (returning the HTML code for the requested page) or to use a Model-View-Controller (MVC) pattern.

This MVC model, walks over two legs: a file and a class. The Joomla! Platform will usually look for a given file and, if found, tries to register a specific class within this file. If either one is missing the call will fail.

Continue reading