freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

第11講架構(gòu)與其他模式-預(yù)覽頁(yè)

 

【正文】 hai Jiaotong University 2020/11/4 27 Application Domain Presentation Sales Register Sale Swing ProcessSale Frame Application session facade objects that maintain session state and control workflow related to some workoften by use case. ProcessSale SessionFacade ProcessRental SessionFacade HandleReturns SessionFacade ProcessRental Frame ... Rentals Rental ... Shanghai Jiaotong University 系統(tǒng)操作和層 2020/11/4 28 Domain Presentation Swing ProcessSale Frame ... ... Register makeNewSale() enterItem() ... : Cashier makeNewSale() enterItem() endSale() makeNewSale() enterItem() endSale() enterItem(id, quantity) :System : Cashier endSale() description, total * [more items] makeNewSale() the system operations handled by the system in an SSD represent the operation calls on the Application or Domain layer from the Presentation layer Shanghai Jiaotong University 外部資源或者外部數(shù)據(jù)庫(kù)層的表示 2020/11/4 29 Domain(s) Technical Services Foundation Inventory Persistence Naming and Directory Services Web AppFramework Technical Services POS Inventory Domain(s) Foundation Worse mixes logical and implementation views Better a logical view a logical representation of the need for data or services related to these subdomains, abstracting implementation decisions such as a database. Novell LDAP UML notation : A UML ponent, or physical part of the system. UML notation : A physical database in the UML. Shanghai Jiaotong University 采用觀察器進(jìn)行向上協(xié)同 2020/11/4 30 : Domain:: Sales:: Register :Cashier : Presentation:: Swing:: Process SaleFrame enterItem (id, qty) ... enterItem (id, qty) s : Domain:: Sales:: Sale makeLineItem(spec, qty) Collaboration from the lower layers to the Presentation layer is usually via the Observer (PublishSubscribe) pattern. The Sale object has registered subscribers that are PropertyListeners. One happens to be a Swing GUI JFrame, but the Sale does not know this object as a GUI JFrame, but only as a PropertyListener. onPropertyEvent(s, , total) PropertyListener ... Shanghai Jiaotong University 禁忌 ?某些情況下,增加層次將引入性能問(wèn)題 ?并不是適用于所有問(wèn)題 ? For example, Pipes and Filters 2020/11/4 31 Shanghai Jiaotong University 好處 ?關(guān)注點(diǎn)分離 Separation of concerns降低耦合和依賴,提高內(nèi)聚,增加重用性和清晰度 ?相關(guān)的復(fù)雜性被封裝和分解 ?低層包含了可重用的功能 ?某些層可以分布 ?團(tuán)隊(duì)開(kāi)發(fā) 2020/11/4 32 Shanghai Jiaotong University 經(jīng)典的三層架構(gòu) ? Interface ? Application Logic ? Storage C a l c u l a t e t a x e sI n te r fa c eA p p li c a ti o nL o g icA u t h o r i z ep a y m e n t sS t o ra g eD a t a b a s e2020/11/4 33 Shanghai Jiaotong University 部署 2020/11/4 34 calculate taxes Application Logic Interface calculate taxes Application Logic Interface classic 3tier architecture deployed on 2 nodes: thicker client classic 3tier architecture deployed on 3 nodes: thiner client UML notation: a node. This is a processing resource such as a puter. Shanghai Jiaotong University 模型視圖分離原則 ?模型 : 領(lǐng)域?qū)訉?duì)象 ?視圖 : 表現(xiàn)對(duì)象 , 例如 windows, applets and reports ?模型(領(lǐng)域)對(duì)象不能夠直接知道視圖(表現(xiàn))對(duì)象 2020/11/4 35 Shanghai Jiaotong University 模型視圖分離和“向上”通信 ? 從上面拉 Pullfromabove ? 從下面推 Pushfrombelow ? 觀察者模式 Observer Pattern: making the GUI object appears as an object implements an interface such as PropertyListener ? UI外觀對(duì)象 Presentation fa231。 Z e nc i t y = M u mb a iC e l e s t i a lS h o r t e n i n gS a n R a m o nShanghai Jiaotong University How to consistently define the mapping between objects and db records ? Solution: Define an object identifier (OID) for each object, and put the OID in corresponding row of table 2020/11/4 62 Shanghai Jiaotong University 對(duì)象標(biāo)識(shí)符模式 2020/11/4 63 O I Dx y z 1 2 3a b c 3 4 5T h i s i s a s i m p l i f i e d d e s i g n .I n r e a l i t y , t h e O I D m a y b ep l a c e d i n a P r o x y c l a s s .p r i m a r y k e yM a n u f a c t u r e rc i t yn a m eo i d : O I D. . .. . .n a m e c i t yN o w amp。 IMapper get(OID) : Object put( OID, Object ) ... Class UML notation : This is a qualified association. It means: 1. There is a 1M association from PersistenceFacade to IMapper objects. 2. With a key of type Class, an IMapper is found (., via a HashMap lookup) Shanghai Jiaotong University 模板方法模式 ? Problem: How to implement a variations of an algorithm that bine generic and specialized functionality? ? Solution: Provide a template method in base class that implements skeleton of algorithm, override varying parts in subclasses (using “hook” methods) 2020/11/4 66 Shanghai Jiaotong University 2020/11/4 67 A b s t r a c t C l a s st e mp l a t e M e t h o d ( )p r i m i t i v e O p e r a t i o n ( )c o n c r e t e O p e r a t i o n ( )C o n c r e t e C l a s sp r i m i t i v e O p e r a t i o n ( )t e mp l a t e M e t h o d{ ... p r i m i t i v e O p e r a t i o n ( ) ... c o n c r e t e O p e r a t i o n ( ) ...}T e m p l a t e M e t h o d ( G o F p a t t e r n )d e f i n e s s k e l e t o n o f a n a l g o r i t h m ,w i t h v a r y i n g a n d u n v a r y i n g p a r t sa b s t r a c t p r i m i t i v e o p e r a t i o n s v a r y i n g p a r t o v e r r i d e n i n s u b c l a s sc o n c r e t e o p e r a t i o n s d e f a u l t b e h a v i o r i f c a n b e o v e r r i d e n i n s u b c l a s s , t h e n i s c a l l e d a h o o k m e t h o dShanghai Jiaotong University Using template method pattern for materialization 2020/11/4 68 Abstract RDBMapper tableName : String + 171。 } } IMapper ProductSpecification RDBMapper + 171。 ( (PRICE) )。 } } { private DBRecord getDBRecord OID oid ) { String key = ()
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1