I present you libmodel 0.1.
We’ve been busy at Codethink lately, one of the projects we came up with is a long overdue generic data model library for GObject.
Let me give you a bit of background. As Martyn mentioned already, Tracker 0.7 is out, and with it there’s a new lot of possibilities than just storing metadata from your filesystem. Thanks to our GSoC, Adrien Bustany, we’ve got flickr, facebook and twitter miners, that allows us to store feed streams from these social networks locally. Also, more and more data providers are showing up in the GNOME stack, like Google Data and CouchDB libraries.
Building applications on top of Tracker using the D-Bus/SPARQL interfaces directly seemed a bit of an overhead for us and as stated by many people already, the current situation in GObject about abstract data models was not any good, until now.
So we decided to take this bullet and see what can we came up with, Ryan Lortie did some research on the existing solutions within other popular frameworks (.NET, CoreData, Java, Qt) and came up with this first approach, that has already served us quite well.
Some of the design goals are: high bindability for other platforms to be able to implement the data model abstract classes/interfaces, lazy loading of data within a collection, atomic signals for notifications of multiple changes in a collection, simplicity and more importantly, it should be FUN to implement a model and use it.
libmodel is implemented in Vala to allow us to move quickly to an API that we are happy with, as for now is a collection of abstract classes for Lists, Dictionaries, References and Objects. check the documentation and the source code for more info. Note that this work has to mature and that we already have some changes in the current API planned.
Have fun with it, and let us know what you think about it! Oh, and stay tuned as more tasty bits are yet to come.