NOODB: Storing the Properties

You may have noticed a significant lapse between recent NOODB posts. I was wasting a lot of time looking into storing the properties. “Wasting” might be an exaggeration; it was a necessary exercise.

I ran into a problem with arrays. An array is a collection of values. In NOODB, values are artifacts of properties, not of an object. A property values is either a simple value, or a reference to another object. But, when you save an array, you don’t have any properties.

So, I thought, “always save values as objects” instead. Then saving an array directly works just fine.

But, the problem there is that you end up with an object for each number, unique string, etc. It’s too much.

So, I rolled back to the old version with lessons-learned in mind. At some point, I have to decide if saving an array or collection directly offers any value. If so, then I need another solution. I think I can probably just wrap it up with a dummy object and make the array/collection a property of the dummy object, and have the client figure it out. It sounds a little cheesy, but may be the most efficient.

For now, you can’t save arrays or collections directly. I don’t think this is a major detriment, but we’ll see.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: