So I've got a site that's got something along the lines of the Mii
creation tool on the Wii. There's a stage where the user adds images
by category (hat, hair, glasses, etc.) and moves them around to
wherever they like.
At the moment I'm bringing in each category via Request.HTML and then
just updating the div that displays all the different items (like hair
styles). Each element (or hair style) had it's database info in an
attribute of the element.
We had this discussion a few days ago, and it's got me thinking. So I
was switching the request to Request.JSON and then drawing the
elements out via javascript (instead of echoing it out in PHP via
Request.HTML). Then I had all my data in an object and didn't have to
worry about using an attribute on the element.
Then I thought, "Why not just load the entire database of items into
an object, then just deal with it all client side?"
Our plan is to eventually have thousands and thousands of items,
that's why I went with request so that I didn't have to load them all
in unless the user selected the category.
I'm entirely tempted to use Asset.Images in accordance with a big fat
object that contains all my database instead. Is there ever a concern
of how big the object will be? It's certainly going to be less space
the images it loads.
-Ryan
- [Moo] How big is too big for an object? Ryan Florence
-