Let's imagine i have these models:
- Classified
- Mobile phone
- Computer;
- Etc...
The classified has some generic attributes like (title, price, and so on). And Mobile phone has specific attributes like Computer and other models.
Since i have to implement some controllers to create a REST api i'm thinking on:
- MobilePhoneListController;
- MobilePhoneSinglePageController;
- ComputerListController;
- ComputerSinglePageController;
- ClassifiedTrait (for shared operations).
But there are any kind of pattern which fits better on a situation like this one?
Aucun commentaire:
Enregistrer un commentaire