CodeIgniter Forums
very big and monolitic controller/model vs several smaller ones - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: very big and monolitic controller/model vs several smaller ones (/showthread.php?tid=3670)



very big and monolitic controller/model vs several smaller ones - El Forum - 10-16-2007

[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!