Newbie Question - Incremental Development - Updating GA's and Styles [message #1065146] |
Mon, 24 June 2013 09:50  |
Eclipse User |
|
|
|
I am working on an editor and so far it is going well. So far, Graphiti is making things simple. My editor is using an existing model that contains main different types of elements. For now, I would like to represent all the elements as rectangles with simple styles and then refine things as time goes on. For example, I would like to replace some of the rectangles with polygons later in the process. Also, I would like to adjust the style definitions. What is the recommended way for updating such things at editors are refined. For the styles, I am currently replacing the entire style definition whenever the editor is loaded, but I was hoping there was more elegant way. Would I need to do similar for the shapes in an update feature? Other recommendations?
Thank you
|
|
|
|
|
Re: Newbie Question - Incremental Development - Updating GA's and Styles [message #1065283 is a reply to message #1065195] |
Tue, 25 June 2013 04:47   |
Eclipse User |
|
|
|
I have been using Graphiti for a couple of days now, and have been wondering about this issue as well, except from the other side (my business objects are not entirely stable).
I can see the use of graphical elements in an editor instance (fast/easy detection of what the user points at), but I don't understand the idea behind using this information as *the* pictogram model and storing it in the diagram file.
If I were to write an editor from scratch, I would make "graphical business objects" (let's call them GBOs), ie elements that represents concepts in the editor containing just enough information to draw themselves, eg just position and size for a box-like shape, or just the source and destination (graphical) business objects for a connection element.
While it would be more work (you need to make these GBOs which are probably almost a copy of your real business objects), raising the level of abstraction here would solve your style problems (since the style is 'generated' by the GBO while rendering it).
It may also simplify the layout feature, since you don't have to dig around in low-level graphical objects without direct business meaning.
For me, if I define the GBOs as a proper meta-model, I can do version management and migration with it as usual with meta models.
(More extreme steps would be to do a transformation between the business object model and the GBO, or even just drop the business object model, and use the GBO as business object model instead.
What I don't know unfortunately, is why Graphiti uses such low-level graphical elements instead. It would be interesting to learn why this path was chosen.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03977 seconds