controller+state+observer
2016-06-18 12:36:20 0 举报
Controller+State+Observer是一种设计模式,用于实现MVC(Model-View-Controller)架构。其中,Controller负责处理用户输入和更新模型;State表示模型的状态;Observer则用于监听模型的变化并更新视图。这种模式将应用程序分成三个部分,使得它们之间的耦合度降低,提高了代码的可维护性和可扩展性。在实际应用中,Controller+State+Observer模式被广泛应用于各种软件开发项目中,如桌面应用程序、Web应用程序和移动应用程序等。
作者其他创作
大纲/内容
state
- classified()- unclassified()- deleted()
GUI
+ static getInstance()- GUI()
- GUI instance
SavaToDB
excute()saveDB()
AbstractRequrements
BP Factory
creatVN():VN-Phrase
Observable
+getState()+add(o:Observer)+notify()+remove()
Modle
delegate
action Factory
actionList
iterator():Iteratorupdata()
Requirements
BPList
open
Iterator
iirst()nex()isDone()currentItem():VNPhrase
Collection
iterator():Iterator
VN Factory
BPListIterator
get state
return new() Business process
requirementSpecifiction
- requirementSpecifiction Instance
static getInstance():requirementSpecifictionprivate requirementSpecifiction()saveXML()saveTxT()saveDB()
control
User
SavaAsTexture
excute()saveTxT()
return new() step
unExisted
- unclassified()- deleted()
stepList
Observer
+ updata()
SaveCommand
excute():Object
classified
- classified()
step Factory
SaveAsXML
excute()saveXML()
Classify Controller
- classify()- highLight()
Existed
- unclassified()
return new() action
0 条评论
下一页