1

I do not know if this the correct forum to ask this question , but I need a huge favour in creating a UML diagram for my existing project, which is developed in C#.

I have a windows service which has a class file Program.cs , Service.cs which has OnStart() and OnStop() methods.
I have a class library , also developed in c#.It has an interface Interface1.cs , 3 class files which implements this interface. The class names are Class1.cs, Class2.cs, Class3.cs All theses classes implement the interface.

This class library reference is added in the windows service, i.e the dll is added.
This is the scenario I have. Now for this I need to create UML diagram with proper flow. Below is the diagram I have created.

The class diagram for Windows Service:

enter image description here

The class diagram for Class library:

enter image description here

I have the UML diagrams , but how do I show the flow and dependencies between these diagrams.Can anyone help me here.

EDIT:
Extra Information which might be useful.
The windows service receives some orders from another service. Based on the order type it has received, it creates a object for either Class1.cs or Class2.cs or Class3.cs .

CrazyCoder
  • 2,194
  • 10
  • 44
  • 91
  • What do you mean by _flow and dependencies_? – qwerty_so Dec 05 '18 at 10:08
  • 1
    UML describes a lot of diagrams, so "Uml diagram" is not very specific. – bommelding Dec 05 '18 at 10:11
  • @ThomasKilian, I mean how to show that Interface is implemented by those 3 classes and how to show that service is invoking class library. – CrazyCoder Dec 05 '18 at 11:00
  • Possible duplicate of [Interface Class relationship in visual paradigm](https://stackoverflow.com/questions/10442819/interface-class-relationship-in-visual-paradigm) – nilsK Dec 05 '18 at 11:58
  • Your tool is unfortunately weird. It lists attributes as "Fields" and operations as "Methods" besides having (undefined) dashed boundaries. Try to draw a Realize relation from the IF lollipops towards the iface. – qwerty_so Dec 05 '18 at 12:39
  • that tool is, I believe, visual studio? – muszeo Dec 06 '18 at 18:29
  • @muszeo yes, it is visual studio 2015 – CrazyCoder Dec 10 '18 at 10:17
  • Unfortunately VS’s class diagrams are not strictly UML compliant class diagrams. They’re Microsoft’s own pseudo version. – muszeo Dec 10 '18 at 18:38
  • @ThomasKilian the terms field and methods are used as synonyms for attributes (data) and operations (behaviour). I also recall the term "member variable" used for attributes, and procedures, functions, subs and procs for operations amongst others. All basically the same, just different languages call them different things. But, in UML....it is attributes and operations. So another way in which Visual Studio does not meet the UML spec. – muszeo Dec 11 '18 at 07:48
  • 1
    @muszeo Well, I've seen that rubbish quite a number of times here. So that was merely a rhetorical question ;-) – qwerty_so Dec 11 '18 at 07:56

1 Answers1

1

To model this with UML I recommend using two diagrams, a Class Diagram (similar to the one you have, though as we discuss in the comments to the O/P this is not UML compliant) and a Sequence Chart (also known as an "Interaction Diagram"). The job of the Class Diagram is to express the logical structure of the classes and the interfaces you have; and the job of the Sequence Chart is to illustrate the flow of interactions between instances of the Classes you have in your class diagram, as they interact to meet specific scenarios and use cases.

I am not aware of a way in Visual Studio to model the latter (Sequence Chart), though as you already know you can make a sort of Class Diagram with it. I recommend instead using a UML modelling tool to do your UML models, for example Sparx Systems EA, Visual Paradigm, Rational Software Architect and so on.

You will find references and examples of both Sequence and Class diagrams in the multitude of tutorial and training materials on the web, and many tools come bundled with some instructions on UML modelling "101" (basic level).

muszeo
  • 2,312
  • 9
  • 13