{"id":85,"date":"2014-02-03T16:56:42","date_gmt":"2014-02-03T23:56:42","guid":{"rendered":"https:\/\/blogs.ubc.ca\/coetoolbox\/?page_id=85"},"modified":"2014-12-09T13:19:43","modified_gmt":"2014-12-09T20:19:43","slug":"uml","status":"publish","type":"page","link":"https:\/\/blogs.ubc.ca\/coetoolbox\/vba\/appdesign\/uml\/","title":{"rendered":"UML Overview"},"content":{"rendered":"<p>UML (Unified Modeling Language) is the most common notation used for software design. It is a standard way to visualize a system&#8217;s elements such as actors, activities, and system components. Therefore, it is very useful to communicate your application design to programmers, project manager, users and stakeholders.<\/p>\n<p>UML diagrams can be grouped in two big categories according to system view they provide:<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\">Static view<\/span>: show the system structure, its components and relationships. Examples: component diagram, class diagrams, entity-relationship diagrams<a href=\"http:\/\/www.ibm.com\/developerworks\/rational\/library\/content\/03July\/2500\/2785\/2785_uml.pdf\" target=\"_blank\">*<\/a>.<\/li>\n<li><span style=\"color: #0000ff;\">Dynamic view:<\/span> shows how the system works and the processes performed. Examples: use cases, activity diagrams and sequence diagrams.<\/li>\n<\/ul>\n<h2>Use cases<\/h2>\n<p>This diagram is used at the beginning of the development process to define the application requirements and scope. It shows the system functions and their links to actors. It responds the question &#8216;what does the system do?&#8217; (without addressing how it does it).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-181 aligncenter\" src=\"https:\/\/blogs.ubc.ca\/coetoolbox\/files\/2014\/02\/usecase.jpg\" alt=\"\" width=\"337\" height=\"256\" srcset=\"https:\/\/blogs.ubc.ca\/coetoolbox\/files\/2014\/02\/usecase.jpg 337w, https:\/\/blogs.ubc.ca\/coetoolbox\/files\/2014\/02\/usecase-300x227.jpg 300w\" sizes=\"auto, (max-width: 337px) 100vw, 337px\" \/><\/p>\n<p>A use case diagram has the following components:<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\">Actor<\/span>: a role within the business environment<\/li>\n<li><span style=\"color: #0000ff;\">Use case<\/span>: an operation performed in the system to produce a meaningful result for a user<\/li>\n<li><span style=\"color: #0000ff;\">Relationship<\/span>: an association between an actor and a use case<\/li>\n<li><span style=\"color: #0000ff;\">System<\/span>: the application boundary<\/li>\n<\/ul>\n<h2>Activity Diagrams<\/h2>\n<p>Shows the order in which actions are performed in a business activity either human or computer actors. An activity is more general concept than an action, it is a behavior that can be reused in many places, whilst actions are used only at determined points within an activity.<\/p>\n<p><a href=\"http:\/\/www.sparxsystems.com\/resources\/uml2_tutorial\/uml2_activitydiagram.html\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/www.sparxsystems.com\/images\/screenshots\/uml2_tutorial\/ad03.GIF\" alt=\"\" width=\"721\" height=\"318\" \/><\/a><\/p>\n<p>An activity diagram has the following components:<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\">Actions<\/span>: a single step within an activity such as an arithmetic computation, a call to an operation or manipulation of object contents. Actions can have attached constraints.<\/li>\n<li><span style=\"color: #0000ff;\">Control flow<\/span>: the sequence of action execution, represented by arrows between actions.<\/li>\n<li><span style=\"color: #0000ff;\">Start and final nodes<\/span>: show the start and end of control flow.<\/li>\n<\/ul>\n<p>It may also have the following type of nodes:<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\">Decision and merge<\/span>: checks conditions that allow the flow to continue.<\/li>\n<li><span style=\"color: #0000ff;\">Fork and join<\/span>: indicate the start \/ end of concurrent threads of control. the join synchronizes two inflows and produces a single outflow. The outflow from a join cannot execute until all inflows have been received.<\/li>\n<\/ul>\n<p>Activity diagrams can also have <span style=\"color: #0000ff;\">partitions<\/span> or swim lanes that separate actions based on the actors that perform them.<\/p>\n<h2>Component Diagrams<\/h2>\n<p>A component diagram shows the parts of a design for a software system. It is useful to understand how the significant elements of a software system fit together, especially in the early stages of development.<\/p>\n<p><a href=\"http:\/\/www.sparxsystems.com\/resources\/uml2_tutorial\/uml2_componentdiagram.html\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.sparxsystems.com\/images\/screenshots\/uml2_tutorial\/CD04.GIF\" alt=\"\" width=\"377\" height=\"110\" \/><\/a><\/p>\n<p>Component diagrams have the following components:<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\">Components<\/span>: autonomous, encapsulated units, usually a piece of software or group of classes. Their dependencies are designed such that they can be treated as independently as possible.<\/li>\n<li><span style=\"color: #0000ff;\">Connectors<\/span>: \u2018wire\u2019 components together based on interface compatibility.<\/li>\n<\/ul>\n<p>Component diagrams have more elements, but these two provide a good starting point for your application design. Its utility isn&#8217;t in understanding low-level implementation details, but in performing an initial level of decomposition. On the <a title=\"Decision Support Systems\" href=\"https:\/\/blogs.ubc.ca\/coetoolbox\/appdesign\/dss\/\">Decision Support Systems<\/a> section you can see the typical components of an OR application. Some of the benefits of using component diagrams are:<\/p>\n<ul>\n<li>Helps the development team to understand an existing design and create a new one.<\/li>\n<li>Helps improve the separation between the components, making the design easier to change when requirements change.<\/li>\n<li>Its independent of the language or platform the application uses.<\/li>\n<\/ul>\n<h2>Sequence diagrams<\/h2>\n<p>Sequence diagrams show how different components interact during the functioning of a system. Use them for the most frequent or important functions to\u00a0 explain the existing components and the messages that trigger their interactions.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-196 aligncenter\" src=\"https:\/\/blogs.ubc.ca\/coetoolbox\/files\/2014\/02\/sequence-diagram-example1.jpg\" alt=\"\" width=\"473\" height=\"364\" srcset=\"https:\/\/blogs.ubc.ca\/coetoolbox\/files\/2014\/02\/sequence-diagram-example1.jpg 473w, https:\/\/blogs.ubc.ca\/coetoolbox\/files\/2014\/02\/sequence-diagram-example1-300x230.jpg 300w\" sizes=\"auto, (max-width: 473px) 100vw, 473px\" \/><\/p>\n<p>A sequence diagram has the following components:<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\">Lifelines<\/span>: dashed lines that represent the lifeline of a component or actor.<\/li>\n<li><span style=\"color: #0000ff;\">Interactions<\/span>: messages between components represented by arrows.<\/li>\n<li><span style=\"color: #0000ff;\">Activations<\/span>: execution occurrences represented by narrow rectangles<\/li>\n<\/ul>\n<p>A good programming practice is to separate interactions between the interface and the other application components (model, database). This is done by creating an <span style=\"color: #0000ff;\">entity controller<\/span>, an independent component that controls the connections between the interface and other components. In an OR application you can have a controller for the model and another for the database. The main advantage of having controllers is that, if there are changes in the business requirements, they help to localize modifications without disrupting the tool design. (See <a href=\"http:\/\/www.drdobbs.com\/successful-robustness-analysis\/184414712\" target=\"_blank\">robustness analysis<\/a> for more details.)<\/p>\n<h2>State Charts<\/h2>\n<p>A statechart shows the life of an object in terms of the <span style=\"color: #0000ff;\">states<\/span> the object can take and the <span style=\"color: #0000ff;\">events<\/span> that modify them. They are useful when objects have a small number of important states or events with important conditions.<\/p>\n<p><a href=\"http:\/\/www.sparxsystems.com\/resources\/uml2_tutorial\/uml2_statediagram.html\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.sparxsystems.com\/images\/screenshots\/uml2_tutorial\/sm01.GIF\" alt=\"\" width=\"517\" height=\"243\" \/><\/a><\/p>\n<p>A state diagram has the following components:<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\">State<\/span>: a set of attribute values that describe an object condition at a specific moment in time. Initial and final states show the start and end the flow of states.<\/li>\n<li><span style=\"color: #0000ff;\">Transition<\/span>: a change of state caused by an event. Some events my not change the state, causing a self transition.<\/li>\n<\/ul>\n<p>References<\/p>\n<ol>\n<li>http:\/\/www.sparxsystems.com\/resources\/uml2_tutorial\/<\/li>\n<li>http:\/\/warren.chinalle.com\/2008\/01\/10\/uml-2-diagrams\/<\/li>\n<li>http:\/\/www.sparxsystems.com\/resources\/uml2_tutorial\/uml2_sequencediagram.html<\/li>\n<li>http:\/\/www.agilemodeling.com\/artifacts\/robustnessDiagram.htm<\/li>\n<li>http:\/\/www.tracemodeler.com\/articles\/a_quick_introduction_to_uml_sequence_diagrams\/<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>UML (Unified Modeling Language) is the most common notation used for software design. It is a standard way to visualize a system&#8217;s elements such as actors, activities, and system components. Therefore, it is very useful to communicate your application design to programmers, project manager, users and stakeholders. UML diagrams can be grouped in two big [&hellip;]<\/p>\n","protected":false},"author":22982,"featured_media":0,"parent":78,"menu_order":2,"comment_status":"open","ping_status":"closed","template":"page-templates\/full-width.php","meta":{"footnotes":""},"class_list":["post-85","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/pages\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/users\/22982"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":16,"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/pages\/85\/revisions"}],"predecessor-version":[{"id":311,"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/pages\/85\/revisions\/311"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/pages\/78"}],"wp:attachment":[{"href":"https:\/\/blogs.ubc.ca\/coetoolbox\/wp-json\/wp\/v2\/media?parent=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}