Welcome Guest, Not a member yet? Register   Sign In
OO usage in code igniter structure, Model, Controller
#6

[eluser]m4rw3r[/eluser]
Well, the speed difference isn't big, so it does not "cost" anything to do it that way (and you also put your methods which interact with the object IN the object itself, which is a huge organizational benefit).

To be honest, I'm still a bit new to OOP and always learning Smile.
I don't like when OOP just gets purely organizational, without any other benefit or too much speed loss (well, depends).
So I prefer a mix between the CI-style and the OOP style Wink.

And one thing about accessor methods for object properties: Do NOT use them unless you're going to make some filtering/function calls before assigning them.
This is because you loose speed, flexibility and clutter your classes with unnecessary methods.
(and $rec->someprop = 'somestr' is shorter than $rec->set_someprop('somestr') Tongue).


Messages In This Thread
OO usage in code igniter structure, Model, Controller - by El Forum - 11-14-2008, 04:07 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 02:14 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 04:33 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 04:41 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 05:28 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 06:14 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 07:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB