Hello. If I have a CRUD type screen (Add, Edit, Delete), should I have one controller for the entire screen or one controller per button/functionality (i.e. Add, Edit, Delete)?
Hello. If I have a CRUD type screen (Add, Edit, Delete), should I have one controller for the entire screen or one controller per button/functionality (i.e. Add, Edit, Delete)?
A matter of taste. You could consider a MultiActionController. Depends how different the responsibilities on the different actions are. Having the one controller perform all of them of course gathers any dependencies--but you could always use a common superclass for this.
Thanks, Rod.