So I’m a Semantic Web researcher at UMD, when I’m not editing XML.com. Which means I spend a lot of time talking about RDF, OWL, formal semantics, as well as HTTP, content-negotiation, and RFCs. Recently, however, I’ve been talking to people on both sides of the aisle about Rails, Django, RDF, and SPARQL. Lemme explain…

The new wave of web frameworks, which usefully encompass web apps and web services, are what I like to call Kitchen Sink MVC frameworks. In other words, they’re based on the Model-View-Controller pattern (which is at least as old as Smalltalk), and they come laden with every feature but the kitchen sink. Add these two properties to the fact they are often developed in an Agile Language, and you end up with more productivity boosters than a case of Jolt.

Rails and Django are two of the hottest Kitchen Sink MVC frameworks around, and each trades on the strengths of its host language, Ruby and Python respectively.

But they have far more in common, ultimately, than it might seem, because, ultimately, both Rails and Django (Rails-Django from now on) are about turning relational database rows into programming language objects, and then doing the standard CRUD operations upon those objects. And whether you choose MySQL or PostgreSQL or something else, you’re still developing web apps and services backed by the relational model.

And that’s how Phillip Greenspun got to the point that anyone cares about his photography… But I digress. :>

My point here, and in the next weblog post or two, is to wonder aloud what Rails-Django would look like if instead of SQL and RDBMS… What if the “M” in MVC were composed of RDF, SPARQL, and a triplestore like Kowari?

Sure, Kowari is probably slower than MySQL, and you probably know SQL a lot better than SPARQL, but RDF is a schemaless data representation thingie. You can start with as little or as much schema as you want or need, and you can use the full expressive power of OWL (which is significantly more powerful than SQL’s DDL) when you need it.

This is a non-trivial undertaking, and there are lots of tradeoffs, but it’s an interesting space that I hope I’ll have to more to say about soon. For now, I’ll just point you to Sparta, which is an RDF databinding library for Python. It or something like it would play an active role in a Semantic Kitchen Sink MVC framework.