Developing a frontend list view for our component
Using Joomla’s Model-View-Controller (MVC) pattern simplifies extension development in Joomla!. The file structure for the frontend is like the one for the backend, with just a few minor changes.
We will start with the frontend area of our component, by recreating the folders inside the site
folder, as shown in the following figure:
Figure 3.1 – The folder structure for the frontend part of our component
We are coding in the frontend part of our component, so we will store our files inside the src/component/site/
folder. And, as with the backend, we have the following folders:
src
tmpl
In the src
folder, we repeat the same folder structure as in the backend:
Controller
Model
Service
View
The files and their content are also like the ones in the backend. Let’s start adding the files for the list view.
Coding the list view
Even though...