Difference between revisions of "UML"

From BITPlan Wiki
Jump to navigation Jump to search
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Tools =
 
= Tools =
 
* [https://www.wikidata.org/wiki/Q2467310 Wikidata UML Tool Entity]
 
* [https://www.wikidata.org/wiki/Q2467310 Wikidata UML Tool Entity]
* [https://query.wikidata.org/#SELECT%20%3FUML_Werkzeug%20%3FUML_WerkzeugLabel%20%3FProgrammierspracheLabel%20%3FStack_Exchange_Kennzeichnung%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%3FUML_Werkzeug%20wdt%3AP31%20wd%3AQ2467310.%0A%20%20OPTIONAL%20%7B%20%3FUML_Werkzeug%20wdt%3AP277%20%3FProgrammiersprache.%20%7D%0A%20%20OPTIONAL%20%7B%20%3FUML_Werkzeug%20wdt%3AP1482%20%3FStack_Exchange_Kennzeichnung.%20%7D%0A%7D%0ALIMIT%20100 WikiData Query - List of UML Tools]
+
* [https://de.wikipedia.org/wiki/Kategorie:UML-Werkzeug DE Wikipedia UML Tool Category]
 +
* [https://query.wikidata.org/#SELECT%20%3FUML_Werkzeug%20%3FUML_WerkzeugLabel%20%3FProgrammierspracheLabel%20%3FStack_Exchange_Kennzeichnung%20%3FSourceRepository%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%3FUML_Werkzeug%20wdt%3AP31%20wd%3AQ2467310.%0A%20%20OPTIONAL%20%7B%20%3FUML_Werkzeug%20wdt%3AP277%20%3FProgrammiersprache.%20%7D%0A%20%20OPTIONAL%20%7B%20%3FUML_Werkzeug%20wdt%3AP1482%20%3FStack_Exchange_Kennzeichnung.%20%7D%0A%20%20OPTIONAL%20%7B%20%3FUML_Werkzeug%20wdt%3AP1324%20%3FSourceRepository.%20%7D%0A%7D%0AORDER%20BY%20%3FUML_WerkzeugLabel%0ALIMIT%20100%0A Wikidata Query to List UML Tools]
  
 +
== Stackoverflow Tags ==
 +
# [https://stackoverflow.com/questions/tagged/uml uml]
 +
# [https://stackoverflow.com/questions/tagged/argouml argouml]
 
# [https://stackoverflow.com/questions/tagged/magic-draw magicdraw]
 
# [https://stackoverflow.com/questions/tagged/magic-draw magicdraw]
 
# [https://stackoverflow.com/questions/tagged/enterprise-architect enterprise architect]
 
# [https://stackoverflow.com/questions/tagged/enterprise-architect enterprise architect]
 +
# [https://stackoverflow.com/questions/tagged/objectaid objectaid]
 +
# [https://stackoverflow.com/questions/tagged/plantuml plantuml]
 +
# [https://stackoverflow.com/questions/tagged/rational-rose rational rose]
 
# [https://stackoverflow.com/questions/tagged/umbrello umbrello]
 
# [https://stackoverflow.com/questions/tagged/umbrello umbrello]
# [https://stackoverflow.com/questions/tagged/umlet]
+
# [https://stackoverflow.com/questions/tagged/umlet umlet]
 
# [https://stackoverflow.com/questions/tagged/visual-paradigm visual paradigm]
 
# [https://stackoverflow.com/questions/tagged/visual-paradigm visual paradigm]
 
# [https://stackoverflow.com/questions/tagged/staruml staruml]
 
# [https://stackoverflow.com/questions/tagged/staruml staruml]
 +
 
== Tool-Evaluations ==
 
== Tool-Evaluations ==
 
* https://www.herzbube.ch/article/evaluation-free-uml-tools
 
* https://www.herzbube.ch/article/evaluation-free-uml-tools
 
* https://www.predictiveanalyticstoday.com/open-source-free-unified-modeling-language-uml-tools/
 
* https://www.predictiveanalyticstoday.com/open-source-free-unified-modeling-language-uml-tools/
 +
== Historic Tools ==
 +
* [https://web.archive.org/web/20060203054943/http://www.microgold.com/ MicroGOLD withClass]
 +
 +
== Stackoverflow Questions ==
 +
=== Inheritance ===
 +
* [https://stackoverflow.com/questions/53782241/class-diagram-uml Class diagram UML]
 +
When implementing inheritance there is usually some cost involved in terms of extra classes, tables, documentation and other results that need to be created after the decision to use inheritance.
 +
 +
Inheritance is about special and general cases. First you might want to ask what is the difference between the cases - (called a {{Link|target=Discriminator}}). In your case it is the type of reservation and you could avoid the inheritance by modelling this type of reservation and implementing the different behavior based on the reservation type. That would lead to a design like:
 +
 +
==== Avoiding inheritance ====
 +
<uml>
 +
hide circle
 +
class Reservation {
 +
reservationtype:enum{normal,regular}
 +
date: Date
 +
duration: int
 +
price: int
 +
delete(): boolean
 +
start:date
 +
end:date
 +
frequency:int
 +
new(date,optional date,optional int)
 +
}
 +
class Client {
 +
name
 +
}
 +
Reservation -> Client
 +
Reservation "n" <- "1" Reservation
 +
</uml>
 +
If the inheritance has a high benefit because there are a lot of extra attributes, relation or operations for each special case then you can apply it.
 +
 +
In this case there is
 +
 +
* an extra 1:n relation between regular reservation and reservation (which was not visible in your design but implied by the attribute regular Reservation)
 +
 +
and there are some extra fields
 +
 +
*  start date
 +
*  end date
 +
*  frequency
 +
 +
What is missing at this time is common behavior that would make it sensible to apply inheritance. In the image below I added the generalization nevertheless. It would not be needed at this point in time but as soon as there are general operations you would like to apply to any type of reservation:
 +
 +
==== Applying inheritance ====
 +
<uml>
 +
hide circle
 +
class Reservation {
 +
date: Date
 +
duration: int
 +
price: int
 +
delete(): boolean
 +
new(date,Client,int,int,RegularReservation)
 +
}
 +
class Regular_Reservation {
 +
start:date
 +
end:date
 +
frequency:int
 +
new(date,date,int)
 +
}
 +
Reservation -> Client
 +
Reservation <|-- Regular_Reservation
 +
Reservation "n" <- "1" Regular_Reservation
 +
</uml>
  
 
= Learning UML =
 
= Learning UML =
 
{{Link|target=UML-Day}}
 
{{Link|target=UML-Day}}
 +
[[Category:UML]]

Latest revision as of 11:45, 16 February 2023

Tools

Stackoverflow Tags

  1. uml
  2. argouml
  3. magicdraw
  4. enterprise architect
  5. objectaid
  6. plantuml
  7. rational rose
  8. umbrello
  9. umlet
  10. visual paradigm
  11. staruml

Tool-Evaluations

Historic Tools

Stackoverflow Questions

Inheritance

When implementing inheritance there is usually some cost involved in terms of extra classes, tables, documentation and other results that need to be created after the decision to use inheritance.

Inheritance is about special and general cases. First you might want to ask what is the difference between the cases - (called a Discriminator). In your case it is the type of reservation and you could avoid the inheritance by modelling this type of reservation and implementing the different behavior based on the reservation type. That would lead to a design like:

Avoiding inheritance

If the inheritance has a high benefit because there are a lot of extra attributes, relation or operations for each special case then you can apply it.

In this case there is

  • an extra 1:n relation between regular reservation and reservation (which was not visible in your design but implied by the attribute regular Reservation)

and there are some extra fields

  • start date
  • end date
  • frequency

What is missing at this time is common behavior that would make it sensible to apply inheritance. In the image below I added the generalization nevertheless. It would not be needed at this point in time but as soon as there are general operations you would like to apply to any type of reservation:

Applying inheritance

Learning UML

UML-Day