90 likes | 240 Views
UML Basics by Ronald Koster (http://www.ronaldkoster.net). UML Basics. MyClassName. Any rectangle is a class. Special classes. <<actor>>. <<component>>. =def. =def. <<boundary>>. <<package>>. =def. =def. <<control>>. <<subsystem>>. =def. =def. <<subsystem>>. <<entity>>.
E N D
UML Basics by Ronald Koster (http://www.ronaldkoster.net)
UML Basics MyClassName Any rectangle is a class Special classes <<actor>> <<component>> =def =def <<boundary>> <<package>> =def =def <<control>> <<subsystem>> =def =def <<subsystem>> <<entity>> <<subsystem>> <<database>> =def =def <<interface>> =def
UML Basics Associations B A Association: A and B have some sort of relation. A B Directed Association: A can find B (A has a B). <<depends-on>> B =def A Dependence: A depends on B. NB.: <<extends>> B =def A Extension: A extends B (A is a B). NB.: B A Realization: A realizes (=implements) B (A is a B). NB.: <<realizes>> =def B A Aggregation: A is an aggregation of Bs, ie. A supersetOf {B} *. NB.: <<is-an-aggregation-of>> =def B A Composition: A is a composition of Bs, ie. A = {B} *. NB.: <<is-a-composition-of>> =def *: {B} =def {X | X instanceOf B} =def setOf(B)
UML Basics Isomorfisms 1/2 Lollypop style <<interface>> A A <==>def B B A B A B <==>def
UML Basics Isomorfisms 2/2 MySystem MySystem A <==>def B A B C C Use Case Diagram style Catalysis style (superior) MySystem UC xxx UC xxx MySystem <==>def UC yyy UC yyy User User
UML Basics Duck on Skies: any (sub)system is an aggregation of Analysis Classes. User MySystem
UML Basics <<subsystem>> OtherSystem1 Duck on Skies and software layers. User <<subsystem>> MySystem <<layer>> Presentation <<layer>> Service <<model>> Domain <<layer>> Access <<subsystem>> OtherSystem2 <<subsystem>> Database
UML Basics • Definitions • Object =def Instance of a class. : MyClass Named instance of class MyClass someName: MyClass Anonymous instance of class MyClass • Conventions • Class name: noun, starts with a capital letter. • Method name: verb, starts with a lower case letter. • Instance name: noun, starts with a lower case letter. • Variable name: = Instance name.
UML Basics • Further readings • Superb Modelling Method from Catalysis: • http://www.catalysis.org/books/ocf/ch01.pdf • (see also http://www.catalysis.org/books/ocf/index.htm) • UML Reference Guides: • http://sparxsystems.com.au/resources/uml2_tutorial • http://www.holub.com/goodies/uml