Looking for component flowchart Topic is solved

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
david0058
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 103
Joined: Wed Jan 20, 2016 10:58 pm

Looking for component flowchart

Post by david0058 » Tue Aug 09, 2022 11:36 am

Hi all,

Can anyone point me to a definitive flow of control through a Joomla component ?

Something along the lines of:

1. if there's a "task", the function with that name in the controllers/xxx.format.php is called;
2. that should call the appropriate function in the model/xxx.php;
3. the display() function in the ... is then called ... etc.
4. if there isn't, then the controller.php ...etc.

I've never been able to figure it out properly and it's extremely frustrating to find that I do something in one place that is then undone somewhere else by some standard code and I don't know why.

I'm entirely self-taught so I can only blame my teacher :)

David

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2849
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Looking for component flowchart

Post by SharkyKZ » Wed Aug 10, 2022 6:34 am

No such thing. You can code your component any way you want. Core components is not a good example to follow. They claim to follow MVC pattern but really don't.

david0058
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 103
Joined: Wed Jan 20, 2016 10:58 pm

Re: Looking for component flowchart

Post by david0058 » Wed Aug 10, 2022 10:08 am

Ha ha ! Yeah, I know what you mean.

It's not strictly true though that I can code it any way I want, if I want something that actually works and that takes reasonable advantage of using the framework in the first place. For example, I could write code to stop the controllers being called, and I could ignore all the core classes and write my own in order to avoid the hidden parent:xxx() calls all over the core that force certain routes through the code. But then it would eventually have nothing to do with Joomla, or I'd have re-written Joomla myself.

So I should have asked "is there any documentation that shows the flow through a canonical Joomla component?". And I guess the answer is still "No, there's lots of relevant documentation but you need to spend a lifetime hacking and experimenting in order to get it to work ...".

Thanks anyway :)


Locked

Return to “Joomla! 3.x Coding”