Upload
vernon-stafford
View
227
Download
5
Tags:
Embed Size (px)
Citation preview
SOFTWARE ARCHITECTURE AND DESIGN
TEAM 3 – K15T1Hanh Luong – Leader – T095095
Hao Tran – T094442Huy Nguyen – T094016
Hieu Le – T093798Quang Nguyen – T094193
TEAM ASSGIMENT 2
1
Content
1. System overview2. Module view3. C&C View4. Allocation view5. Mapping
2
System overview1. Functionality
3
System overview1. Quality attribute requirement
Quality attribute Use case ID
Performance
UC2.1 View list member QP01
UC2.4 View detail member information QP02
UC3.1 Manage sale QP03
UC6.0 Statistic QP04
UC10.1 Update info from POST server to Head office server QP05
UC10.2 Update info from Head office server to POST office server QP06
UC11.1 Manage company statistic QP07
Availability
UC3.1 Manage sale QA01
UC6.0 Store Statistic QA02
UC11.1 Manage company statistic QA03
Usability
UC1.2 Change pass QU01
UC2.1 View list member QU02
UC2.3 Modify member information QU03
UC4.3 Modify user group information QU07
UC4.7 View detail account information QU10
UC4.9 Reset pass QU11
UC4.11 Modify account information QU12
UC5.3 Modify store’s products information QU15
UC7.1 View list product QU17
UC7.3 View detail product QU18
UC7.4 Modify product QU19
UC7.6 Deliver product QU20
UC11.1 Manage company statistic QU27
4
Module view1. Decomposition style2. Layered style combine use style3. Data model
5
Module view - Decomposition style1. Primary presentation
Decomposition for POST System
ManageSystem
ManageAccount
Catalog
ManageProductManageProductType
ManageBranch ManageStoreProduct
Business
ManageSaleManageSale ManageMember
StoreStatastic CompanyStatastic
Automatic
UpdateInfoToPOST
UpdateInfoToHeadOffice
Legend
ModuleModule (A) contains submodule (C)
A
C 6
Module view - Decomposition style2. Context diagram
Context diagram Store
Subsystem in Store
CashierPaymentStore Manager
Store Manager
Assess productretail prize
Store statistic
External Entity System Usage
Invoice
TimerUpdate infofrom HeadOffice
Internal Entity
Legend
7
Module view - Decomposition style2. Context diagram
Context diagram Head office
Subsystem in HeadOffice
Administrator Account’s infoProduct Manager
Company Manager
Info of product
Info ofbranch catalog
Product Manager
Assess productstandard prize
Product Manager
Info ofproduct type
Company Manager
Company statistic
Administrator Disable/Enableaccount
Member Manager
Member’s info
Timer Update infofrom POST
External Entity System UsageInternal Entity
Legend
8
Module view- Layered style combine use styleUIUI
ManageAccountUI
Business LogicBusiness Logic
Data AccessData Access
ManageProductTypeUI ManageProductUI ManageStoreProductUI ManageBranchUI StoreStatisticUIManageSaleUI ManageMemberUI CompanyStatisticUI
ManageAccountBL ManageProductTypeBL ManageProductBL ManageStoreProductBL ManageBranchBL ManageSaleBL ManageMemberBL
UpdateInfoToPOSTBL UpdateInfoToHeadOfficeBL
Legend
Layer
Allowed to use
Layer segment
ManageAccountDA ManageProductTypeDA ManageProductDA ManageStoreProductDA ManageBranchDA
StoreStatisticBLCompanyStatisticBL
ManageSaleDA ManageMemberDA StoreStatisticDA CompanyStatisticDA
UpdateInfoToPOSTDA UpdateInfoToHeadOfficeDA
Use
9
Module view – Data model
10
Data Model
Branch
PK BranchID
BranchNameAddressPhoneNumber
VARCHAR(3)
VARCHAR(50)NVARCHAR(100)VARCHAR(11)
ProductType
PK TypeID
TypeNameDescription
VARCHAR(3)
VARCHAR(50)VARCHAR(100)
AccountGroup
PK GroupIDGroupNameDescription
VARCHAR(3)VARCHAR(50)NVARCHAR(200)
DetailInvoice
PK,FK1PK,FK2PK,FK3
InvoiceIDStrProIDBranchID
RetailPriceQuantity
VARCHAR(10)VARCHAR(3)VARCHAR(3)
MoneyINTEGER
Account
PKFK1FK2
UsernameGroupIDBranchID
PasswordIDNumberGenderBirthdayAddressPhoneNumberLock
VARCHAR(50)VARCHAR(3)VARCHAR(3)
VARCHAR(50)INTEGERBITDATETIMENVARCHAR(100)VARCHAR(11)BIT
Legend
Entity
For each B there are one or more As, each A is related to exactly one B
A B
BAPK = Primary KeyFK = Foreign Key
Column name Data type
For each B there are 0 or more As, each A is related to exactly one B
A B
StoreStatistic
PKFK1FK2
SSIDBranchIDCSID
StatisticDateStoreTurnoverStatisticType
VARCHAR(10)VARCHAR(3)VARCHAR(10)
DATETIMEMoneyVARCHAR(7)
CompanyStatistic
PK CSID
StatisticDateSaledProductQuantityTotalTurnover
VARCHAR(10)
DATETIMEVARCHAR(10)INTEGERMoney
Invoice
PKFK1FK2
InvoiceIDMemberIDUsername
SaleDateSubTotalVATTotalDuePoint
VARCHAR(10)VARCHAR(10)VARCHAR(50)
DATETIMEMoneyINTEGERMoneyINTEGER
Member
PK MemberID
MemberNameBirthdayAddressSavePointLock
VARCHAR(10)
VARCHAR(50)DATETIMENVARCHAR(100)INTEGERBIT
Permission
PK PerID
PerNameDescription
VARCHAR(3)
VARCHAR(50)NVARCHAR(200)
Product
PKFK
ProductIDTypeID
ProductNameBarCodeProducerVATStandPrice
VARCHAR(3)VARCHAR(3)
VARCHAR(50)VARCHAR(13)NVARCHAR(50)INTEGERMoney
RetailPrice
PKFK1FK2
RetailPriceIDStrProIDBranchID
PriceStartDateEndDate
VARCHAR(3)VARCHAR(3)VARCHAR(3)
MoneyDATETIMEDATETIME
StoreProduct
PK,FK1PK,FK2FK3
StrProIDBranchIDRetailPriceID
LockedRetailPrice
VARCHAR(3)VARCHAR(3)VARCHAR(3)
Bit
StoreStatisticDetail
PK,FK1PK,FK2
SSIDInvoiceID
SaledProductQuantityTurnover
VARCHAR(10)VARCHAR(10)
VARCHAR(10)INTEGERMoney
AccountGroupDetail
PK, FK1PK,FK2
GroupIDPerID
VARCHAR(3)VARCHAR(3)
For each B there are 0 or more As, each A is related to zero or one B
A BFor each B there are one or more As, each A is related to zero or one B
11
C&C view1. Share data combine Client – server2. Multi tier
12
C&C view - Share data combine Client – server• Packet 1: Manage sale (UC3.1)
Head OfficeStore
Legend:
Local DB Head Office DB
PosT UI
Web Server
Head Office Web Server
Automated update
Read product
information
Write sale reocord
Auto update sale record
Write sale record
Request – Reply (SQL - ODBC)
Read particular product
information
Update sale record
Database
Software component
Webservice application
Request – Reply
Calculation
Call - Return
Calculte money and
point
Save sale record
13
C&C view - Share data combine Client – server• Packet 2: Manage store statistic (UC6.0 UC6.2), Manage
company statistic (UC11.1)
Head OfficeStore
Legend:
Local DBHead Office DB
Web Server
Head Office Web Server
View statistic history UI
Statistic UIStore statistic
Read historyWrite
statistic result
Statistic
Read historyWrite
statistic result
View history
Statistic
Request – Reply (SQL - ODBC)
Update statistic result
Database
Software component
Webservice application
Request – Reply
View statistic history UI
View history
14
C&C view - Share data combine Client – server• Packet 3: Manage member information (UC2.0 UC2.5)
Head OfficeStore
Legend:
Local DBHead Office DB
PosT UI
Web Server
Head Office Web Server
Add member UI
Edit member infor UI
Enable/Disable
member UI
Automated update
Read member
point
Write member
point
Auto sending member
point
Read member
information
Write member
information
Add new member
Edit member
information
Enable/Disable
member
Request – Reply (SQL - ODBC)
Read particular member
point
Update member
information
Database
Software component
Webservice application
Request – Reply
Update point
15
C&C view - Share data combine Client – server• Packet 4: Manage product (UC7.0 UC7.6), manage product
type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3)
Head Office
Store
Legend:
Local DB
Head Office DB
PosT UI
Web Server
Head Office Web Server
Add product UI
Edit product infor UI Delete
product UIAutomated update
Read product
information
Writeproduct
information
Auto update product
information
Read product
information
Write product
information
Add new product
Edit product information Delete
product
Request – Reply (SQL - ODBC)
Read particular product
information
Update product
information
Database
Software component
Web service application
Request – Reply
Add product type UI
Edit product type UI
Delete product type
UI
Add new product type Edit product
type information
Delete product type
Edit retail price UI
Edit product price
16
C&C view – Multi tier
Web tierClient tier
Web browser
Logical tier
Manage account
Manage sale
Manage product type
Database tier
Main database
Backup database
Legend
Client-side application
Database
Component Process
UpdateToPOSTAutomatic
updateUpdateToHead
Office
Manage member
Store statistic
Company statistic
Manage product
Manage branch
Manage store product
Manage system UI
(html)
Business UI(html)
Catalog UI (html)
Web Page
Main (html))
Container HTTP C# call ODBC
17
Allocation view1. Deployment view
Head office
Legend
Head office Store
Internet
Fire wall
Database server(SQL Server, port 1433)
(Head office )
Web server(Head office)
Member manager(Web browser,
http, port 80, win7)
Head office Administrator(Web browser,
http, port 80, win7)
LAN
Store
Company manager(Web browser,
http, port 80, win7)
Product manager(Web browser,
http, port 80, win7)
StoreStore
LAN
Store manager(Web browser,
http, port 80, win7)
Cashier(Web browser,
http, port 80, win7)
Database server(SQL Server 2008, port 1433)
(Store )
Fire wall User machine Local network Database server Internet Web server
StoreStore
Store
Many stores1 head office 1 storeNetwork communication b/w A and B in LAN
LANA B
Cashier(Web browser,
http, port 80, win7)
Backup server (Head office)
Backup server (Store)
Web server(Store)
Router Router
Fire wall
Router
Load balancing
Load balancing
Load balancing
LAN
LAN
LAN
LAN
LAN
LAN
LANLAN
18
Mapping1. Mapping between views
1. Mapping between C&C view and Module view2. Mapping between C&C view and Allocation view
2. Mapping requirement to architecture
19
Mapping - Mapping between views1. Mapping between C&C view and Module view
20
Shared data combine client- server Data model
Statistic UI CompanyStatistic
Store statistic StoreStatistic
Add member UI, Edit member UI Permission
Edit member UI AccountGroupDetail
Add member UI, Edit member UI AccountGroup
Add member UI, Edit member UI, Enable/Disable member UI
Member
Calculation Invoice
Store statistic StoreStatisticDetail
N/A Account
N/A Branch
Edit retail price UI RetailPrice
Calculation DetailInvoice
N/A StoreProduct
Add product UI, Edit product infor UI, Delete product UI
Product
Add product type UI, Edit product type UI, Delete product type UI
ProductType
Mapping - Mapping between views1. Mapping between C&C view and Module view
21
Decomposition View Shared data combine Client-Server
Submodule: Manage sale, UpdateInfoToHeadOffice
Packet 1: Manage sale (UC3.1)
Submodule: StoreStatistic, CompanyStatistic, UpdateInfoToHeadOffice
Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1)
Submodule: ManageMember, UpdateInfoToPOST
Packet 3: Manage member information (UC2.0 UC2.5)
Submodule: ManageProduct, ManageProductType, ManageStoreProduct, UpdateInfoToPOST
Packet 4: Manage product (UC7.0 UC7.6), manage product type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3)
Mapping - Mapping between views1. Mapping between C&C view and Module view
22
Multi-tier Layer styleManage system UI ManageAccountUICatalog UI ManageProductTypeUICatalog UI ManageProductUICatalog UI ManageStoreProductUI
Catalog UI ManageBranchUIBusiness UI ManageSaleUIBusiness UI ManageMemberUIBusiness UI CompanyStatisticUIBusiness UI StoreStatisticUIManage account ManageAccountBLManage product type ManageProductTypeBLManage product ManageProductBLManage store product ManageStoreProductBLManage branch ManageBranchBLManage member ManageMemberBL
Mapping - Mapping between views1. Mapping between C&C view and Module view
23
Multi-tier Layer styleManage sale ManageSaleBL
Company statistic CompanyStatisticBL
Store statistic StoreStatisticBL
UpdateToPOST UpdateInfoToPOSTBL
UpdateToHeadOffice UpdateInfoToHeadOfficeBL
Manage account ManageAccountDA
Manage product type ManageProductTypeDA
Manage product ManageProductDA
Manage store product ManageStoreProductDA
Manage branch ManageBranchDA
Manage sale ManageSaleDA
Manage member ManageMemberDA
Store statistic StoreStatisticDA
Company statistic CompanyStatisticDA
UpdateToHeadOffice UpdateInfoToHeadOfficeDA
UpdateToPOST UpdateInfoToPOSTDA
Mapping - Mapping between views1. Mapping between C&C view and Module view
24
Multi - tier Data modelWeb browser N/AMain (HTML) N/AManage system UI (HTML) N/ABusiness UI (HTML) N/ACatalog UI (HTML) N/AManage account Permission, AccountGroupDetail, AccountGroup, AccountManage sale Invoice, DetailInvoice, StoreProduct, Product, ProductType,
Branch, Member
Manage member Invoice, DetailInvoice, StoreProduct, Product, ProductType, Branch, Member
Store statistic StoreStatistic, StoreStatisticDetail, Invoice, DetailInvoice, StoreProduct, Product, ProductType, Branch, Member
Company statistic CompanyStatistic, StoreStatistic, StoreStatisticDetail, Invoice, DetailInvoice, StoreProduct, Product, ProductType, Branch, Member
Manage product type ProductTypeManage product Product, ProductTypeManage store product StoreProduct, Product, ProductType, BranchManage branch BranchUpdatetoPOST Permission, AccountGroupDetail, AccountGroup, Account,
Product, ProductType, Invoice, DetailInvoice, StoreProduct, , Branch, Member
UpdatetoHeadOffice Invoice, DetailInvoice, StoreProduct, Product, ProductType, Branch, Member, StoreStatistic, StoreStatisticDetail
Main database N/ABackup database N/A
Mapping - Mapping between views1. Mapping between C&C view and Allocation view
25
Shared data combine Client-Server Deployment View
Web server Web Server (Store)Head Office Web server Web Server (Head Office)Local DB Database server (Store), Backup server (Store)Head Office DB Database server (Head Office), Backup server (Head
Office)Packet 1: Manage sale (UC3.1) Cashier machines
Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1)Packet 4: Manage product (UC7.0 UC7.6), manage product type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3)
Store manager machine
Packet 4: Manage product (UC7.0 UC7.6), manage product type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3)
Product manager machine
Packet 3: Manage member information (UC2.0 UC2.5) Member manager machine
Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1) Company manager machine
Mapping - Mapping between views1. Mapping between C&C view and Allocation view
26
Multi - tier Deployment ViewWeb browser User machine of Store manager, Cashier, Head office
administrator, Member manager and Company manager, Product manager.
Main (HTML) Web server (at store)Manage system UI (HTML) Web server (at Head office)Business UI (HTML) Web server (at store)Catalog UI (HTML) Web server (at store)Manage account Head office administrator (User machine)Manage sale Cashier (User machine)Manage member Member manager (User machine)Store statistic Store manager (User machine)Company statistic Company manager (User machine)Manage product type Product manager (User machine)Manage product Product manager (User machine)Manage store product Store manager (User machine)Manage branch Company manager (User machine)UpdatetoPOST N/AUpdatetoHeadOffice N/AMain database Database server (Head office and store)Backup database Back up server (Head office and store)
Mapping - Mapping requirement to architecture
27
Requirement Architecture
UC1.1 Module View (Data Model)UC1.2 Module View (Data Model)UC1.3 Module View (Data Model)UC2.0 C&C view [shared data combine client-server (Packet 3: Manage member information(UC2.0
UC2.5)); Multi-tier style]Allocation view [deployment view (Member manager works at Head office)]Module View (Data Model), Module View (layered style combine use style)
UC3.1 Module View (Data Model), Module View (layered style combine use style)C&C view [shared data combine client-server (Packet 3: Manage member information (UC2.0 UC2.5)); Multi-tier style]Allocation view [deployment view (Store manager and cashier work at store)]
UC4.0 Module View (Data Model), Module View (layered style combine use style) Allocation view [deployment view (Head office administrator works at Head office)]C&C view [Multi-tier style]
UC5.0 Module View (Data Model), Module View (layered style combine use style)C&C view [shared data combine client-server (Packet 4: Manage product (UC7.0 UC7.6), manage product type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3));Multi-tier style] Allocation view [deployment view (Store manager works at store)]
UC6.0 Module View (Data Model), Module View (layered style combine use style)C&C view [shared data combine client-server (Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1)); Multi-tier style] Allocation view [deployment view (Store manager works at store)]
Mapping - Mapping requirement to architecture
28
Requirement ArchitectureUC7.0 Module View (Data Model), Module View (layered style combine use style)
C&C view [shared data combine client-server (Packet 4: Manage product (UC7.0 UC7.6), manage product type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3)); Multi-tier style] Allocation view [deployment view (Product manager work at Head office)]
UC8.0 Module View (Data Model), Module View (layered style combine use style)C&C view [shared data combine client-server (Packet 4: Manage product (UC7.0 UC7.6), manage product type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3)); Multi-tier style] Allocation view [deployment view (Product manager work at Head office)]
UC9.0 Module View (Data Model), Module View (layered style combine use style) C&C view [Multi-tier style] Allocation view [deployment view (Company manager work at Head office)]
UC10.1 Module View (layered style combine use style)C&C view [shared data combine client-server (Packet 3: Manage member information (UC2.0 UC2.5) ; Packet 1: Manage sale (UC3.1); Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1));Multi-tier style]
UC10.2 Module View (layered style combine use style)C&C view [shared data combine client-server (Packet 3: Manage member information (UC2.0 UC2.5); Packet 4: Manage product (UC7.0 UC7.6), manage product type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3));Multi-tier style]
UC11.1 Module View (Data Model), Module View (layered style combine use style) C&C view [shared data combine client-server (Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1)); Multi-tier style]Allocation view [deployment view (Company manager work at Head office)]
Mapping - Mapping requirement to architecture
29
Requirement Architecture
QP01 C&C view [shared data combine client-server (Packet 3: Manage member information (UC2.0 UC2.5)]
QP02 C&C view [shared data combine client-server (Packet 3: Manage member information (UC2.0 UC2.5)]
QP03 C&C view [shared data combine client-server (Packet 1: Manage sale (UC3.1)]
QP04 C&C view [shared data combine client-server (Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1))]
QP05 C&C view [shared data combine client-server (Packet 3: Manage member information (UC2.0 UC2.5) ; Packet 1: Manage sale (UC3.1); Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1))
QP06 C&C view [shared data combine client-server (Packet 3: Manage member information (UC2.0 UC2.5); Packet 4: Manage product (UC7.0 UC7.6), manage product type (UC8.0 UC8.5) and manage store’s product (UC5.0 UC5.3));
Mapping - Mapping requirement to architecture
30
Requirement Architecture
QP07 C&C view [shared data combine client-server (Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1))]
QA01 C&C view [shared data combine client-server (Packet 1: Manage sale (UC3.1)] Allocation view [deployment view (Backup server at each store and Head office)]
QA02 C&C view [shared data combine client-server Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1))]Allocation view [deployment view (Backup server at each store)]
QA03 C&C view [shared data combine client-server Packet 2: Manage store statistic (UC6.0 UC6.2), Manage company statistic (UC11.1))]Allocation view [deployment view (Backup server at each store and Head office)]
???31
Thanks for listening
32