Welcome Guest, Not a member yet? Register   Sign In
Super-object
#11

[eluser]nmweb[/eluser]
Yes it is, no spl autoloaders in CI. CI's load syntax always instantiates a library/model, if you want to evade this you should manually include the library/model.

I agree with Mihailt on his view of the super-object. In many cases it can work against you. Indeed, you do not need two session classes but the session class could be a singleton of its own. When I need the session class in a library I do not need to call the CI instance but just the session instance which is a little neater, I find. Also, it stands in the way of other design patterns.
#12

[eluser]zilverdistel[/eluser]
[quote author="nmweb" date="1205358200"]Yes it is, no spl autoloaders in CI. CI's load syntax always instantiates a library/model, if you want to evade this you should manually include the library/model.

I agree with Mihailt on his view of the super-object. In many cases it can work against you. Indeed, you do not need two session classes but the session class could be a singleton of its own. When I need the session class in a library I do not need to call the CI instance but just the session instance which is a little neater, I find. Also, it stands in the way of other design patterns.[/quote]

I agree too. I think there should be at least a method to 'purifie' the objects you make. Like It is now, I can't save an object in a session because of all the properties and methods that are inherited ; and cookie size is limited ...

As a matter of fact I'm thinking about writing one, but I'm first trying to figure out what's under the hood ...




Theme © iAndrew 2016 - Forum software by © MyBB