Welcome Guest, Not a member yet? Register   Sign In
View-centric design philosophy with CI
#3

[eluser]jleequeen[/eluser]
I see the value in your approach and that is exactly how I started thinking about my app when I began to sketch things out. But once I guess coding began, I realized some of my controllers were getting ridiculous in size. Obviously what looks good on paper sometimes doesn't translate once put into practice. I guess I also had the problem of wanting to apply an approach that is consistent.

In your example you have the user controller with 6 methods in it...which when I used the same kind of design in my app I had about 10 methods. I know 10 methods is not a huge amount, but I started to realize that I was putting a lot of stuff in the user controller and it was getting bloated. I guess because in actuality, I was thinking, A user can do this and this and this and this....and eventually I realized most of my app could fit inside the user controller. So then it is refactor and break up the user controller. It's seems it can get easily messy when I started thinking in terms of users actions vs how the database might guide me into breaking up my app.

I know about fat models and skinny controllers to help minimize controller code, but I guess it's applying a consistent approach. But from an app layout perspective I thought I had a grasp on things but I keep second guessing my approach. Maybe I should design more from looking at my database (or data I should say) and that would lead to your point about building it in a way were each component is self contained and controlled.


Messages In This Thread
View-centric design philosophy with CI - by El Forum - 08-24-2008, 08:15 PM
View-centric design philosophy with CI - by El Forum - 08-24-2008, 09:17 PM
View-centric design philosophy with CI - by El Forum - 08-24-2008, 09:52 PM
View-centric design philosophy with CI - by El Forum - 08-24-2008, 11:27 PM
View-centric design philosophy with CI - by El Forum - 08-25-2008, 08:02 AM
View-centric design philosophy with CI - by El Forum - 08-25-2008, 12:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB