I have been hacking together some fundamental Joomla 1.5 components and modules lately and try to each time I recieve in it, I finish up tearing my hair out because I merely don't realize the way the MVC pattern works. Some good examples from the problems I encounter:

  • So how exactly does the vista get access the model?
  • How can you switch to another view?
  • How can you even range from the correct file which defines the model?
  • etc.

I am certain you will find quite simple solutions to any or all my questions: my primary issue is that overall I do not have the "documentation" is helpful whatsoever and certainly does not provide enough here is how to build up components/modules within the new MVC style. The API website is nearly worse-than-useless since all it offers are class trees from the functions with without any comments whatsoever. The paperwork website is targetted to managers and core designers only.

Can there be any helpful supply of information for web-developers using Joomla 1.5?

Although you will find some articles concerning the core team included, this is a connect to the expansion category where one can get the most from the paperwork site: http://paperwork.joomla.org/Category:Development Company, the Joomla! Framework can use much more when it comes to documentation.

When you're while using controller class, the display() function is known as automatically in case your task does not match the functions. Therefore inspections the HTTP request the view variable and shows the vista with similar title. If no value for view is specified, you're going to get a mistake. The best way to circumvent this really is to define a display() function inside your controller, then get it check the need for view, place it to some default value if unset, then call parent::display(). Here's one I have utilized in a current project to show the mylist view:

function display()



    parent::display()



Whenever your view is loaded, the model with similar title can also be loaded. After that you can access the model functions inside your view class through $this->get(). For example, for those who have a function inside your model named getPreferences(), you are able to call $this->get('preferences') to call that function.

The MVC layout could be tricky when you initially explore it by just searching in the Joomla team components.

I discovered that initially when i first designed my very own component it had been really perplexing and complex however found a good example component and fundamental tutorial for writing an MVC component in Joomla 1.5. You'll find it at http://world wide web.vojtechovsky.internet/joomla/component-helloworld-2-create-tutorial-guide-en.html

I additionally when onto to create 'The Simple META management suite' which follows the MVC recommendations and thus if you want to make use of it as being an assistant you'll find it at world wide web.aqsg.com.au

Hope that can help