Download presentation
Presentation is loading. Please wait.
Published byPaula Mason Modified over 9 years ago
1
How I spend my money Software architecture course Mohan, Maxim
2
Architecture UI/PL SQL Server DBAL Pipes and Filters Events Cascade Filters Intercepting Filters AJAX HTML, Javascript AL/BL JSP, Servlet; Business Logic Tom Cat DBL
3
Architecture detailed
4
Application architecture
5
Deployment Architecture
6
Use cases diagram Register User Login user Create categoryCreate transactionChange balanceGenerate Report
7
Design 1. Intercepting Filter Problem How do you implement common pre- and post-processing steps around Web page requests?
8
Intercepting Filter When the Web server receives a page request, Request Handler passes control to the FilterChain object first. This object maintains a list of all filters and calls each filter in sequence. FilterChain can read the sequence of filters from a configuration file to achieve deployment- time composability. Each filter has the chance to modify the incoming request. For example, it can modify the URL or add header fields to be used by the application. After all filters have been executed, Request Handler passes control to the controller, which executes the application functionality.
9
Intercepting filter implementation
10
Design Composite filter
11
Composite Pattern Use a Composite pattern to design the filtering system and provide explicit support for filter pipelines. To implement the design of the Composite Filter, you will need to design the filtering subsystem such that the filtering mechanism is encapsulated behind an interface and use the design structure of the Composite pattern to provide support for complex hierarchical and pipelined filters. The Composite pattern provides support for combining filters in a hierarchical fashion. Composite will allow you to model complex multilevel tree structure of filters but the explicit representation of pipelines is not visible in its design. Therefore, you will add first-class support for the pipeline roles in the design structure of Composite.
12
Cascading Filter Pattern Basic schema : Filter Pipe Filter manager
13
Cascading Filter Pattern Sequence diagram
14
Cascading Filter usage example
15
Other patterns Façade : Database Access Layer
16
Other patterns
17
Factory Method: Database Access Layer
18
Other patterns Template method: part of the composite method.
19
Other patterns Predicate: filters customization
20
JSP – Servlet Graph
21
Filters Used Filters List: Functional requirements: Create user. Create account. Create withdraw account transaction. Create deposit account transaction. Create items transaction. Create category. Get transaction by date, account, and user. Get items by date, name, and price. Get items by category. Create report. Non-functional requirements: Validate account number format. Validate user name format. Validate password format. Validate category name format. Validate transaction date format. Validate item name format. Validate item price format. Check user name exists. Insert user class instance into the session. Check if user instance class is present in the session. Log out. Delete user from the session
22
Filters used Cascading filters managers: Login user – Validate base user data Validate user name format.(Ruled Validate field filter) Validate password format.(Ruled Validate field filter) – Get user (DB level). – Insert user class instance into the session. Create user. – Validate user data Validate base user data. Validate confirm password format(Ruled Validate field filter) Check password and confirm password for quality. – Check user name exists. – Create user. (Business logic level, DB level). – Insert user class instance into the session. Get categories – Check if user instance class is present in the session. (Optional) – Get categories list (DB level). Generate categories report – Generate html report. Generate categories report Create category – Check if user instance class is present in the session. – Validate category name format.(Ruled Validate field filter) – Create category (Business logic level, DB level). – Get categories.
23
Filters used Create withdraw account transaction. – Check if user instance class is present in the session. – Validate transaction date format.(Ruled Validate field filter) – Validate money amount format.(Ruled Validate field filter) – Create withdraw transaction. (Business logic level) – Perform transaction. (Business logic level, DB level) Create deposit account transaction – Check if user instance class is present in the session. – Validate money amount.(Ruled Validate field filter) – Create deposit transaction. (Business logic level) – Perform transaction. (Business logic level, DB level) Create items transaction – Check if user instance class is present in the session. – Validate transaction date format.(Ruled Validate field filter) – Create items. Create item. – Validate item name format.(Ruled Validate field filter) – Validate item price format.(Ruled Validate field filter) – Check category id exists. – Create item (Business logic level). – Create transaction (Business logic level). – Perform transaction (DB logic level). Generate transaction report. – Check if user instance class is present in the session. – Validate transaction start date if exists.(Ruled Validate field filter) – Validate transaction end date if exists.(Ruled Validate field filter) – Get transaction (DB Level). – Generate html report. Get items by category report. – Check if user instance class is present in the session. – Get items by category (DB level). – Generate html report. Log out user. – Check if user instance class is present in the session. Delete user from the session
24
Servlets – Filters mapping
25
Subsystem design
26
Business subsystem
28
DBAccess Subsystem
30
Filters Subsystem
32
Onjava Subsystem
33
Predicate subsystem
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.