Naked Objects in Sparta


When I first discovered Naked Objects, I thought about a Python implementation that used RDF to provide the schema. What I wasn't sure about was how best to mix use of Python objects for the instances with RDF for the schema.

The answer could be mnot's sparta.

Sparta provides a simple Python-object-to-RDF binding. It uses eikeon's rdflib, which is based on the code eikeon and I wrote for Redfoot.

Sparta itself doesn't make use of the schema module in rdflib but a Naked Objects implementation could be built on top of Sparta + the schema module.

The schema module lets you do things like ask what properties are allowed on a given resource and what values those properties can take. (Actually, it doesn't appear to do the latter anymore - I'll have to ask eikeon why that dropped out of our original code). The generator-based version of the schema module is certainly a lot cleaner than the original code eikeon and I wrote three years ago. One of us should write up a side-by-side comparison of before and after.

So another little project to add to the list: a Naked-Objects-like generic UI on top of sparta, using the schema module in rdflib to control property domains and ranges. The result would be pretty close to a rich-client version of the original generic viewer in Redfoot.