-
Notifications
You must be signed in to change notification settings - Fork 0
/
mvc.uml
63 lines (43 loc) · 1.52 KB
/
mvc.uml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@startuml
' title Patrones MVC
'-----------------------------------------------------------------------
' Colors and fonts
' skinparam defaultFontName "DejaVu Sans Mono"
hide members
'-----------------------------------------------------------------------
package "MVC (1970s)" {
class "Model" as mvc_m
class "View" as mvc_v
class "Controller" as mvc_c
mvc_c ..> mvc_v: update\nui
mvc_c <.. mvc_v: notify\nuser\nactions
mvc_m <. mvc_v: consult the model
mvc_c ..> mvc_m: update\nmodel
mvc_c <.. mvc_m: notify\nchanges
}
package "MVP" {
class "Model" as mvp_m
class "View" as mvp_v
class "Presenter" as mvp_p
mvp_p ..> mvp_v: update\nui
mvp_p <.. mvp_v: notify\nuser\nactions
mvp_m -[hidden] mvp_v: there is no association
mvp_p ..> mvp_m: update\nmodel
mvp_p <.. mvp_m: notify\nchanges
}
package "MVVM" {
class "Model" as mvvm_m
class "View" as mvvm_v
class "ViewModel" as mvvm_vm
mvvm_vm .. mvvm_v: databinding\ntechnology\n
mvvm_m -[hidden] mvvm_v: there is no association
mvvm_vm ..> mvvm_m: update\nmodel
mvvm_vm <.. mvvm_m: notify\nchanges
}
'-----------------------------------------------------------------------
legend right
**Notes:**
- In all cases "the Model" is a **set of classes** responsible of the business logic
- **Arrows** talk about **navigation**, not necessarily about information flow
end legend
@enduml