How were the state charts drawn in Miro Samek's "Practical UML Statecharts in C/C++" - diagram

What software package was used to draw the statecharts in Miro Samek's "Practical UML Statecharts in C/C++"?
Edit:
Miro Samek provided excerpts from his book on his website. Page 42 of the linked PDF provides an example diagram.

All diagrams in the PSiCC2 book have been prepared with Microsoft-Visio 2003. The Visio stencil used in the book is available for a free download from the companion web-page to the book.
There is also a newer free graphical modeling tool called QM, which you can use to draw diagrams and export to EMF vector format as well as JPG raster format.

Related

Standard UML file format

I have designed UML diagrams in different tools (StarUML, BoUML, Papyrus, Omondo, Rational Rose, etc.) depending on the project and the date (rose was first, after Omondo, then starUMl, ..., now papyrus). However, I see that I cannot open my old UML diagrams because the tool is obsolete.
I would like to know if there is a standard format for UML diagrams. Probably not in production, but at least to know if there is proposal of standard format.
Probably, Eclipse is doing something like that with the M2 project, but do the other tools (not eclipse based) are interested in reading this format.?
Each UML tool uses its own format, but I think the era of proprietary format is over, and open format for diagrams like this should exist.
I have two answers to this:
In theory the standard exchange format for UML models is XMI but it´s true that each vendor implements a slightly different version so interchange is not a reality. Nevertheless, most tools are converging to at least support the Eclipse MDT-UML2 XMI implementation which in my opinion is becoming de facto XMI standard.
The OMG is working on a new standard : Diagram Definition that is supposed to fix the problems with the current XMI one (they are working a lot with many of the top vendors to make sure that this time they all go in the same direction) and, also important, it will allow to interchange not only the data (i.e. the info about the model elements) but also the layout and graphical representation so that after the import you get a model exactly as the same you exported in the first place
Have you heard of XMI?
#JordiCabot here adds some interesting details about it.
Besides Jordi's reference to the Diagram Definition standardization activity, please note that there is another action ongoing from OMG:
a request for comments has been issued in June 2011 for a CANONICAL XMI format, which is basically a subset and a set of additional rules for writing XMI documents that should limit the possibility of creating different XMI dialects, or at least should allow tools to understand a common dialect (the canonical one).

How do I view UML in XML format in a diagrammatical format?

I am running UBUNTU. Linux and have tried BOUML, which can show the project in a tree structure, but I am unable to get a diagrammatical over view of the whole system.
I think this is not a direct programming question, but hopefully it can be answered here anyway. :)
Also, would appreciate a good place to start to learn more about UML as it is becoming increasingly important in my project management.
I am not sure what format you have at hand, but I assume, you have XMI and that format does not contain any diagram specific information, it is only about the model, which is represented usually using tree structure, because it is the easiest way. For a diagram you would need to visualize the model and most importantly use some sort of layout algorithm. Layout for large models is quite hard especially with many associations and automatic layout might produce diagrams, which are misleading.
There are many books and places where to start with UML. I would recommend a book, e.g. one from Martin Fowler or Ila Neustadt and Jim Arlow. Recently modeling languages portal released list of UML cheatsheets.

How to design a UML diagram with a scripting language?

I'm designing a software component which will get instructions from other components on how the UML diagram should look like, and then will produce this UML diagram in different presentation ways (in SVG, GIF, etc.), for example (in Java):
DiagramDesigner designer = new DiagramDesigner();
designer.setStyle('Use Cases')
designer.addActor('User');
designer.addUseCase('Print Document');
// etc.
String svg = designer.getSvg();
I don't want to re-invent the wheel and want to use some industry-standard language/interface for interconnection between my DiagramDesigner and other components. I'm looking for an interface similar to DOM, but for UML, not for XML.
Can anyone help? Thanks in advance.
ps. Besides the example above I would like to make my diagrams inter-operable and transferrable between servers, e.g.:
// first server
String script = designer.getScript();
// second server
DiagramDesigner desiger2 = DiagramDesigner.import(script);
So if I understand you right, you are looking for a way to work with UML on the metamodel level. You should look at the MOF standard and its implementation the EMF (Eclipse Modeling Framework), which is used by almost all Eclipse based UML tools and this framework is used by many other modeling projects, it even somewhat influenced the standardization of MOF (resulting in SMOF and EMOF split) and therefore I would declare it industry standard.
Probably only loosely related but anyhow: PlantUML. It is open source, built in Java and likely contains already parts of what you want to do.
You can inspire from these scripts to generate any output you want:
http://askuml.com/
Currently examples are given in yUML because they're nice but could be anything.
At least for the syntax part, you could get some inspiration from the large set of textual UML tools (theses tools allow designers to textually specify the model and then they automatically show the model graphically using the standard UML notation).
At least of such tools here: http://modeling-languages.com/content/uml-tools#textual

