Much of the usage of Moose and indirectly
Mondrian/Roassal is related to software analysis.
That was true at the beginning of Moose. It is not true anymore. You can model really
anything in Moose. Moose give you saving/loading of any arbitrary model, browsing,
metrics, visualization, ...
However I want to use Rossal as the basis for a
Computer Aided Design drawing application
based on a predefined standardized model [1][2]. Part of me thinks that in line with
keeping a separation of model and view, many/most of the classes of this model may require
a matching parallel class for its graphical representation - perhaps one that inherits
from ROShape or ROElement.
For the visualizations in Moose, we have the following convention of using #viewXXXOn:
For example, a famix class know how to render itself as a UML diagram (e.g.,
FAMIXClass>>viewUML, viewUMLOn:). It also knows how to render a blueprint (e.g.,
FAMIXClass>>viewBlueprint, viewBlueprintOn:).
Visualizations can be easily composed. For example, a FAMIXClassGroup has a method
#viewUML, #viewUMLOn: and so on...
I suspect you will need for your domain to scope your visualization and have different
representations. You may want to follow the same convention.
MyModelClass1>>shape
^ MyModelClass1Shape
or...
MyModelClass1>>shape
^ ROBox + ROCircle
It could be:
MyModelClass1>>viewOn: aMondrianBuilder
Hope it helps
Cheers,
Alexandre
...my thinking being that specifying "what should
be drawn was a lite enough coupling to be reasonable, leaving the "how to draw
it" defined elsewhere.
However there are different types of diagrams with different representations of model
elements, so perhaps with only a few diagram types I could just use a few selectors like
MyModelClass1>>schematicDiagramShape and MyModelClass1>>wiringDiagramShape, or
otherwise would require some class to maintain a mapping (DiagramType, ModelClass, Shape)
There actually is an associated standard for Graphics Exchange [3] that I ultimately may
align myself with, but not really worried about for now.
Anyhow, not sure if you can make sense of any of that but any advice will be appreciated.
cheers -ben
[1] International Electrotechnical Commission IEC61970 Common Information Model for Power
Systems
[2]
https://cimphony.com/cim-intro.pdf just have a quick look at Figs 3.9, 3.10., 3.13
[3]
http://cimug.ucaiug.org/Meetings/Milan2010/Presentations/15%20IEC%2061970-4…
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.