Semantic applications with CubicWeb (Nicolas Chauvat)

Tags: europython2009, europython, rdf

CubicWeb: the semantic web is a construction game.

The value of a network like the current internet grows exponentially with the amount of information that is available and linked. The semantic web extends that linking to data instead of just documents.

The semantic web is a world-wide database with URLs as the keys into the “database”. Specific semantic web formats include RDF and OWL. And ontologies describe what you’re describing. There’s even a specific query language: SPARQL.

Our current frameworks don’t really support all this, so we need adapted frameworks. For instance what logilab did with cubicweb. Cubic has a couple of core concepts. An entity-relationship model of the data. Views to present results of queries (RQL, soon SPARQL). The visible web app uses html and json views; there are also semantic views that output rdf and owl.

Cubicweb’s back-end combines/aggregates various sources such as sql, RQL, LDAP, comma separated files and is queryable with RQL. So if you don’t like the second layer (the web engine), you can always reuse the back-end layer as that only communicates with plain queries. The aggregation allows you to store for instance metadata in an sql database (“last modification time” and so), cubicweb will aggregate it. In his demo at the end he showed turbogears as a front-end as proof that you can use the back-end separately.

For the front-end, there is support for partially generated user interfaces. And there is a library of reusable components (called “cubes”).

They’re keen on agile methodologies at Logilab. So cubicweb supports that. For instance by generating a basic CRUD (create, delete, etc) user interface based on a data model. That’s all you need to get started. You can then improve views progressively. And there’s support for data migration as the data of course also evolves. They’re using cubicweb internally in logilab for 5 years now and always managed to migrate the older content.

Aformentioned “cubes” are python classes that define their attributes in a schema style (like zope’s schema). There are more frameworks that do that now, but 7 years ago it was much less common. Those entities are tied together by relations: also a class, but now with a subject and an object attribute (so source/target for the relation). Semantic web style linking! Cubicweb aggregates all those cubes’ content so that you can query it.

Some examples of build-in semantic views: owl, foaf (friend of a friend, social networking), doap (description of a project) and a couple of common microformats as RDFa, iCal, vCard.

Since last year, version 3.0 is out as a LGPL-licensed download.

 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):