Is there any UML tools available for Scala. the reason for my question is that its a blend of functional and OO concepts hence I would like to know how such tools denote functions in UML diagrams.
StarUML is a tool specifically used for drawing UML diagrams. It is a diagramming tool mainly used for agile and concise modeling.
Gliffy is a free online drawing tool which provides support for drawing UML diagrams. It is one of the most widely used online diagramming application. Features: Allows you to draw a diagram with ease.
Free UML Tool for Fast UML DiagramsUMLet is a free, open-source UML tool with a simple user interface: draw UML diagrams fast, build sequence and activity diagrams from plain text, export diagrams to eps, pdf, jpg, svg, and clipboard, share diagrams using Eclipse, and create new, custom UML elements.
UML is not a programming language, it is rather a visual language. We use UML diagrams to portray the behavior and structure of a system. UML helps software engineers, businessmen and system architects with modelling, design and analysis.
This thread summarizes the obstacles faced by any UML tool wanting to represent Scala classes:
- there is no official representation of mixins in UML
- it is difficult to represent:
- closures
- Scala type members
- class constructor parameter bounds (a.k.a. "template type" bounds/constraints)
- covariant and contravariant class constructor inheritance
- the relationship between a class or trait and the companion object
This thesis ("Evaluierung des Einsatzes von Scala bei der Entwicklung für die Android-Plattform", pdf, German) does add stereotypes for trait mixins and other scala specific elements (pp. 146).
What was added by Meiko Rachimow in 2009:
For all published attributes exist implicit getter (
attribute1
andattribute2
), except the visibility was declared asprivate
(attribute3
). If published attributes are tagged with a stereotypeVar
, they are variables, for which there exist implicit setter (attribute2
). The stereotypelazy
marks instance variables as lazy (attribute4
).
Like in UML, generic classes are marked with an abstract type. By using the Scala language syntax, upper and lower bounds can be declared for this type (
EineKlasse
). It is possible to use structured types as bounds, which attributes and methods are embraced by curly braces (EineKlasse2
). Generic type parameters of methods are embraced by square brackets (operation
).
Traits are displayed like abstract classes and tagged with the stereotype
trait
. Abstract attributes and methods are displayed in italics (attribute2
,operation2
). For abstract attributes the dependency arrow can be tagged with the stereotyperequires
(Trait3
,attribute3
). On the other hand, the stereotypeself
is used for self referencing types (Trait4
). If a trait inherits another trait, the inheritance is displayed with an inheritance arrow (Trait2
). This arrow type is used too, if a class extends a trait (Klasse
). To emphasis the “mix in” of traits, the inheritance arrow can be tagged with the stereotypemixin
(Klasse
).
Singleton objects are displayed like classes and tagged with the stereotype
singleton
. It is possible, that there exist two class elements with the same name. In fact it is a singleton object with the belonging companion class. In this case the dependency arrow is tagged with the stereotypehasA
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With