OU blog

Personal Blogs

Christopher Douce

UML Sequence Diagram goose-chase

Visible to anyone in the world

Over the last couple of months, I’ve been updating block 2 of the TM354 module materials as a part of a module refresh. This has meant I’ve had to reacquaint myself with the Unified Modelling Language (UML), which I first learnt as a postgraduate student. I went onto use UML for a short time when I worked as a software developer in industry. It’s a really useful tool; it provides a neat graphical language that helps software engineers to communicate with each other when put pen to whiteboard.

UML describes the structure of a number of diagrams. To explain everything very coarsely, there are two main types of diagrams: structural diagrams (which describes what something is), and behavioural diagrams (which describes what something does).

Introducing the sequence diagram

One of the behavioural diagrams is a sequence diagram, which is a ‘type of’ interaction diagram. A sequence diagram can show what messages can be passed between which modules at a particular moment in time.

Objects are presented using something called lifelines. Messages that are sent between objects are presented using arrows. There is a special type of message, which is called a create message, which (unsurprisingly) creates a new object, which is depicted as an object with a new lifeline.

Books and tools

One of my ‘go to’ books is UML Distilled (OU Library). I have a 2nd edition copy of the physical book, but more recently I’ve been referring to the 3rd edition which I can access through the OU library.

A tool I’ve started to use is Visual Paradigm (which is also used in M814 Software Engineering, the postgraduate module). Visual Paradigm enables me to draw UML diagrams, including sequence diagrams pretty easily.

Sequence diagrams can depict the creation of new objects, by the creation of a new lifeline. UML Distilled says that a ‘solid’ line is used. Visual Paradigm, on the other hand, insists on using a ‘dashed line’. After an hour of fighting with Visual Paradigm, and uncovering some relevant documentation, it would not relent. 

Which one is correct?

Digging into the standard

After a bit of digging, I discovered that someone else has been asking the same question (Stackoverflow).

One of the replies directed me to the UML 2.51 specification (PDF).

Page 577 contains the following line: ‘An object creation Message (messageSort equals createMessage) has a dashed line with an open arrow head.’

My conclusion? Visual Paradigm implements a more recent version of the UML language than is described in my textbook.

Reflections

Does all this matter? Yes, and no. It depends on how you use UML.

If you use sequence to occasionally figure out what is happening within a nest of objects, drawing informal diagrams for either yourself or other developers that you work with, it won’t matter whether you use dashed or solid lines.

If you apply UML in a more formal way, it might matter.

My own view is that I prefer the solid lines. I’m more familiar with dashed lines showing the return control flow from objects. On the other hand, a different line highlights a ‘special’ function, of which object creation is one of these. 

Permalink Add your comment
Share post
Christopher Douce

Figuring out Visual Paradigm

Visible to anyone in the world

One of the tools (or languages) I learnt as a graduate student was UML; the unified-modelling language. UML is a standard that describes a group of related diagrams. Different diagrams describe different aspects of a software system. UML is used for design, but it can also be used to document requirements, and can help with communication between developers and engineers. If you are able to use UML, you’re able to share ideas about code and software with others more fluently.

One of the tools that I learnt about was a graduate student was Rational Rose, which is now called . At the time I thought it was witchcraft. You could sketch out a diagram using a drawing tool and it would be able to generate some computer code for you.

The postgraduate module M813 Software Development introduces students to a tool called Visual Paradigm which is a tool that I’ve never heard about before. This said, it does bear some similarities with other graphical software design tools that I’ve had the opportunity to have a play with.

The aim of this post is to share some notes and weblink that I’ve collated about Visual Paradigm and other related tools.

Looking at Visual Paradigm

After installing a trial version of Visual Paradigm, I’m taken to a training page: Visual Paradigm Essentials.

From here, I’m taken to an Udemy course, Visual Paradigm essentials where apparently there are 27 hours’ worth of video lectures to attend. The introductory course is intended to help users to “learn all essential skills of software design and modeling including, UML, BPMN and SysML”.

I picked up the following points from the introduction: it can be used to create use cases, business process diagrams, user stories, and a whole host of other diagrams. It also links to agile software development practices, and can play a role in user experience and customer experience design. 

Here is an abbreviated list of diagram types it supports: user experience diagrams (wireframes and sequence visualisation), customer experience maps, software system design diagrams (UML and cloud architecture design diagrams), entity relationship diagrams (database designs) and business design diagram diagrams (such as business process tools and organization chart tools).

It was also mentioned that it could generate and reverse source code from diagrams, and could be used to generate basic code. Database creation scripts could be generated from entity relationship diagrams.

Other tools and environments

In TM354 Software Engineering students use a tool called NetBeans, a Java integrated development environment. 

After a bit of internet searching about NetBeans and UML, I found there was a NetBeans plugin called easyUML. EasyUML makes it possible to convert Java code into class diagrams. 

Whilst digging around, I found a related bit of software called PlantUMLRelated to this project, there is also a NetBeans plugin called PlantUML-NB. The interesting thing about PlantUML is that is can generate UML diagrams from relatively small bits of text which is not too dissimilar to code. The textual basis of this utility reminds me of a tool called UMLet  which I’ve written about previously

It wasn’t too long until I discovered this page: Visual Paradigm IDE integrationThis page suggests it is possible to connect Visual Paradigm and NetBeans together; potentially facilitating that bit of witchcraft that I alluded to earlier. To substantiate this suspicion, I found an accompanying video clip called Perform UML Modeling in NetBeans with Visual Paradigm (YouTube).

Whilst looking at UMLet, I noticed that there was a reference to a Microsoft product called Visual Studio Code. When I was a developer working in industry, I used Microsoft Visual Studio every day. It turns out that Microsoft Visual Studio (Wikipedia)Microsoft Visual Studio (Wikipedia) is different to Microsoft Visual Studio Code (Wikipedia)Microsoft Visual Studio Code (Wikipedia) despite having a very similar name. Clearly things have moved on since I was a full time developer. There are a few things I need to catch up on.

Whilst reminding myself about bits of the Microsoft developer toolset, I found this article, which was all about Visual Studio and Visual Paradigm Integration.

Reflections

Different modules use different bits of software. Across the computing curriculum, computing students will be exposed to Python, Java and JavaScript. This will mean that they will be exposed to different programming environments and toolsets. Getting to grips with different environments and tools is a necessary graduate skill. What I will say is that when it comes to software engineering, graphical tools are likely to be important, along with other tools. The exact make up will, of course, depend on the context of software, and the problems that they are required to solve.

Permalink
Share post

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 2590446