Joomla 4 Component Code Structure

Be informed that this forum is not an official support forum for Joomla! 4.0. Any issues regarding Joomla! 4.0 must be reported at https://issues.joomla.org/.

Joomla! 4.0 is still in its Alpha stage. This forum should be used for sharing information about Joomla! 4.0.

Moderator: ooffick

Post Reply
ceford
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Mon Feb 24, 2014 10:38 pm

Joomla 4 Component Code Structure

Post by ceford » Tue Jul 30, 2019 10:05 am

J4 seems to be coming along nicely and I have been thinking about writing a small component by way of preparation for rewriting a large J3 component. I was looking at the code structure for the J4 com_contact component and I wondered why it is the way it is and why it differs from the J3 version. Can anyone enlighten me? I have not been able to find any documentation on how execution flows through a component and I have been tracing it with the debugger. That is a bit tedious! A good explanation of a typical J4 component layout would be a valuable resource.

gws
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3940
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Joomla 4 Component Code Structure

Post by gws » Tue Jul 30, 2019 12:01 pm

The code is still alpha so documentation will not be produced until the code is stable.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 11767
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Joomla 4 Component Code Structure

Post by brian » Tue Jul 30, 2019 1:34 pm

A quick answer but not an accurate one - there is already quite a lot of developer documentation



https://docs.joomla.org/JDOC:Joomla_4_Tutorials_Project
https://docs.joomla.org/Category:Joomla!_4.x
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

ceford
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Mon Feb 24, 2014 10:38 pm

Re: Joomla 4 Component Code Structure

Post by ceford » Wed Jul 31, 2019 2:20 pm

Apologies to the 2000+ folks expecting (from my post title) to learn something useful about J4 component structure. I have read most of the docs and am aware we are still at the alpha stage. So, to address my own question, I am guessing that folders and files that start with Upper Case letters are name-spaced and J4 compliant and those that start with a lower case letters are not or don't need to be (tmpl for example), perhaps for backwards compatibility or migration purposes. Seems obvious! So I will try to make up for wasting your time my composing a J4 compliant component and maybe write some documentation. That way I might find out what Extension and Service/services (etc) are for.


Post Reply

Return to “Joomla! 4 Related”