ObjectHub (was Re: [Zope3-dev] Big import blocks)

Max M maxm@mxm.dk
Fri, 21 Mar 2003 13:18:30 +0100


Guido van Rossum wrote:

>I wonder if the name isn't causing more confusion than clarity.
>Certainly the "hub" part never made sense to me: this suggests that it
>is a pretty fundamental central data structure, while in fact it is
>only used for cataloging/searching.  (Which is important, but far from
>fundamental IMO.)  And the "object" part of the name seems to be
>factually wrong.
>

I believe that it will be a fundamental central data structure when it 
gets adopted. It will make it very easy ie. to implement relations. 
Which was sorely lacking in Z2. I am using a home backed relations 
product (mxmRelations), and it makes developing in Zope *much* easier 
than storing paths or ids. like:

    # assing students to a course
    self.relations.students_in_course.relate(course, list_of_students)

    # get user on course
    self.relations.students_in_course.get(course)

It will also be easy to create a more sql like "table view" on the 
object database with this. Which can be very practial when you want 
traverse all objects of a given meta type. Something like:

    # returns all objects of meta_type "Folder"
    folders = self.table_view['Folder']

    # get all of todays article headlines about space
    articles = [
        article.title_or_id()
        for article in self.table_view['News Article']
        if article.title.find('space') != -1
    ]

Which is allmost SQL-like, and would probably make the object database 
easier to swallow for sql users.

These uses can hardly be labeled only as "cataloging/searching". I think 
it runs much deeper than that in practice.

regards Max M