Re: Adding a new diagram type (ORM plug-in)?



On Thu, Aug 12, 2004 at 10:31:22AM +0200, larsrc raeder dk wrote:
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.

Hello, 

Thanks for the tips, I have already started playing around and thought a
good place to start would be to copy sybase as an orm sheet with three
figures (just renamed existing sybase figure files).

I have added orm code in :

objects/orm
objects/Makefile.am

po/POTFILES.*

shapes/orm
shapes/Makefile.am

sheets/orm.sheet.in
sheets/Makefile.am

I run ./autogen.sh, ./configure and make.

I seem to see the actual plugins being built in objects (no sybase or
orm), all builds ok, no errors and only see sybase as a tab with the
icons. I was hoping to see orm tab... I must be missing something, but
not sure what. Ideas?

Thanks,
erics



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]