Comparative analysis of DSM Graphical Editor frameworks_Graphiti-Sirius
Comparative analysis of DSM Graphical Editor frameworks_Graphiti-Sirius
Developing languages and tools which depend on Therefore, models are often based on a graphical
Domain-Specific Modeling (DSM) methodology, representation and supported by graphical design tools.
represent a hot topic nowadays, but building a set of A set of DSM tools enables user to create models relied
graphical tool is often very complex process which takes on metamodels, and usually, based on created models,
a lot of time and it often highly depends on developer’s generate a certain part of code using generators.
knowledge and reliable frameworks. Today, a leading Graphical Model-Driven Engineering tools have
role of Integrated Development Environment (IDE) become extremely popular concerning the development
tools on market has an open source – Eclipse platform, of applications for a large number of domains from
which became de-facto standard and primary choice for natural language processing to computer vision in
developing a DSM environment. The choice of user bioinformatics. Using a graphical model, which is a
interface framework, to solve the traditional problems popular and well-studied framework for compact
of custom modeling in an elegant fashion, strongly representation of a joint probability distribution over a
influences the development process and system’s large number of interdependent variables [6], facilitates
lifetime costs spent on maintenance. In order to realize better understanding of a problem-domains. It can be
which of the open source frameworks based on Eclipse stated that Model-Driven visualization provides model
is better choice, allowing developers to establish a very driven engineers with the tools and technologies to
flexible graphical environment for editing the models, a integrate interactive visualizations in their systems. By
comparative analysis of Graphiti and Sirius frameworks separating the customization and configuration of the
for developing a DSM Graphical Editor is done with view from its underlying model, engineers can explicitly
aim to define pros and cons of each of them. state how their data should be displayed [7].
Today a leading role of MDE tool on market has the
1 Introduction open-source Integrated Development Environment
(IDE) - Eclipse, which supports a wide range of
A significant factor behind the difficulty of frameworks for development and usage, depending on
developing complex software is the wide conceptual problem type. An Eclipse Modeling Framework (EMF)
gap, between the problem and the implementation provides an object graph for representing models, as
domains of discourse, which can be reduced using well as capabilities for (de)serializing models in a
Model-Driven Engineering (MDE) [1]. The key fact for number of formats, checking constraints, and generating
MDE software development is that system is a model various types of tree editors for use in Eclipse. The
consistent with its meta-model [2, 3]. That model is the Graphical Editor Framework (GEF) and Draw2D
link between the problem domain and solution domain, provide the foundations for building graphical views for
and meta-model represents an abstract model of the EMF and other model types [8]. The Graphical
system that describes the most common definition of the Modeling Framework (GMF), by encapsulating GEF
model. The key benefits of Model-driven approaches and Draw2D (Fig. 1), provides a tool for creating
are: increased developer productivity, decreased cost (in graphical editor with a high degree of flexibility.
time and money) of software construction, improved Creation of editor in GMF is often complex and highly
software reusability and the higher level of software depends on Java, XML and Eclipse plug-in knowledge.
maintainability [2]. By using Graphiti framework, that hides GEF's
Domain-Specific Modeling (DSM) methodology complexities from the developer and bridges EMF and
uses models to describe the individual components of GEF (Fig. 1) to ease and speed up the development of
the domain system, which is usually based on graphical graphical editors, it is possible to design homogeneous
or textual description. Considering that communication graphical editors that visualize an underlying model
effectiveness can be measured by speed, ease, and based on a tool-defined graphical notation [9]. A big
accuracy in which the information can be understood disadvantage of all mention frameworks (GMF, GEF,
[4], it can be stated that graphical diagrams are believed Graphiti) is a high level of required knowledge in
to be more effective than text in the communication domain of Java object oriented language, EMF and
between end-users and/or domain practitioners [5]. Eclipse plug-in development. On the other side, Sirius
8
Luna - 4.4 version (Graphiti v0.11 incubation faze and robustness. Using a Spray framework, which
Sirius v1.0), a question is which of this framework is encapsulate a Graphiti framework, a creation is
better than other and why? simplified and reduced on only 20 lines of code per
An evaluation criteria is setup based on mention works object [12]. A Spray provides three different DSLs for
[11, 15] as: creating an editor: Spray Core, Shape and Style.
- Evaluation of applicability for supporting tree- Although they are simple languages, programmers must
based methods depends on manually running learn them, and that complicates the development
and testing editors, reading the official process.
documentation and relies on experience of Unlike Graphiti, Sirius works with models which
editors' development. describe semantics of editors - structure, appearance and
- Development time - a time spent for creating a behavior of dedicated representations and associated
tool. tools. For creation of editor, no Java code is necessary.
- Maintainability - a time spent for maintaine a A main disadvantage is need for interpreted expressions
tool (code size, dependences, making a change which will be evaluated at runtime to provide a behavior
to the editors). specific to domain and representations. An expression
- Customizability - customization of visualiza- can be written in Acceleo [14], OCL [17] or Java
tion. language.
3.1 Evaluation of applicability For difficult tasks, in case of both frameworks, a
deep knowledge of GEF and GMF is required (A Sirius
A results for Graphiti framework will be taken from encapsulates GMF instead of GEF and because of that a
paper [11], updated with new version of framework and difficult task is simpler to realize).
compared with Sirius. The main goal of this type of
3.3 Maintainability
evaluation is to present possibility of frameworks in
simple tasks. As it mention in [11], a maintenance is measured by
code size, dependencies, and making a change to the
Table 1. Evaluation of applicability for supporting tree-based
methods editor.
Determination of code size for Graphiti framework
Requirement Best solution can be easily done, because every object must
Replaces Excel-tool - implements its functionality which is near 400 lines of
Propagation of values Equal code per domain object [12]. Using a Spray, lines of
Learnability Sirius code can be significantly reduced. On the other hand, a
Easy to understand Equal Sirius framework works with models which describe
Outline Equal objects. A number of code lines depend on
Layout Equal
customization and Acceleo, OCL or Java expression.
Simple creation Sirius
Both of frameworks rely on GEF, Draw2D or GMF,
Editing Sirius
Copy and paste Sirius
as well as of EMF and Eclipse platform. Because of
Hiding of nodes Sirius that, both frameworks depend on core Java and Eclipse
Search Sirius platform extension. In this case, none of analyzed
Easy to read Sirius frameworks has a better position than the other.
Zooming Equal In case of customization of objects’ specific
Persistence Sirius features, both frameworks provide a relatively good
Validation EI Equal possibility. With Graphiti framework, customization
Validation QCF Equal can be done directly on code. The main problem is to
QCF override Equal find object and part of code which will be modified.
Resource change tracking Equal With Sirius, a simple modification can be done using
Traceability None object properties inside model. However, complex
Major OSes support Sirius requirements typically require changes to the EMF and
Free of cost Equal GMF code, what can be very complicated.
Total Graphiti: 0
Sirius: 9 3.4 Customizability
As can be seen from analysis presented in Table 1. In context of customizability of graphical editor, the
a Sirius based editor provides the most of required emphasis is on customization of graphical objects
features, which means that Sirius is better option for visualization and their behavior. Graphiti framework
creating a DSM editor. customization of graphical elements is provided by
using a Java code and extending an AbstractAdd-
3.2 Development time
ShapeFeature class. Features like Update, Remove,
Both editors rely on EMF, but for simple tasks, Delete, Move, Resize, Layout, Connection and Anchors
knowledge of Draw2D and GEF or GMF is not must be implemented by extending appropriate class. A
required. Creating an editor in Graphiti framework has style of object is defined using predefined 2D graphical
done by implementing a core functionalities of object in object. Using Spray over Graphiti, a definition of shape
Java language (about 400 lines of code per domain is described with Shape DSL which is consistently used
object [12]), which for large DSL can be very for node elements as well as for connections. The Shape
9
DSL also defines connections and placing of objects and strengths and weaknesses and making certain
reduces time for objects’ creation and implementation. recommendations.
For diagram configuration, Sirius framework uses a
References
Diagram Description element (inside a Viewpoint) and
its sub-elements (which describe the layers, graphical [1] R. France and B. Rumpe, “Model-driven Development of
elements and tools). The content of the Diagram Complex Software: A Research Roadmap”, Future of
Description is mostly made of graphical elements’ Software Engineering, pp. 37-54, 2007
mappings, organized in layers, and their associated [2] S. W. Liddle, “Model-Driven Software Development”,
tools. In addition, it can also contain validation rules, June 2010. [Online]. Available:
filters and layout configuration information [13]. There http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1
.172.5995&rep=rep1&type=pdf
is a set of predefined styles for a node (Square,
Lozenge, Ellipse, Basic Shape, Note, Gauge, Image) [3] M. Brambilla, J. Cabot and M. Wimmer, Model-Driven
and Custom Style which are implemented in Java. All Software Engineering in Practice, Morgan & Claypool
publishers, 2012
additional styles (borders, colors, decorations, edges,
[4] L.-O. Johansson, M. Wärja, H. Kjellin and S. Carlsson,
etc.) are described by properties. A Sirius model can be “Graphical modeling techniques and usefulness in the
used as WYSIWYG for direct testing of created editor. Model Driven Architecture: Which are the criteria for a
“good” Computer independent model? ”, Proceedings of
4 Conclusion 31th Information Systems Research Seminar in
Scandinavia: public systems in the future: possibilities,
Applying DSM methodology, which uses models to challenges and pitfalls, Sundsvall, 2008
describe the individual components of the domain [5] D. Moody, “What makes a good diagram? Improving the
system, is one of the main topics nowadays. A model cognitive effectiveness of diagrams in IS development,”
presents and describes element of meta-model, which 15th international conference of Information Systems
depends of problem domain. Building a set of tools for Development, Budapest, Hungary, Springer 2006
[6] A. Deshpande, L. Getoor and P. Sen, “Managing and
creating and editing these models is not usually a simple Mining Uncertain Data: Chapter 1- Graphical models for
task. A lot of graphical frameworks can be found on uncertain data,” Springer 2009
market, and all of them have their pros and cons. [7] R.I. Bull, “Model Driven Visualization: Towards a
In this paper, two of open source graphical Model Driven Engineering Approach for Information
frameworks are presented and compared. Both of them Visualization,” PhD Thesis, University of Victoria, 2008
belongs to EMF, and can be found in Eclipse Luna [8] F. Budinsky, D. Steinberg, E. Merks, R. Ellersick, T. J.
Grose, Eclipse Modeling Framework: A Developer's
distribution. Guide, Addison Wesley, 2003
After comparative analysis based on selected [9] C. Brand, M. Gorning, T. Kaiser, J. Pasch and M. Wenz,
criteria, next conclusion can be stated: “Graphiti - Development of High-Quality Graphical
- both frameworks can be used for building an Model Editors,” Eclipse Magazine, [Online]. Available:
http://www.eclipse.org/graphiti/documentation/files/Eclip
user friendly graphical editor based on seMagazineGraphiti.pdf
proposed DSL, [10] E. Juliot and J. Benois, “Viewpoints creation using Obeo
- both editors provide a lot of required features, Designer or how to build Eclipse DSM without being an
but Sirius based editor provides the most of or expert developer?,” Obeo Designer Whitepaper, 2010,
[Online]. Available: http://www.obeo.fr
the better features,
- Sirius uses a model for describing elements of [11] I.Refsdal, “ Comparison of GMF and Graphiti based on
experiences from the development of the PREDIQT
editor instead of Java code, thus developing is tool,” Master thesis, University of Oslo, 2011
faster and less error prone,
[12] F. Filippelli,S. Kollosche, M. Bauer, M. Gerhart, M.
- for difficult tasks both frameworks must use
Boger, K. Thoms and J Warmer, "Concepts for the
GEF or GMF, model-driven generation of graphical editors in Eclipse
- both frameworks depend on GEF or GMF, by using the Graphiti framework", [Online]. Available:
- a relatively good support for customization, http://spray.eclipselabs.org.codespot.com/files/SprayPape
- Sirius is more customizable than Graphiti, r.pdf
- Sirius is WYSIWYG. [13] Sirius Documentation, [Online]. Available:
In summary, a Sirius framework is a better choice http://www.eclipse.org/sirius/doc/
for building a DSM Graphical Editors because it [14] Acceleo, [Online]. Available:
provides the most of or the better features than Graphiti. http://www.eclipse.org/acceleo/
In addition, it is more customizable, allows the user to [15] A. E. Kouhen,C. Dumoulin, S. Gérard, P. Boulet,
view something very similar to the end result while the "Evaluation of Modeling Tools Adaptation", hal-
editor is being created. Lastly, by using a model for 00706701, version 1 - 11 Jun 2012
describing elements of editor instead of Java code, it [16] P. Mohagheghi and Ø. Haugen, "Evaluating Domain-
makes DSM Graphical Editors’ development process Specific Modelling Solutions", Advances in Conceptual
Modeling – Applications and Challenges, Lecture Notes
faster and less error prone. Future work will be focused in Computer Science, 2010, Volume 6413, Pages 212-
to frameworks' evaluations based on the rest of criteria 221
proposed in [16], and testing created editors by users, in [17] Object Constraint Language (OCL), [Online]. Available:
order to define as much as possible frameworks' http://www.omg.org/spec/OCL/ISO/19507/PDF
10