Welcome Guest, Not a member yet? Register   Sign In
very big and monolitic controller/model vs several smaller ones
#1

[eluser]noland[/eluser]
Hi there!:

what's better to do?

i use to finish almost dead in the end of the day, after working with 15 o 20 controllers, and their respective models....

So I thought that I could use a bigger unique one (and the same with the model).

Would it be better to use one and use routing?

But I don't know it is good to use this, because controller/model file size will be increased....

This is my idea:
Code:
Central_controller
---------------------C/R/U/D controlling for table1
---------------------C/R/U/D controlling for table2
---------------------C/R/U/D controlling for table3

Central_model
---------------------C/R/U/D database operations for table1
---------------------C/R/U/D database operations for table2
---------------------C/R/U/D database operations for table3

VS

Code:
Table_1_controller
---------------------C/R/U/D controlling for table1

Table_1_model
---------------------C/R/U/D database operations for table1

Table_2_controller
---------------------C/R/U/D controlling for table2

Table_2_model
---------------------C/R/U/D database operations for table2

Table_3_controller
---------------------C/R/U/D controlling for table3

Table_3_model
---------------------C/R/U/D database operations for table3

What's the standard for that?

Thank you very much indeed!




Theme © iAndrew 2016 - Forum software by © MyBB