Hi All
I have always stuck to skinny controllers, fat models, but in some projects, I have noticed my model files are now over 5000 lines long!!
I would love to break the code up more so that it isn't all in the main model files.
Has anyone given this any thought of a good way to achieve this?
I thought about breaking some code into Components, so that I am not interacting directly with the model files, however I would be concerned about Unit Testing in this case.
Can anyone offer any insights?
PS - this is in reference to CakePHP 2 - I don't know if this has been tackled further in CakePHP 3?
Thanks
Michael
-- I have always stuck to skinny controllers, fat models, but in some projects, I have noticed my model files are now over 5000 lines long!!
I would love to break the code up more so that it isn't all in the main model files.
Has anyone given this any thought of a good way to achieve this?
I thought about breaking some code into Components, so that I am not interacting directly with the model files, however I would be concerned about Unit Testing in this case.
Can anyone offer any insights?
PS - this is in reference to CakePHP 2 - I don't know if this has been tackled further in CakePHP 3?
Thanks
Michael
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment