[eluser]Doug Lerner[/eluser]
Well, what are people's general strategies in storing object data?
If you have an object and the object's properties are simple, like strings or numbers, then it is pretty obvious that an object can correspond to a table and each record is an object's instance.
But what about more complicated objects?
Like say you have a user record and you want to add a property to it and that property is an associative array and some of the array elements themselves are objects or other associative arrays? In my current development I run into situations all the time where I end up with complex objects within objects within arrays within objects which need to be stored.
In my current development, which uses a minor, proprietary server-side JavaScript and included proprietary object-oriented database, I just store the object and that's that. But I want to move into something more open-source with a larger community of developers, like PHP, which is why I've been looking at CodeIgniter. I want to move into MVC, but I also want to be able to freely handle any kind of object while developing.
Do people spend a lot of time elaborately laying out complicated table structures manually linking one table to another, etc., just to design each object? That would take a lot of development time.
Or at some point do you just shrug and serialize/unserialize for storage and retrieval of complicated objects?
What is considered best practices for this sort of thing in CI?
Thanks,
doug