Editors to draw diagrams in Unified Modeling Language?

I was wondering how you draw diagrams in Unified Modeling Language for your project design? By hand on paper or some editors on computer? It will be great if there are some convenient editors or other gadgets for help. I am programming under Windows and Ubuntu.
Thanks and regards!
I used Sparx Enterprise Architect.
I reverse the java project and then just drag and drop from the Package Explorer to the diagram. When I have finished to present the existing classes I then add UML classes in the diagram. No code generation or model driven, just UML graphical representation mixing existing classes and abstract classes. I give my diagrams to the team and let them integrate it.
I am very lazy when modeling :-)
(source: forum-omondo.com)
I can see my classes and navigate from one package to another showing associations, inheritances and dependencies dynamically. No need to create a diagram per view, I prefer to use the show hide links and directly navigate in the java code and model from the same diagram it is easier and a lot more powerful because interactive.
(source: forum-omondo.com)
(source: forum-omondo.com)
Just using the class contextual menu I can navigate. Really cool
(source: forum-omondo.com)
I used Poseidon for UML for quite a while.. not that bad, it's just a little bit slow since it's written in Java.
If I remember correctly it also has a community license that can be obtained for free..
I would vote for StarUML
maybe its not brand new, but it does the job!
It works under Windows.
read more about StarUML
I use Dia for my diagramming needs. It's open source and cross platform so you can switch between OS's without worrying about which format your diagrams were in. It exports to several different image types and has a Portable version (for Windows) as well.

What is the best way to use UML 2.0 in Visio 2003?

Visio 2003 uses UML 1.4, which means that some stereotypes from UML 2.0 simply don't exist, and they need to be modeled by freehand drawing (I may as well be using Photoshop). Does anyone know of an update from Microsoft or an addon to include UML 2.0 (complete - not just class diagrams) in Visio 2003?
I found this package: http://www.sdl.sandrila.co.uk/ but judging by their "example" screenshots, I'm going to stay away. If they don't know how to use UML, I'd be surprised if they could implement it correctly ;)
This set of Visio stencils and templates for UML 2.0 is excellent:
http://softwarestencils.com/uml/index.html
In case it wasn't clear, Microsoft will never update Visio support of UML. For some time, they have not considered Visio to be a Software Engineering tool.
I don't blame them. It didn't even do a good job with the parts of UML it "supported".
I'm using the UML 2.0 symbols from Pavel Hruby. Maybe you'll find them useful as well.
The nice thing about Visio is that it is just a drawing program and not a modeling environment. So just make up your own lines. Visio can draw just about any line time you can think of. But the real answer is the one already checked. Now that Microsoft "supports" UML maybe they will provide better tooling.
Those screenshots are only example diagrams, Sandrila SDL doesn't enforce that level of rigour to the diagrams.
I found this package: http://www.sdl.sandrila.co.uk/ but judging by their "example" screenshots, I'm going to stay away. If they don't know how to use UML, I'd be surprised if they could implement it correctly ;)
That seems a bit harsh - of the handful of screen-shots which are UML2 (as opposed to being examples of the other notations the tool supports, such as SDL, MCL and TTCN), which do you think are incorrect? It's quite ugly as diagrams go, and uses aliased fonts and lines, but that's a Visio feature rather than anything to do with the template.
In terms of what you can do with the UML, you are much better off using a real UML2 tool than Visio. Enterprise Architect is a cheap one which does have a real UML model behind it. (It would be nice to be able to say that the more expensive ones have fewer UI bugs and gotchas, but that isn't really the case, and most lag far behind the simpler graphical tools like OmniGraffle or Visio in polish and usability)

Resources