Page 1 of 1

J 1.5: Architecture of the components

Posted: Thu Nov 22, 2007 11:15 pm
by tjankus
I'm new to creating joomla components, and it's a bit complicated for me to understand the principles of the component.
I've made the hello world tutorial, and it worked, but there are still basic things i cannot understand.

So, lets take the com_hello.

1. hello.php - loads the controler from controller.php and then executes the task (the default task is display(), right?).

2. controller.php - implements the controller. the function display() - does what?
When are the model and the view invoked?

Let's say i need the same com_hello component to display either a hello message or a goodbye message. How and where should add the function(s) to display goodbye? And would the goodbye page be accessed by adding "task=goodbye" to the URL?

Hope you can help me a bit.

Re: J 1.5: Architecture of the components

Posted: Fri Nov 23, 2007 12:30 pm
by manuman
What your getting into is the design paradigm called MVC (Model View Control).

In layman's terms it allows code to be separated into logical area's. Some lite reading can be found here... http://dev.joomla.org/component/option, ... ustom-urls