nikosdion / joomla_extensions_development

Joomla Extensions Development: a reference book
GNU Free Documentation License v1.3
10 stars 1 forks source link

AdminController not just for the backend #30

Closed Irata closed 1 year ago

Irata commented 1 year ago

Describe what's wrong In the components.xml at line #2107 the following statement is made;

      This is an extension to BaseController. It is meant for displaying list views in the backend of your
      site, e.g. a list of articles.

Reasoning My understanding and highlighted in the official documentation says;

The name AdminController suggests that this controller is to be used only on the Backend Administrator functionality, however, this is not the case. It's appropriate to use it on the site Frontend as well.

If there is indeed some other Controller to be used in the front end then it should or could be mentioned.

Suggestion The second sentence could be removed or changed to elaborate that AdminController is indeed used in the front end despite its confusing use of the word Admin in its name. The explanation note in the AdminModel section does make understanding it a bit clearer but for someone new to Joomla they may not make the connection with the Controller.

nikosdion commented 1 year ago

While you can use it in the frontend, it's only useful if you are presenting an administration interface. I am concerned that if I change the wording here people will misunderstand this as this being the "right" controller type to use when presenting a read-only list of information (think list of articles, or articles blog view) when this is not the case.

Irata commented 1 year ago

Thank you for the explanation, it does make sense but just confusing when official documentation says it can be used in the front end.