Download - Slide JEE Design Patterns

Transcript

JEE Design Patterns

JEE Design PatternsGing vin: Nguyn Cng Hoan

Nhm SV:Nguyn Hong V11520489Hunh Vn Hoa Xun11520496Nguyn Vn Quang11520307Ni dung:Gii Thiu Design PatternsJEE Design PatternsMt S JEE Design PatternsDemoDesign PatternsBi ton:Vic xy nh mt tng, hai, hay ba tng c ging xy nh mt trm tng khng?

Cu tr li khng phi l ging hay khng m khc nhau nh th no?Nh mt, hai, hay ba tng khi b li g c th tm cch sa hoc thm ch p ra xy li, cn nh mt trm tng ???Ra i khi nim: Design Pattern Mu thit kDesign PatternsVy Design Pattern l g?n gin n l nhng gii php gii quyt nhng vn thng gp trong pht trin phn mm theo hng i tng. N l nhng bn mu, ta da vo xy dng nn nhng i tng.

II. JEE Design Patterns

II. JEE Design PatternsPresentation Tier- Intercepting FilterFront ControllerComposite View Context ObjectApplication ControllerView HelperService To WorkerDispatcher ViewII. JEE Design Patterns2. Business TierBusiness DelegateServer LocatorSession FaadeApplication ServiceBusiness ObjectComposite EntityTransfer ObjectTransfer Object AssemblerValue List HandleII. JEE Design Patterns3. Integration TierService ActivatorData Access ObjectDomain StoreWeb Service BrokerMt S JEE Design PatternsIntercepting FilterVn :Request => ServerChng ta s mun:Post-processing trc khi gi requestPre-processing khi server nhn c requestMun x l cng nhiu th phi chnh sa code thm if/else => copy/paste style

Mt S JEE Design Patterns

Intercepting FilterThnh phn:FilterFilter ChainTargetFilter ManagerClient

Mt S JEE Design PatternsFront ControllerVn :Request => ServerChng ta s chn:X l theo kiu tp trungX l theo kiu phn tnNu x l phn tn, rt d xy ra tnh trng trng lp bn trong cc x l => copy/paste style

Mt S JEE Design PatternsFront ControllerThnh phn:Front ControllerDispatcherView

Mt S JEE Design PatternsBusiness DelegateBusiness Delegate Pattern c s dng tch presentation tier v business tier. N l c bn s dng lm gim chc nng tra cu thng tin lin lc hoc iu khin t xa cho business tier ang cp trong presentation tier. Trong business tier, bao gm:

Mt S JEE Design PatternsBusiness DelegateThnh phn:ClientBusiness DelegateLookUp Service Business Server

Mt S JEE Design PatternsTransfer ObjectTransfer Object c s dng khi chng ta mun truyn d liu vi nhiu thuc tnh trong mt ln t client n server. Transfer Object cn c gi l Value Object.Mt S JEE Design PatternsTransfer ObjectThnh phn:ClientBusiness ObjectTransfer Object

DemoKt thc...Cm n thy v cc bn xem nhm thuyt trnh!