Welcome Guest, Not a member yet? Register   Sign In
Controller File Size/Length
#4

I have one controller here with 15K+ lines, other than navigating the source, haven't really noticed any resource issues.

Said that, there are few things to consider.

Purely from development point of view, it's much easier to put business logic in models, in case same functionality needs to be used from multiple endpoints. Learned it hard way, we had split apps for main application and registration page, and at some point some password rules changed, which were updated on one, but not other. If we had kept that logic in model, it would have been updated on both sides.

I'd say skinny controllers fat models is very reasonable way to organise your code.
Reply


Messages In This Thread
Controller File Size/Length - by Poetawd - 09-27-2018, 10:59 PM
RE: Controller File Size/Length - by ignitedcms - 09-27-2018, 11:27 PM
RE: Controller File Size/Length - by kaitenz - 09-30-2018, 10:16 PM
RE: Controller File Size/Length - by Pertti - 10-01-2018, 01:58 AM
RE: Controller File Size/Length - by sofwan - 10-11-2018, 08:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB