SuRF 1.0.0 Beta released!

View: New views
3 Messages — Rating Filter:   Alert me  

SuRF 1.0.0 Beta released!

by Pēteris :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We are pleased to announce release of SuRF 1.0.0 Beta. This version
includes some significant changes and improvements in interface, thus
the major version number shift.

SuRF is an Object - RDF Mapper based on the popular rdflib python
library. It exposes RDF triple sets as sets of resources and integrates
them into the Object Oriented paradigm of Python in a similar manner as
the ActiveRDF does for Ruby.

New features in 1.0.0 Beta version:

    * Improved resource querying. Can mix any of these features
together:
        * filter resources by attribute values
        * filter resources using SPARQL filter expressions
        * limit, offset, order ascending/descending
        * specify graph/context where resources should be loaded from
and later saved to
        * eager-load resource attributes
    * Improved attribute querying. All the querying features available
at resource level are also available at attribute level.
    * Growing amount of documentation and examples. Still big gaps there
but the situation is improving.

Project Google Code site: http://code.google.com/p/surfrdf/
Documentation: http://packages.python.org/SuRF/

You are very welcome to try it out, tell us about your experiences,
report bugs and participate!




Re: SuRF 1.0.0 Beta released!

by Steve Cassidy-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Pēteris wrote:
> We are pleased to announce release of SuRF 1.0.0 Beta. This version
> includes some significant changes and improvements in interface, thus
> the major version number shift.
>
> SuRF is an Object - RDF Mapper based on the popular rdflib python
> library. It exposes RDF triple sets as sets of resources and integrates
> them into the Object Oriented paradigm of Python in a similar manner as
> the ActiveRDF does for Ruby.
>

Interesting. I've been using RDFAlchemy for a while, replacing my
home-grown object mapper.  I wonder if you're aware of this and whether
anyone might comment on the advantages or otherwise of one or other model.

RDFAlchemy seems to have a little more machinery for pre-defining
classes and the meaning of properties (ie. this is a multiple valued
property).   It lacks any kind of query optimisation though - does SuRF
have this - eg. delaying the evaluation of queries until as much as
possible is known...that is, does:

FoafPerson.get_by(foaf_name='John').order(something).limit(10)

get all the Johns and iterate over them or does it construct a bigger
query and let SPARQL do the work? (peeking at the code it looks like it
does which would be neat).

RDFAlchemy: http://www.openvest.com/trac/wiki/RDFAlchemy

Steve





Re: SuRF 1.0.0 Beta released!

by Pēteris :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

O , 2009-11-10 17:48 +1100, Steve Cassidy wrote:

> Interesting. I've been using RDFAlchemy for a while, replacing my
> home-grown object mapper.  I wonder if you're aware of this and whether
> anyone might comment on the advantages or otherwise of one or other model.
>
> RDFAlchemy seems to have a little more machinery for pre-defining
> classes and the meaning of properties (ie. this is a multiple valued
> property).  

Yes, in RDFAlchemy case the code looks cleaner because you can have
short attribute names and don't have to worry about multiplicity so
much. In  SuRF, attribute names are always in "namespace_predicate" form
and attribute values are list-like objects (with "first" and "one"
helper properties). In my opinion the ability to (optionally) predefine
classes and have shortcut names for some attributes would be desirable.
So I created an issue in SuRF's issue tracker with some more thoughts on
this: http://code.google.com/p/surfrdf/issues/detail?id=18

> It lacks any kind of query optimisation though - does SuRF
> have this - eg. delaying the evaluation of queries until as much as
> possible is known...that is, does:
>
> FoafPerson.get_by(foaf_name='John').order(something).limit(10)
>
> get all the Johns and iterate over them or does it construct a bigger
> query and let SPARQL do the work? (peeking at the code it looks like it
> does which would be neat).

Yes, it does. Just chaining the modifiers doesn't cause any queries to
be executed. The query gets constructed and executed the moment you
start iterating. Also, if the "full()" modifier is present and SuRF is
allowed to use subqueries via configuration, resource attribute values
will be eager-loaded with just one SPARQL query. We also plan to support
this eager-loading of attributes with SPARQL DESCRIBE queries.