• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1 model per table or 1 model per controller?

#1
[eluser]TheActionCombo[/eluser]
Is it better practice to have 1 model for each table or 1 model for each controller? I believe following strict mvc it should be 1 model per table, but 1 model per controller makes more sense since many model methods will use multiple tables.

#2
[eluser]sikkle[/eluser]
This is not much mvc related realy.

At the moment, i prefer thinking about those model as object.

Many many way to handle that.

good luck !

#3
[eluser]stuffradio[/eluser]
I generally try to use 1 model per table, but some believe you should use many models...

#4
[eluser]wiredesignz[/eluser]
Your models should be a representation of a real thing (hence the name Model), if your model requires information from many sources to represent your `Thing`, make it so.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.