Why OODB (object-oriented database) is not a dirty word

Webcrossing's built-in server-side scripting language is JavaScript, which is, of course, object-oriented. Webcrossing also uses a NoSQL object-oriented database. Are you seeing a pattern yet?

Some people may be concerned about trying an OODB because they are so familiar with SQL, and feel they don't know much about OODBs. But in truth, there isn't a whole lot you do need to know, from a programming standpoint. You can store your JavaScript objects directly in the database without jumping through any hoops. It pretty much Just Works. No complicated SQL with required serialization, table joins or complex queries.

Webcrossing's database comes with a number of built-in, ready-to-use primitive object types. At the lowest level, there are primitive Stored objects. These are the same as a JavaScript Object, except that they are stored into the database.

All objects stored in the OODB can be accessed through JavaScript objects. Setting new property values for stored objects stores the values into the OODB and saves them on disk. Fetching values from stored objects loads them from disk automatically.

So, you can just do something like:

SomeFolder.myObject = new Stored();

Voila. Stored.

Adding properties is just as easy:

SomeFolder.myObject.color = red;

You can create your own kinds of objects derived from the built-in classes, giving you an extremely powerful tool for extending and customizing Webcrossing.




As you might imagine, with built-in users and content nodes, you can save a lot of time not reinventing the wheel. So take the leap. Try an object-oriented database with an object-oriented programming language. You might never turn back.

No comments:

Post a Comment