Please enable JavaScript.
Coggle requires JavaScript to display documents.
DESIGN_PATTERN BASIC_2 - Coggle Diagram
DESIGN_PATTERN
BASIC_2
TEMPLATE-METHOD
Logging
Tasks
Banking
Structure
Task
AbstractClass
execute
TemplateMethod
doExecute
PrimitiveOperation
Hook
TransferMoney
ConcreteClass
doExecute
Relationship
Inheritance
TransferMoney
Task
Using
Create
TransferMoney
task.Execute()
COMMAND
Separating
Button
In-Framework
Action
By-User
Structure
Button
Invoker
Command
Interface
execute()
AddCustomer
ConcreteCommand
execute()
CustomerService
Receiver
Relationship
Compose
Button
Command
Inheritance
AddCustomer
Command
Depend
CustomerService
Command
Using
Service
CustomerService()
Command
AddCustomerCommand(service)
Button
Button(Command)
Composite
CompositeCommand
Inherit
Command
Field
CommandList
Methods
Add(Command)
Execute()
All
OBSERVER
Spreadsheet
Change
Chart
Value
Change
Structure
Subject
ObserversList
AddObserver
RemoveObserver
NotifyObservers
DataSource
ConcreteSubject
Value
Get
Set
NotifyObs
Observer
Interface
update()
Spreadsheet
ConcreteObserver
update()
Relationship
Compose
Subject
Observer
Spreadsheet
DataSource
Inheritance
DataSource
Subject
Spreadsheet
Observer
Communication
Push
Observer.update(value)
Spreadsheet
Independent
DataSource
Pull
Spreadsheet(dataSource)
dataSource.getValue()
UNDOABLE
Command
Structure
UndoableCommand
Inherits
Command
Method
Unexecute()
Interface
History
Field
List-UndoableCommand
Methods
Push, pop, size
UndoCommand
Field
History
Execute()
History.pop().unexecute()
BoldCommand
Inherits
UndoableCommand
Fields
PrevContent
Document
History
Methods
Execute()
PrevContent = Doc.content
Doc.action()
History.push
Unexecute()
Doc.setContent(prevContent)
Vs-Memento
Memento
Snapshots-store
Here
Changes-store
Using
BoldCommand(...).exec
Doc.setContent
UndoCommand(...).exec
Create
History
Document