12.
Compound & Embedded Forms
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
2 Comments
Hi guys, if you have 2 closely related entities, for example 'products' and 'product variants' that are on the same form, would you have these handled by the same controller? Or is it standard practice to have a separate controller for each entity?
Hey Shaun T.
It's common to have a Controller for each entity, but some times, you can't manage an entity by itself, let's say *User* and *UserPreferences*, for those cases, you would have one Controller for both. It also applies if your related entity is very easy to manage, but as soon as it gets bigger you should refactor it into it's own controller.
I hope this makes some sense to you :)
Cheers!
"Houston: no signs of life"
Start the conversation!