gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <m...@leosimons.com>
Subject Re: RDF
Date Sun, 17 Apr 2005 09:27:21 GMT
On 17-04-2005 00:53, "Stefano Mazzocchi" <stefano@apache.org> wrote:
> Example, if you have the Module object and the Project object, you have
> to decide which way the link goes and the notion of "Module.projects"
> means, this is the list of projects this module contains.
> 
> Problem is that this implicit modeling forces you to say decide the
> direction of the link, and, in case you want both, you have to model
> this explicitly and at update, you need to know where to change.
> 
> In RDF, you don't have to do all that.

Exactly! If you want a bi-directional link you have to model it explicitly
and it is always very evident when using it, ie

  project.module.repository.workspace.name

Just yells "You're handling a project and accessing something related to the
workspace. Why is that????" right at ya.

One thing that got Gump2 into problem was that things were relatively
tightly coupled to another. Having "manual" modelling means that its easy to
spot that coupling (just delete all links from repository->workspace, run
your project-related code, boom, it blows up).

As with databases, I (model designer) have to work real hard so the plugin
programmer has an easier time. Interestingly...
> I find it somewhat ironic that you now code in a dynamically typed
> language (and, AFAIK, with good feelings about it) and you advocate that
> static typing of your data (object or SQL doesn't really matter) is
> better for you.

I hadn't realised that this clearly just yet. I've been conciously making a
lot of things statically typed to keep it understandable. Now...

<snip/>
>   failed_builds = model.get("?x is_a Build where ?x status 'failed'")

Is indeed quite understandable. At least I had no problem understanding that
when I first saw it.

> Sure, the argument that objects are better than dealing with JDBC
> resultsets by hand stands, but making this a general rule could be turn
> out to be a mistake.

Do you know of an open-source reasonably sized RDF-model-based application
that follows the approach you're describing? I'd like to see how it turns
out! I was looking at Haystack the other day but uhm, it suffers from all of
those "research project" flaws.

Same comment again....
> I find it somewhat ironic that you now code in a dynamically typed
> language (and, AFAIK, with good feelings about it) and you advocate that
> static typing of your data (object or SQL doesn't really matter) is
> better for you.

You know, I still have mixed feelings about a lot of that. I have read so
much python code recently that is hard to understand because its really
dynamic, often for no good reason. And I've also see a lot of python code
look really bad because developers want to add security in there that can't
truly be enforced (ie Zope). And a whole lot of python code that is horribly
structured simply because you can do a lot of "glueing" so easily.

On a code level scale, working with python can be real fun once you get the
hang of it, but every time I write something like

  for command in [command for command in commands \
      if isinstance(command,Script)]:
    handle_script(command)

(which is kinda "pythonic")
I do wonder whether

  it = commands.iterator();
  while(it.hasNext()) {
    command = it.next();
    if(command instanceof Script)
      handleScript(command);
  }

Doesn't make more sense if there's other developers that have to understand
the code.

G'day!

LSD



---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message