To: "discussions about usage and development of dia" <dia-list gnome org>
Subject: Re: Adding a new diagram type (ORM plug-in)?
Date: Thu, 12 Aug 2004 10:31:22 +0200 (CEST)
> Howdy all,
>
> I am working for a research group that has been testing Dia extensively as
> a
> permenant tool for drawing modeling diagrams. This seems to have resulted
> in
> positive responses from all the users, except that there are no ORM
> diagram
> elements available as in the provided ER, Flow charts, etc.
>
> No problem as it is open source and they have asked me to look into
> creating a
> plug-in (is this the right idea?) for ORM diagrams.
>
> I have looked at the lists a bit (this is not my first Open Source
> project),
> checked your site and even took a brief look at the sources. I noted that
> your project would like to be contacted (on the developers page) about
> "Other
> diagram types" so here I am!
>
> Where could I best start looking to implement such an ORM diagram into
> Dia? Do
> you have examples, others working on such a thing, ideas, comments for me?
Haven't heard of ORM before, and I've certainly not heard of anyone
working on it. The best sources are the sources (*grin*) and the Dia
TWiki (http://faemalia.org/wiki/view/Technical/DiaEditor). You should be
aware of the difference between shapes and objects, shapes are very easy
to create, but very limited in functionality. You can mix the two in a
sheet.
Making new objects involves a fair amount of boilerplate (ought to make
something that can generate it:), but there's very little that takes
actual though, mostly the drawing part where you have to calculate margins
and other stuff as needed.
Looking at some samples (http://www.orm.net/pdf/ORMwhitePaper.pdf), I
don't see any major problems in implementing this. You'll want to look at
the movable text label (see the FS lines). The fact boxes will need a bit
of work -- if you want arbitrarily many fact connections, it'll be a
little tricky (need PROP_LIST), but if you just want two or three facts,
it can be hardcoded with the little arrows, connection points etc.
One warning: Do not look to the UML Class object for inspiration, it is
horrible.
-Lars