Django, RDF & XUL

21 views
Skip to first unread message

benj

unread,
Nov 8, 2006, 10:20:24 PM11/8/06
to Django users
Hi folks,
After using django for a number of more conventional projects, I'm
toying around with trying to use it to drive a XUL application. Using
django's template system to generate XUL views is easy enough, as is
passing serialized objects around with AJAX. However, most of XUL's
widgets use RDF data bindings, and I'm not finding a lot of resources
for working with them.

Does anyone have experience translating django models into RDF graphs?
My ideal views would look something like this:

def person_list_rdf(request, filter):
pl = Person.objects.filter(lname__icontains=filter) # or whatever else
I'm doing
rdf_list = translate_to_rdf_graph(pl)
return HTTPResponse(rdf_list)

I doubt anything will actually be that simple, but at this point I
don't even know where to start. Can anyone share experience, ideas, or
pointers?

Thanks,
Benj

James Bennett

unread,
Nov 8, 2006, 10:30:51 PM11/8/06
to django...@googlegroups.com
On 11/8/06, benj <box...@gmail.com> wrote:
> Does anyone have experience translating django models into RDF graphs?
> My ideal views would look something like this:

Off the top of my head I don't know of anyone who's done this, but it
would certainly be a useful thing to have available. Maybe we could
work on developing an RDF serializer to go into Django's serialization
framework..

--
"May the forces of evil become confused on the way to your house."
-- George Carlin

David Larlet

unread,
Nov 9, 2006, 3:51:16 AM11/9/06
to django...@googlegroups.com
2006/11/9, James Bennett <ubern...@gmail.com>:

>
> On 11/8/06, benj <box...@gmail.com> wrote:
> > Does anyone have experience translating django models into RDF graphs?
> > My ideal views would look something like this:
>
> Off the top of my head I don't know of anyone who's done this, but it
> would certainly be a useful thing to have available. Maybe we could
> work on developing an RDF serializer to go into Django's serialization
> framework..

+1 very interesting project!

Perica Zivkovic

unread,
Nov 9, 2006, 10:12:49 AM11/9/06
to django...@googlegroups.com
whoa this sounds really as a cool idea

orestis

unread,
Nov 9, 2006, 10:58:00 AM11/9/06
to Django users
Hey, can you give some more info on the stack of this application ?

Is it client-server, standalone ? What advantages does it have over the
normal HTML approach ?

Bill de hOra

unread,
Nov 10, 2006, 6:41:35 AM11/10/06
to django...@googlegroups.com
benj wrote:
> Hi folks,
> After using django for a number of more conventional projects, I'm
> toying around with trying to use it to drive a XUL application. Using
> django's template system to generate XUL views is easy enough, as is
> passing serialized objects around with AJAX. However, most of XUL's
> widgets use RDF data bindings, and I'm not finding a lot of resources
> for working with them.
>
> Does anyone have experience translating django models into RDF graphs?
> My ideal views would look something like this:
>
> def person_list_rdf(request, filter):
> pl = Person.objects.filter(lname__icontains=filter) # or whatever else
> I'm doing
> rdf_list = translate_to_rdf_graph(pl)
> return HTTPResponse(rdf_list)
>

Yep ("Django, RDF & XUL" - what a title ;)

The key thing is to get a consistent/generic url for each object, and a
clean way to use rdf:resource to point at foreign keys, and things like
attachments.

I would also consider the RSS framework as maybe being the shortest path
to goal. If that can be extended to RSS1.0+ complete content dumping,
you get RDF for free, plus you stay within Django's existing programming
idioms.

I agree with David, this is a very interesting project. God, it's great
to be back on this list.

cheers
Bill

binberati

unread,
Nov 12, 2006, 10:25:31 PM11/12/06
to Django users
Interesting indeed!

Not that comparisons always make sense, but Django seems to be far
behind Rails in this respect. See for example
http://www.activerdf.org/.

Except for some posts by Bill de hÓra, RDF support did not get a lot
of attention. Good you're here Bill...

Previously, I had some thoughts about complementing/replacing URL.conf
with RDF graphs, and complementing models.py with RDF graphs.

Wouldn't the use of RDF in URL.conf be a great starting point to map
resources?

Regards,
bin

On Nov 10, 12:41 pm, Bill de hOra <b...@dehora.net> wrote:
> benj wrote:
> > Hi folks,
> > After using django for a number of more conventional projects, I'm
> > toying around with trying to use it to drive a XUL application. Using
> > django's template system to generate XUL views is easy enough, as is
> > passing serialized objects around with AJAX. However, most of XUL's
> > widgets use RDF data bindings, and I'm not finding a lot of resources
> > for working with them.
>
> > Does anyone have experience translating django models into RDF graphs?
> > My ideal views would look something like this:
>
> > def person_list_rdf(request, filter):
> > pl = Person.objects.filter(lname__icontains=filter) # or whatever else
> > I'm doing
> > rdf_list = translate_to_rdf_graph(pl)

> > return HTTPResponse(rdf_list)Yep ("Django, RDF & XUL" - what a title ;)

Reply all
Reply to author
Forward
0 new messages