Welcome Guest, Not a member yet? Register   Sign In
Any Plans to fix the CI_Session?
#1

[eluser]Unknown[/eluser]
Hey!

I already wrote once about this topic, but it seems the CI community wasn't interested. Lets try again:

The problem at hand:
CI_Session does not allow storing objects.
It does however store a bunch of objects itself which seems like unnecessary overhead (CI object with lots of CI objects and recursions etc).

More detailed: If you store objects (instances of Models in my case) in the Session right now, the data cannot be accessed, because any object you store there will have a "incomplete object error" which makes the data unusable. This is, because the object definitions in the classes (models) is loaded AFTER the session is started.
I would have expected, that auto-loading the respective models would help.

Why this is important:
It simply dis-encourages you to use objects, if your one persistent storage, the Session, doesn't support keeping these objects. For anything we need to keep in Session, no matter how complex, you force the programmers to store it in arrays or split up in other simply types and, when needed, to feed the session data back into objects that you must create new during script run time. This is bad for performance and creates a lot of overhead.
Also note, that in complex applications, the same objects will have to be create multiple times in different places (unwanted redundancy).


Codeigniter is great for keeping code clean in many ways and I really like most of the structure and features. But the fact, that it's impossible to load objects from session and use functions there is a BIG minus.

Is there a plan to fix this issue some time in the future? If not, please consider it.

Sincerely,
DerShodan
#2

[eluser]CroNiX[/eluser]
Try posting on github in the issues section.




Theme © iAndrew 2016 - Forum software by © MyBB