UMLet Diagrams like Use Case, Class, Activity, etc

自古美人都是妖i 提交于 2019-12-03 03:58:44

问题


Can you please help me find a detailed tutorial on this topics:

  1. UML
  2. Behavior Diagrams
    1. Use Case Diagrams
    2. Activity Diagrams
  3. Structure Diagrams
    1. Class Diagram
  4. Interaction Diagrams
    1. Sequence Diagram
    2. Communication Diagram

I'm really a newbie and I want know what are the ideas in using UML diagrams, there differences, and the tools (like UMLet) that are ideal for novices like me.


回答1:


First and for most let me discuss UML and Use Cases.

UML is just a graphical way of describing software systems. There are two types of UML namely:

  1. UML Sketching - here you only want to communicate an idea and go through different alternative approaches. It's not specific but it only gives the basic ideas.
  2. UML Blueprint - This is a very detailed type of modeling in which everything is well laid out and there is a definite time of completion.

Next up is the UML Development Process.

  1. Waterfall Model - The development process must follow the Analysis, Design, Coding, and Testing Process strictly. Meaning you can't do the coding without the design, and so on. You must start with the Analysis, Design, Coding and Testing (ADCT) Process. Overlapping within this processes is not allowed.
  2. Iterative (Most Common) - The iterative way is kinda different from the waterfall model in a sense that it is more flexible. You can divide the system into pieces and run the ADCT Process on each piece. Meaning you will not do Analysis just once, which will make your system flexible to changes. No wonder this is a more common type of approach.

Then there's the UML Planning Process

  1. Predictive Planning - outcome is known for the whole duration of the project and everything should run smoothly with all the stakeholders involve, 'on the same page'. If you can easily list all requirements and you are pretty sure that it will not change, Use predictive Planning.

  2. Adaptive Planning (Agile Development) - here the developer continually works with the user for possible changes. They act as 'adaptor' -- to changes. It's flexibility makes it a better option from the predictive planning.

Finally Use Case Diagrams. Use Case Diagrams define how your program will solve problems or provide some functionality.

Here's an example:

Use Case Diagrams usually deals with the interaction of Actors which could be a Human, or an External system. The Use cases are represented by the Elipses like "Insert Card".

The line from the actor towards the Use Cases are called communication lines.

The 'include' part means that two or more use case will try to access a single use case. whereas the 'extend' part is when a use case will try to access an optional use case.

The 'Select Amount' Use case is a general use case while under it are two specific use cases.

After this is the Use Case Description. Basically just a description of your use case. like " The user enters their card and inputs the pin. The system security will then check if the card is active or not stolen and/or if the inputted Pin is correct", etc. It will be wrapped up by saying that the system (security) will provide the funds and the receipt.

Another thing to note is the

  1. Triggers (Machine receives the card/User enters Pin)

  2. Actors

  3. Preconditions (e.g., bank has sufficient funds)
  4. Goals (e.g., Successful conclusions like being able to provide the user funds).
  5. List failed conclusion (ex: invalid card)
  6. Extensions (ex: If pin is invalid after three 3 tries)
  7. Steps of Execution (ex: From customer Inserts card up to the ejection of the card)

Activity Diagrams

Activity Diagrams basically just describes what actions occurred to achieve an ultimate goal. If you are familiar with flow charts, then it will be easier to understand the concepts behind Activity Diagrams.

Initial Nodes is the starting point of the Activity Diagram which is symbolize by a shaded circle.The purple colored notes simply describes the different components of an activity diagram.

Class Diagrams

Classes describes types of objects your program will use while Class Diagrams describe those classes and how they relate.

I will just upload some slide shows to make the tutorial faster:

Sequence Diagrams

Sequence diagrams model interactions in your program and provide you with a logical way to layout your system. They are about showing the order of interactions between the parts of your program.

In making sequence diagrams, you describe which interactions are triggered and when. They focus in on the order of events in all interactions.

Again, here are the sequence diagrams of the tutorial:

Communication Diagrams

Communication diagrams are used to show links between participants. They focus in on which interactions are triggered and when. They also describe the order of events in all interactions.

These ideas is from the video tutorials of Derek Banas

Here is a list of UML Tools. Some are free. :)




回答2:


First You Should Understand What is UML and What is NOT

So start with reading Craig Larman's article What UML Is and Isn't

Then to Get an Idea How UML Can be Used "Wrong" Or How UML Should Not to be Used

Read the article Death by UML Fever by ALEX E. BELL. Pay attention to the industry experts(PHILIPPE KRUCHTEN,GRADY BOOCH) comments on that article.

Do not try to learn every detail of UML Notation

%20 of UML is enough for your %80 needs. Try not to use "less known" features. You should not have to use all UML Diagrams. Use the one that you get benefit.

Best Modeling Tool

The Best Modeling tools are is free drawing places-surfaces like white boards, flip charts even papers. Not CASE tools. Find a wall, and turn it to free drawing area with tools like Whiteboard-like Cling Sheets

Try Agile Modeling

Check side to get an Idea about Agile Modeling

Find A Good UML Book

To learn UML notation in short and brief way:

UML Distilled: A Brief Guide to the Standard Object Modeling Language (3rd Edition) by Martin Fowler

To Apply UML with a Process(RUP) in an Agile Way

Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition) by Craig Larman (Author)

For Short and Nice Guide with Guidelines

The Elements of UML(TM) 2.0 Style Scott W. Ambler (Author)

If You Not Like Books or Not Want to Spend Money

For Class Diagrams:

Check UML basics: The class diagram

For Sequence Diagrams

Check UML basics: The sequence diagram

For Activity Diagrams

Check UML basics: The activity diagram

Check UML 2 Activity Diagrams

For Use Case Diagrams

Check UML 2 Use Case Diagrams

Be carefull. Use cases are text stories which tell the interaction between user(actor) and system to achive a goal. So use case diagrams without use case texts are worthless. To gain more understanding about use cases read the following free chapters from books:

  • Larman-Chapter 6 Applying evolutionary use cases [ Free Download]
  • Use case2.0 ebook Author: Ivar Jacobson, Ian Spence, Kurt Bittner. [Free Download]

For Sate Machine Diagrams

Check Sparx EA UML 2 State Machine Diagram

For the Component Diagrams

Check UML basics: The component diagram

For Deployment Diagrams Check Sparx EA UML 2 Deployment Diagram

PS: There are other diagrams but those are most widely used ones.

AND Google it ... For example I google it and see the http://www.uml-diagrams.org/uml-25-diagrams.html side. It seems a good side for details.




回答3:


This is how I learned a few of the terms when I was starting out. (I am still learning as well so if I am wrong please feel free to edit)

UML is just a way to describe how a system works using flowcharts. They have certain symbols to represent the different meanings.

Use case diagrams are just saying how something (They call it an actor) interacts with the system! Activity diagram is kind of what it sounds like, the different activities that take place for a certain action to happen!

Here is an example: Activity Diagram for Banking System (UML) There is still some I haven't answered, but the answers from the others are pretty good.



来源:https://stackoverflow.com/questions/16546961/umlet-diagrams-like-use-case-class-activity-etc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!