Different Types of Models in Joomla
There are six types of models that can be used in a component. To create a model in your component, extend your model class with one of the models provided by Joomla.
Location of Files: libraries/src/MVC/Model
Namespace: Joomla\CMS\MVC\Model
1. BaseModel
This is the Base class for a Joomla Model.
This model uses StateBehaviorTrait, which supports state behavior. If you don't require any additional functionality, you can extend this model.
2. BaseDatabaseModel
It is Base class for a database aware Joomla Model. It extends BaseModel.
This model uses DatabaseAwareTrait, MVCFactoryAwareTrait, DispatcherAwareTrait.
It work as a base class by initializing the database driver object and the table object.
3. ListModel
It is a Model class for handling lists of items. It extends BaseDatabaseModel.
This model provides pagination and filtering. You can extend ListModel when you want to display a list of items.
4. FormModel
It is Model class for prototype form. It extends BaseDatabaseModel.
This model uses FormBehaviorTrait; FormFactoryAwareTrait.
It is used for handling forms in Joomla. Forms in Joomla! are defined as XML files. The FormModel will load these files as Form objects, also load form data, process the form and validate it.
5. ItemModel
It is Model class for prototype item model. It extends BaseDatabaseModel.
It represents a single database record and allows for basic database operations.
6. AdminModel
It is a Model for handling forms on the administrator part. It extends FormModel.
It adds some extra admin functionalities to the form like performing batch operations on records and ACL checks on records. It is used when editing a record or for batch operations in the back-end. However, despite its name, this model is not actually specific to the admin section of Joomla. It can be used in the front-end as well.