Why you should use a content repository for your application
I gave my Midgard2: Content repository for desktop and the web talk yesterday in GCDS. The slides are available on SlideShare. The main idea was that any application that deals with structured data could benefit from using a content repository like Midgard2 or CouchDB.
So, what is a content repository? It is a service that sits between an application and a data store. It provides several advantages:
- Common rules for data access mean that multiple applications can work with same content without breaking consistency of the data
- Signals about changes let applications know when another application using the repository modifies something, enabling collaborative data management between apps
- Objects instead of SQL mean that developers can deal with data using APIs more compatible with the rest of their desktop programming environment, and without having to fear issues like SQL injection
- Data model is scriptable when you use a content repository, meaning that users can easily write Python or PHP scripts to perform batch operations on their data without having to learn your storage format
- Synchronization and sharing features can be implemented on the content repository level meaning that you gain these features without having to worry about them
Midgard2 is a content repository library that is built on top of glib, libgda and dbus, making it fit the general free desktop infrastructure very well. You can use it in any application that is written in C, Objective-C, Python, PHP, or soon Mono. Learn more from the slides!