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

正文內(nèi)容

第11講架構(gòu)與其他模式-wenkub

2022-10-09 16:41:19 本頁面
 

【正文】 action state ? Lazy materialization 2020/11/4 59 Shanghai Jiaotong University Problem: How to map classes to data in a RDB ? Solution (Representing objects as tables): define a table for each persistent class ? Each attribute bees a column ? New problem: How to deal with plex attributes (see “Representing object relationships as Tables”) 2020/11/4 60 Shanghai Jiaotong University 對象表示為表模式 2020/11/4 61 Ma n u f a c t u r e rn a m ec i t y. . .. . .n a m e c i t yN o w amp。 Jess 171。t know or want to describe the details of how the Jess rule engine works, but just want to show collaboration with it. UML notation : UML path name to indicate packaging onPropertyEvent(s, , total) PropertyListener Shanghai Jiaotong University 簡單包和子系統(tǒng) ?某些包就是子系統(tǒng) ? Persistence, POSRuleEngine,… ?某些包只是對象集合 ? Pricing Package 2020/11/4 24 Shanghai Jiaotong University 外觀 ? 訪問代表子系統(tǒng)的包的方法最常用的模式就是外觀模式 ? 外觀一般不能暴露太多的低層操作 ? 外觀經(jīng)常是下層子系統(tǒng)對象的協(xié)調(diào)器 2020/11/4 25 171。singleton187。interface187。interface187。interface187。interface187。Shanghai Jiaotong University 第 11講 . 架構(gòu)與其他模式 Cao Jian CIT Lab, Shanghai Jiaotong University Shanghai Jiaotong University 內(nèi)容 ?架構(gòu)分析 ?邏輯結(jié)構(gòu)精化與分層模式 ?其它模式 2020/11/4 2 Shanghai Jiaotong University 架構(gòu)分析的意義 ?降低在系統(tǒng)設(shè)計中丟失某些重要因素的風(fēng)險 ?避免在低優(yōu)先級的問題上花費過多的精力 ?有助于產(chǎn)品與業(yè)務(wù)目標的一致 2020/11/4 3 Shanghai Jiaotong University 何時開始架構(gòu)分析 ?早期工作中就要識別和解決架構(gòu)問題 ?架構(gòu)分析和早期開發(fā)活動并行 2020/11/4 4 Shanghai Jiaotong University 變化點和進化點 ?變化點:當前現(xiàn)有系統(tǒng)或需求中的變化之處 ?進化點:現(xiàn)有需求中不存在,但可能在將來發(fā)生,推測性的變化點 2020/11/4 5 Shanghai Jiaotong University 架構(gòu)分析 ?架構(gòu)分析 是在功能性需求(例如銷售處理)的語境中,識別和處理系統(tǒng)的非功能性需求(例如安全需求等)的活動。 ISalePricingStrategy Taxes 171。 ICreditAuthorization ServiceAdapter ServiceAccess Inventory 171。 ITaxCalculatorAdapter Services Factory Sales Register Sale Swing ProcessSale Frame Payments CreditPayment 171。 IInventoryAdapter Jess POSRuleEngine POSRuleEngineFacade SOAP Shanghai Jiaotong University 2020/11/4 22 Log4J Technical Services Domain Presentation Jess Persistence POSRuleEngine Inventory Payments ServiceAccess Pricing Sales Text Swing SOAP Hide the specific types and focus on illustrating the packagepackage coupling Shanghai Jiaotong University 層內(nèi)和包間交互場景 2020/11/4 23 : Domain:: Sales:: Register :Cashier : Presentation:: Swing:: Process SaleFrame enterItem (id, qty) 171。 : Domain:: POSRule Engine:: POSRule Engine Facade enterItem (id, qty) s : Domain:: Sales:: Sale : Domain:: Products:: Product Catalog makeLineItem(spec, qty) 171。subsystem187。subsystem187。 Z e n Mu mb a iMA N U F A C T U R E R T A B L E: Ma n u f a c t u r e rn a m e = N o w amp。interface187。 // hook method return getObjectFromRecord( oid, dbRec )。 ( oid )。 return ps。 n o t i n D BO l d r e t r i e v e d f r o m D BC l e a n u n m o d i f i e dD i r t y m o d i f i e dD e l e t e dShanghai Jiaotong University 狀態(tài)模式( State Pattern) ?問題: Behavior depends on state of an object. How to avoid conditional logic? ?解決方案 : Create stateclasses for each state, with a mon interface. Delegate statedependent operations to the state class 2020/11/4 71 Shanghai Jiaotong University 2020/11/4 72 P e r s i s t e n t O b j e c to i d : O I Ds t a t e : P O b j e c t S t a t ec o m m i t ( )d e l e t e ( )r o l l b a c k ( )s a v e ( )s e t S t a t e ( P O b j e c t S t a t e ). . .P O b j e c t S t a t ec o m m i t ( o b j : P e r s i s t e n t O b j e c t )d e l e t e ( o b j : P e r s i s t e n t O b j e c t )r o l l b a c k ( o b j : P e r s i s t e n t O b j e c t )s a v e ( o b j : P e r s i s t e n t O b j e c t )O l d D i r t yS t a t ec o m m i t ( . . . )d e l e t e ( . . . )r o l l b a c k ( . . . )1O l d C l e a nS t a t ed e l e t e ( . . . )s a v e ( . . . )N e wS t a t ec o m m i t ( . . . )O l d D e l e t eS t a t ec o m m i t ( . . . )r o l l b a c k ( . . . )P r o d u c tS p e c i f i c a t i o n. . .. . .S a l e. . .. . .*{ s t a t e . d e l e t e ( t h i s ) }{ / / d e f a u l t n o o p / / b o d i e s f o r / / e a c h m e t h o d}{ / / d e l e t eo b j . s e t S t a t e ( O l d D e l e t e S t a t e . g e t I n s t a n c e ( ) ) }{ / / s a v eo b j . s e t S t a t e ( O l d D i r t y S t a t e . g e t I n s t a n c e ( ) ) }{ / / r o l l b a c kP e r s i s t e n c e F a c a d e . g e t I n s t a n c e ( ) . r e l o a d ( o b j )o b j . s e t S t a t e ( O l d C l e a n S t a t e . g e t I n s t a n c e ( ) ) }{ / / c o m m i tP e r s i s t e n c e F a c a d e . g e t I n s t a n c e ( ) . u p d a t e ( o b j )o b j . s e t S t a t e ( O l d C l e a n S t a t e . g e t I n s t a n c e ( ) ) }{ s t a t e . r o l l b a c k ( t h i s ) }{ s t a t e . c o m m i t ( t h i s ) }{ s t a t e . s a v e ( t h i s ) }{ / / c o m m i tP e r s i s t e n c e F a c a d e . g e t I n s t a n c e ( ) . i n s e r t ( o b j )o b j . s e t S t a t e ( O l d C l e a n S t a t e . g e t I n s t a n c e ( ) ) }{ / / c o m m i tP e r s i s t e n c e F a c a d e . g e t I n s t a n c e ( ) . d e l e t e ( o b j )o b j . s e t S t a t e ( D e l e t e d S t a t e . g e t I n s t a n c e ( ) ) }Shanghai Jiaotong University 命令模式( Command Pattern) ?問題 : How to handle a multiplicity of requests/tasks that occur in a runtimedependent order? (such as the various operations that can occur in a transaction) ?解決方案 : Make each request a class that implements the same interface 2020/11/4 73 Shanghai Jiaotong University 2020/11/4 74 玦 n t e r f a c e ?I C o m m a n de x e c u t e ( )u n d o ( )D
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1