When part of my solution is to use already built classes (for instance,Java's API classes) to promote reuse's principle, how do i represent these in uml diagrams like class, sequence and activity diagrams? Is it more common to represent them on diagrams or to ommit them?
Of course you have different options. But usually I create component elements representing libs (and APIs). Those components can either hold the classes they implement directly or you can associate them (e.g. via a <<realize>> relation). It's a good idea to attach lollipops and sockets to the component to show the implemented and required interfaces. The latter can also be used in sequence diagrams.
Related
What is a profile diagram in UML? More specifically what is the role of this diagram? And what can we use it for (problems we can solve with it, or solutions we can simplify more with it)?
A profile diagram lets you define an extension to UML by defining your own stereotypes and a couple of other similar elements. The idea is to tailor the expressivity of UML diagrams to a specific domain.
Here you can find some examples, such as:
enriching the class diagram with symbols or stereotypes that correspond to a framework (for example EJB components) or a method (for example the Boundary-Control-Entity design that is used to transform use cases in a systematic manner into a class diagram).
adding stereotypes to allow to represent more precisely nodes of a deployment diagram according to a better network typology.
adding tagged values to enrich diagrams with ownership, authorship, or configuration management information.
I am making a structural diagram in UML using classes and objects and wondered if I was doing it correctly.
Would the following (on the right) be the correct way to represent an object diagram of the left-hand side class diagram?
No. You are using a Generalization which is not the case. Either leave that out or use a stereotyped dependency <<instanceOf>>. Note that this is no standard as per UML specs. But those specs leave you the freedom to express is this way.
The class from which the object is instantiated is already shown in the name objectName::className.
From Annex A p. 683 of the UML 2.5 specs, which describes the organization of diagram types:
NOTE. This taxonomy provides a logical organization for the various major kinds of diagrams. However, it does not preclude mixing different kinds of diagram types, as one might do when one combines structural and behavioral elements (e.g., showing a state machine nested inside an internal structure). Consequently, the boundaries between the various kinds of diagram types are not strictly enforced.
I would like to make a component diagram for a multiple robot coordination system.
I would like to show on the component diagram that the sub-component "Perception" of each "Robot" component communicates through an interface with each other. Indeed, the sensors of all robots are used in order to estimate the position/velocity of each robot, it is a cooperative sensing.
How can I do that ? Should I have an interface which would be both provided and required by the component "Robot" ?
Thanks.
For this type of system you are in position to use full power of UML and make really effective documentation. You will most likely need some (or all) of the following diagrams:
Component diagram - to show the "big picture" and the main parts of your system ant their interfaces and dependencies. Components are "black boxes" here and will be detailed in the following diagram
Composite structure - are perfect to open up the components and show their internal structure. You can take "black boxes" and their interfaces as kind of input to this work. Each component (except the external ones) should be modelled internally. This kind of diagrams lets you use the whole-part paradigm to model internal structure as a network of interconnected elements. Previously detected interfaces will be used here to show how they are actually implemented.
Class diagrams. If you need to further specify the elements of internal structure (their attributes, methods, associations, etc), this is the diagram to draw.
State machines. In embedded real-time systems, lots of classes are active and have states. Identify those classes (or even components) and use state diagrams to show their internal logic.
Sequences and interactions. These diagrams will help you to specify how different elements of your system work together to implement different scenarios.
Deployment diagram. As robot is a piece of hardware and these components run on it (or them, if there are more than one hardware node) you might want to show how the components are distributed over the hardware structure.
You could also have a look on timing diagram, relativelly new one, designed especially for real-time systems. It might come on handy if you need to express time restrictions, durations, etc.
If you are new to UML, I would recommend to start with components and deployment. They are relativelly easy to learn. As you feel understanding and need to express your ideas further, dive in the composite structure and states. And finally classes.
Have fun!
EXAMPLE
This is how I understand your model and its elements. This extends my comments.
Explanations are in comments and in the diagram notes.
A component diagram:
A component instances' diagram:
Note that the first diagram should be extended with the "connectivity rules" that define all valid connectivity possibilities. Is there only one CentralManager? Must each Robot be connected to CentralManager? Can a Robot talk to itself? And so on...
These and other questions should be modelled separatelly. On class diagrams benavior diagams, according to concrete details.
Can anyone tell which UML diagram I should change if there is a slight change in the design of application.
The change is -> Earlier the application was using Active directory for authentication now I want to use the Membership provider instead.
I want to keep the change minimum in diagrams.
Thanks
Sounds like component diagrams or class diagrams. Check out the following topics and illustrations for VS 2010 Ultimate RC:
UML Component Diagrams: Reference at http://msdn.microsoft.com/en-us/library/dd409390%28VS.100%29.aspx:
A component diagram shows the parts of a design for a software system. A component diagram helps you
visualize the high-level structure of the system and the service behavior that those pieces provide
and consume through interfaces.
UML Class Diagrams: Reference at http://msdn.microsoft.com/en-us/library/dd409437%28VS.100%29.aspx
A UML class diagram describes the object and information structures used by your application, both
internally and in communication with its users. It describes the information without reference to any
particular implementation.
It will surely depend the diagrams at your disposal. Sound like a correction in one of the static diagram types, like the component diagram ...
This of course depends on how you structure your documents and your uml-diagrams.
In general I have a Conceptual model, Class Diagram and a Design Diagram which are diractly linked to the architecture. And then you should in most cases have System Sequence Diagrams and more. However, depending on how your structure is and to minimize the "changes" required.
I would suggest that you use something more generic for the parts that might be changed. Active Directory Authentication and Membership Provider Authentication is both Authentication methods, which means that you can, instead of displaying the whole sequence at the Authentication step, just use "Authentication".
Now, in the conceptual models and in the design + class diagrams, you will need to change and add some fields, tables or whatever is added. But it shouldn't matter if you need to add more or less, because the documents need to reflect upon your software as accurate as possible.
So, to minimize changes, use more generic types.
What's the best way to represent a networked connection in a UML class diagram?
UML class diagrams are not appropriate to describe a topological notion as a "network"; they are better suited for hierarchies and interdependencies between objects. Or are you talking about a Connection class?
The Class Diagram is the wrong place to be trying to show network connections. A Class diagram will show only the classes in your software and how they relate to each other. You should use a Deployment Diagram to show how the elements of your software are going deployed across the network.
You could also include a Communication Diagram to show how the different parts of the software communicate with each other without regard to the deployment model.
Graph or a network is a structure in which any element (Class or object here in UM) may be connected to any other element. The "connection" can be any association other than "is a" in UML. As such, it is possible to represent the structure of graph or network using a set of classes and associations.
For example, consider a class of Places, an association "is connected by" and a class of Roads. With this any complex netwrok of Places and Roads can be represented by associating an instance of Place with another instance of Place and an instance of Road. RDF Tripples thus represent a semantic network.
Is there any other (special or specific) convention of representing a graph or network in OOAD / UML?
You should use a Deployment Diagram to show how the elements of your software are going deployed across the network.
Deployment diagrams are used to visualize the topology of the physical components of a system where the software components are deployed.
Deployment diagram: describes the hardware used in system implementations and the execution environments and artifacts deployed on the hardware.
http://search.aol.com/aol/image?s_it=topsearchbox.imageDetails&v_t=client_searchbox&imgsz=&imgtype=&imgc=&q=deployment+diagrama+uml
And You use the tool Rational Rose for get that.
All is for documentation, when something is changing in the network, and every know that you used Rational Rose and Deployment Diagram.
Structure diagrams emphasize the things that must be present in the system being modeled, and every Diagram has a function.
As mentioned above already UML is serving other purposes than representing physical infrastructure of a network or components.
Some examples of network diagrams can be found on creatley -> https://creately.com/diagram/example/hfgz8ekz/Network%20Architecture%20Diagram
I personally like to use https://www.draw.io/ to generate diagrams - it's web-based, very intuitive and has many features and a large library of image-sets.