Upload
neal-shields
View
216
Download
0
Tags:
Embed Size (px)
Citation preview
Design I: Web Application Architecture and Patterns
Peter Dologdolog [at] cs [dot] aau [dot] dk2.2.05Intelligent Web and Information SystemsSeptember 23, 2010
This Lecture
IS Architecture for the Web, MVCModel PatternsView PatternsController Patterns
2Peter Dolog, Web Engineering, Design I
3Peter Dolog, Web Engineering, Design I
Historical Perspective
presentation layer
resource management
layer
application logic layer
client
info
rmat i
on
syste
m
1. define access channelsand client platforms
2. define presentation formats and protocols forthe selected clients andprotocols
3. define the functionalitynecessary to deliver thecontents and formats neededat the presentation layer
4. define the data sourcesand data organization neededto implement the applicationlogic
top-down design
Copyright Springer Verlag Berlin Heidelberg 2004
4Peter Dolog, Web Engineering, Design I
clientpresentatio
n layer
resource management
layer
application logic layer
info
rmat i
on
syste
m
3-tier architecture
middleware
Copyright Springer Verlag Berlin Heidelberg 2004
5Peter Dolog, Web Engineering, Design I
client
resource management
layer
application logic layer
info
rmat i
on
syste
m
N-tier architecture
middleware
presentationlayer
Web server
Web browser
HTML filter
Copyright Springer Verlag Berlin Heidelberg 2004
Model-View-Controller
6Peter Dolog, Web Engineering, Design I
Model
View Controller
Model
Domain Model
8Peter Dolog, Web Engineering, Design I
Database
9Peter Dolog, Web Engineering, Design I
Model as a Transaction Script
10Peter Dolog, Web Engineering, Design I
Structuring Domain Model: Analysis Patterns
11Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Analysis Patterns
12Peter Dolog, Web Engineering, Design I
Accountability
A relationship of responsibility between responsee and responsible
Organizational structuresEmploymentsContracts
13Peter Dolog, Web Engineering, Design I
Address Book (C) Martin Fowler: Analysis Patterns
14Peter Dolog, Web Engineering, Design I
Party
(C) Martin Fowler: Analysis Patterns
15Peter Dolog, Web Engineering, Design I
Organization Structure with Explicit Levels
(C) Martin Fowler: Analysis Patterns
16Peter Dolog, Web Engineering, Design I
Organization Supertype
(C) Martin Fowler: Analysis Patterns
17Peter Dolog, Web Engineering, Design I
Two organizational hierarchies
(C) Martin Fowler: Analysis Patterns
18Peter Dolog, Web Engineering, Design I
Typed Relationships
(C) Martin Fowler: Analysis Patterns
19Peter Dolog, Web Engineering, Design I
Rules (C) Martin Fowler: Analysis Patterns
20Peter Dolog, Web Engineering, Design I
Accountability
(C) Martin Fowler: Analysis Patterns
21Peter Dolog, Web Engineering, Design I
Knowledge and operational levels
(C) Martin Fowler: Analysis Patterns
22Peter Dolog, Web Engineering, Design I
Party Type Generalizations
(C) Martin Fowler: Analysis Patterns
23Peter Dolog, Web Engineering, Design I
Hierarchic Accountability Type
(C) Martin Fowler: Analysis Patterns
24Peter Dolog, Web Engineering, Design I
Leveled Accountability Type
(C) Martin Fowler: Analysis Patterns
25Peter Dolog, Web Engineering, Design I
Subtypes of Acountability Types
(C) Martin Fowler: Analysis Patterns
26Peter Dolog, Web Engineering, Design I
Operating Scopes
(C) Martin Fowler: Analysis Patterns
27Peter Dolog, Web Engineering, Design I
Accounting
Tracing how money move througout the companyTacking of earnings and expendituresPosts of money and goods to record – entries
28Peter Dolog, Web Engineering, Design I
Account (C) Martin Fowler: Analysis Patterns
29Peter Dolog, Web Engineering, Design I
A Transaction with Two Entries
(C) Martin Fowler: Analysis Patterns
30Peter Dolog, Web Engineering, Design I
Instance Example
(C) Martin Fowler: Analysis Patterns
31Peter Dolog, Web Engineering, Design I
Multiledged Transactions
(C) Martin Fowler: Analysis Patterns
32Peter Dolog, Web Engineering, Design I
2-legged transaction without entries
(C) Martin Fowler: Analysis Patterns
33Peter Dolog, Web Engineering, Design I
Summary and Detail Accounts
(C) Martin Fowler: Analysis Patterns
34Peter Dolog, Web Engineering, Design I
Account hierarchies without separating summary and detail accounts
(C) Martin Fowler: Analysis Patterns
35Peter Dolog, Web Engineering, Design I
Posting Rules Multiplied by a Factor or a method to calculate an entry
(C) Martin Fowler: Analysis Patterns
36Peter Dolog, Web Engineering, Design I
Individual Instance Methods with Singletons
(C) Martin Fowler: Analysis Patterns
37Peter Dolog, Web Engineering, Design I
Implementation with Strategy Pattern
(C) Martin Fowler: Analysis Patterns
38Peter Dolog, Web Engineering, Design I
Implementation with Internal Case Statement
(C) Martin Fowler: Analysis Patterns
39Peter Dolog, Web Engineering, Design I
Implementation with Parametrized Method
(C) Martin Fowler: Analysis Patterns
40Peter Dolog, Web Engineering, Design I
Posting Rules for Many Accounts
(C) Martin Fowler: Analysis Patterns
41Peter Dolog, Web Engineering, Design I
Account finder and Eligibility Conditions
(C) Martin Fowler: Analysis Patterns
42Peter Dolog, Web Engineering, Design I
Acount Groups: Accounting Practices
(C) Martin Fowler: Analysis Patterns
43Peter Dolog, Web Engineering, Design I
Sources for Transactions
(C) Martin Fowler: Analysis Patterns
44Peter Dolog, Web Engineering, Design I
Balance Sheet and Income Statement
(C) Martin Fowler: Analysis Patterns
45Peter Dolog, Web Engineering, Design I
Corresponding Accounts
(C) Martin Fowler: Analysis Patterns
46Peter Dolog, Web Engineering, Design I
Supporting Inventories
(C) Martin Fowler: Analysis Patterns
47Peter Dolog, Web Engineering, Design I
Multiple Summary Accounts
(C) Martin Fowler: Analysis Patterns
48Peter Dolog, Web Engineering, Design I
Derived Accounts
(C) Martin Fowler: Analysis Patterns
49Peter Dolog, Web Engineering, Design I
Expenses to Abandon Accounting Model
(C) Martin Fowler: Analysis Patterns
Interesting Domain Models 1
50Peter Dolog, Web Engineering, Design I
-Value(scenario)
Contract
-Value(scenario)
Portfolio
* *
«derived»
{All instances on contract on which self.filter is true}
ContractSelector
Date
Instrument Party
*
+primaryparties
*
*
+counterparties
** *
+start0..1* +end0..1 *
+selectContracts(in Collection)
-isIncluded
ContractFilter
1..1
*
-Value(scenario)
HardCodedFilter
BooleanMethod
*
+filter1..1
SetFilter SetOperation{documentation = Instances: Union, Intersection, Negation}
* 1..1
*
*
(C) Martin Fowler: Analysis Patterns
View
Template View
52Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration
Transform View
53Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration
Two Step View
54Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration
Example on two step view2
55Peter Dolog, Web Engineering, Design I(C) Martin Fowler: Patterns of Enterprise Application Integration
Controller
Page Controllers
57Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration
Application Controller
58Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration
Sequence view
59Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration
Other Patterns
Data Mapper
61Peter Dolog, Web Engineering, Design I
Story MapperInsertUpdateDelete
Row Data Gateway
62Peter Dolog, Web Engineering, Design I
StoryGatewayTypeTitleInsertUpdateDelete
Active Record
63Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration
Lazy Load
64Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration
Service Layer
65Peter Dolog, Web Engineering, Design I
(C) Martin Fowler: Patterns of Enterprise Application Integration