Welcome Guest, Not a member yet? Register   Sign In
cleaning up big jumbled classes
#1

[eluser]geckzilla[/eluser]
Hi, I've been wondering for a long time now how to organize my code better when I end up with a class that's got a lot of functions in it. Say I have an admin class and it needs to be split up into several different sections like users, products, gallery, etc.

I'm relatively new to OOP so I'm making a lot of mistakes or having trouble realizing how to solve common problems but most of them I can find on the forums or php documentation. This time, however, I can't seem to put the right search terms in to find it even though I know someone else must have the same problem. I asked a friend and he mentioned doing the includes which extend the admin class while the class is being instantiated but I have no idea how to do that in the context of codeigniter.

I already thought of making a bunch of separate classes like admin_users, admin_products, etc. but it doesn't sound like the best solution. If anyone has any insight or knows of an old topic that already covers these issues I would greatly appreciate it.


Messages In This Thread
cleaning up big jumbled classes - by El Forum - 01-27-2009, 10:17 AM
cleaning up big jumbled classes - by El Forum - 01-27-2009, 10:43 AM
cleaning up big jumbled classes - by El Forum - 01-27-2009, 11:49 AM
cleaning up big jumbled classes - by El Forum - 01-27-2009, 12:19 PM
cleaning up big jumbled classes - by El Forum - 01-28-2009, 05:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB