J 1.5: Architecture of the components

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
tjankus
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Dec 10, 2006 10:54 am

J 1.5: Architecture of the components

Post by tjankus » Thu Nov 22, 2007 11:15 pm

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.

User avatar
manuman
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 211
Joined: Fri Aug 12, 2005 1:58 am
Location: Albany - Western Australia
Contact:

Re: J 1.5: Architecture of the components

Post by manuman » Fri Nov 23, 2007 12:30 pm

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
Core Team Member :: Project Manager & Foundation WG Coordinator
OSM Board Member :: Treasurer
Vote for Joomla! http://www.packtpub.com/nominations-homepage


Post Reply