Tải bản đầy đủ (.doc) (54 trang)

Tài liệu CUSTOMER RELATION MANAGERMENT Software Architecture and Detailed Design docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (644.8 KB, 54 trang )

CUSTOMER RELATION MANAGERMENT
S o f t w a r e A r c h i t e c t u r e a n d D e t a i l e d D e s i g n

Project Code: CRM
Document Code: CRM_ Architecture_and_Detailed_Design_v1.0
Hanoi, january 2007
Routepad_Architecture_and_Detailed_Design v1.0
S3I Confidential 2/54/
Routepad_Architecture_and_Detailed_Design v1.0
RECORD OF CHANGE
*A - Added M - Modified D - Deleted
Effective
Date
Changed Items A*
M, D
Change Description New Version
19-Apr-06 A Initial version 1.0
S3I Confidential 3/54/
Routepad_Architecture_and_Detailed_Design v1.0
SIGNATURE PAGE
ORIGINATOR: Phan Xuan Truong 04-Jan-2007
Architecture and Solution Design
REVIEWERS: Phan Xuan Truong 04-Jan-2007
Project Director
Phan Xuan Truong 04-Jan-2007
Project Leader
APPROVAL: Phan Xuan Truong 04-Jan-2007
Project Director
S3I Confidential 4/54/
Routepad_Architecture_and_Detailed_Design v1.0
TABLE OF CONTENTS


1 INTRODUCTION............................................................................................................8
1.1 How this document is organized......................................................................................8
1.2 Purpose..........................................................................................................................8
1.3 Definitions, Acronyms and Abbreviations.........................................................................8
1.4 Referenced Documents...................................................................................................9
2 ARCHITECTURE DESIGN...............................................................................................9
2.1 CRM Overview................................................................................................................9
2.1.1 External/Internal interfaces........................................................................................................9
2.1.2 Constraints and assumptions....................................................................................................10
2.1.3 Transaction management.........................................................................................................10
2.1.4 Connection pooling..................................................................................................................11
2.1.5 The .NET Framework..............................................................................................................11
2.2 CRM System Architecture..............................................................................................13
2.3 Module Hierarchy .........................................................................................................17
2.3.1 CRM Modules...........................................................................................................................17
2.4 Logical View..................................................................................................................17
2.4.1 UI Package..............................................................................................................................18
2.4.2 BO Package.............................................................................................................................19
2.4.3 DAO Package...........................................................................................................................19
2.4.4 Common Package....................................................................................................................19
2.4.5 Controls Package.....................................................................................................................19
2.4.6 System Package......................................................................................................................19
2.5 Deployment..................................................................................................................19
2.5.1 CRM Side.................................................................................................................................19
2.5.2 Other Sides.............................................................................................................................19
2.6 Hardware and Software requirement.............................................................................19
2.6.1 Handheld Device......................................................................................................................19
2.6.2 Software.................................................................................................................................20
S3I Confidential 5/54/
Routepad_Architecture_and_Detailed_Design v1.0

3 DETAILED DESIGN......................................................................................................20
3.1 Detailed Design Methodology........................................................................................20
3.2 Detailed Design Overview.............................................................................................20
3.3 Use Cases View.............................................................................................................22
3.4 Packages......................................................................................................................22
3.4.1 DAO Package...........................................................................................................................22
3.4.2 Business Object Package..........................................................................................................24
3.4.3 UI Package..............................................................................................................................25
3.4.4 Common Package....................................................................................................................26
3.4.5 Controls Package.....................................................................................................................27
3.4.6 System Package......................................................................................................................27
3.5 Exception Handling and Logging...................................................................................28
3.5.1 Exception Handling..................................................................................................................28
3.5.2 Logger....................................................................................................................................29
3.6 Diagrams......................................................................................................................30
3.6.1 Logon......................................................................................................................................30
3.6.2 Route Management.................................................................................................................31
3.6.3 Download................................................................................................................................33
3.6.4 Import Data............................................................................................................................35
3.6.5 Totals......................................................................................................................................36
3.6.6 Setup......................................................................................................................................37
3.6.7 Beginning of Day.....................................................................................................................39
3.6.8 Loads......................................................................................................................................41
3.6.9 Sales.......................................................................................................................................44
3.7 Database......................................................................................................................47
3.7.1 Relationship Diagram...............................................................................................................47
3.7.2 CommProfiles table..................................................................................................................47
3.7.3 Routes table............................................................................................................................47
3.7.4 AppSettings table....................................................................................................................48
3.7.5 SecurityCodes table.................................................................................................................49

S3I Confidential 6/54/
Routepad_Architecture_and_Detailed_Design v1.0
3.7.6 Loads table..............................................................................................................................50
3.7.7 LoadDetails table.....................................................................................................................50
3.7.8 LiquorLicenses table................................................................................................................51
3.7.9 Messages table........................................................................................................................51
3.7.10 Customers table.....................................................................................................................51
3.7.11 Surveys table.........................................................................................................................52
3.7.12 LookUp table.........................................................................................................................52
3.7.13 Vending table........................................................................................................................52
3.7.14 DailyInfo table.......................................................................................................................52
3.7.15 Products table........................................................................................................................53
3.7.16 Expenses table......................................................................................................................53
3.7.17 RouteStop table.....................................................................................................................53
3.7.18 Orders table..........................................................................................................................53
S3I Confidential 7/54/
Routepad_Architecture_and_Detailed_Design v1.0
1 INTRODUCTION
1.1 How this document is organized
Here are brief summaries for the parts of this document:
Part 1: Introduction to the document, purpose, definitions and references
Part 2: Architecture Design
Part 3: Detailed Design
1.2 Purpose
Architecture Design:
Purpose of this document is to provide an architectural overview of CRM system. Through this
document, project team and IT Department can have an overview and understand the whole
system. They can know how CRM system will be developed and which systems CRM will have to
integrate with.
This document also describes all constraints that the design of the system must follow to meet

the business and maintenance requirements.
Detailed Design
This document aims at to describe the details of Classes of CRM application. By studying this
document, project team, developers and related groups can have an overview of the internal of
CRM application and they can have more information to implement CRM application.
1.3 Definitions, Acronyms and Abbreviations
Abbreviation Description
GUI Graphical User Interface
HTTP Hypertext Transfer Protocol
PDA Personal Digital Assistance
CRM Customer Relation Management
S3I Confidential 8/54/
Routepad_Architecture_and_Detailed_Design v1.0
SRS Software Requirement Specification
XML Extensible Markup Language
CF Compact Framework
GUID Global Unique Identifier
FTP File Transfer Protocol
1.4 Referenced Documents
MSDN.NET MSDN for Visual Studio .NET
CRM-SRS-v1.0.doc Functional Specification of CRM application
2 ARCHITECTURE DESIGN
2.1 CRM Overview
2.1.1 External/Internal interfaces
Figure 1. External/Internal interfaces of ROUTEPAD-PDA system
S3I Confidential 9/54/
Routepad_Architecture_and_Detailed_Design v1.0
Component Interface type Connection type
PDA <---> FTP Server Data will be download and upload
via FTP

Network FTP
PDA ---> Printer Data will be print out on paper. Infra, Bluetooth, Serial port
2.1.2 Constraints and assumptions
There are some key requirements and system constraints that have a significant bearing on the
architecture. They are:
1. The server-side system: server will be enabled FTP Server.
2. CRM machine: Window Server 2003,XP OS and MS .NET Framework 1.1.
3. Database of CRM is SQL Server 2000 Service Pack 3
4. Local CRM will be authenticated against the locally stored security code. The locally
security code must be securely stored and should be accessible to users and must not store
in clear text.
5. Sensitive data held on the CRM must be held in such a manner to ensure that the data
is not accessible before a CRM has been successfully authenticated.
6. If we need to scale beyond the target number of CRMs it should be capable of being
scaled by the introduction of further CRM proxy processes and possibly further proxy
machines without requiring code changes to any component.
7. The code dealing with the interaction with user input / output to-and-from the CRM
should be abstracted to allow for the future upgrade to later version of the CRM operating
system and replacement of the CRM hardware.
2.1.3 Transaction management
The ROUTEPAD-PDA is developed using .NET Framework, so we will use manual transaction
provided by ADO.NET. There isn’t complex calculation in Pocket Routepad system so that we
don’t use COM+ as business layer.
ADO.NET provides a powerful manual transaction management mechanism. You have to write
some code to control the how the transaction should perform. That means with ADO.NET you
have a flexible way to manage transaction processing. Transaction object can be passed (by
reference) between method calls to build up a complex process in one transaction. However, it’s
rather complicated to setup a model that is easy for maintenance. Distributed transaction is also
S3I Confidential 10/54/
Routepad_Architecture_and_Detailed_Design v1.0

not supported by ADO.NET.
Logging processing can be embedded into source code quite easily. The .NET Framework
includes classes and data types that make it easy to log trace messages. You can even
implement your own trace listener.
Controlling a transaction through ADO.NET objects results in less efficient locking in comparison
to using explicit transactions in stored procedures. The reason is that an ADO.NET manual
transaction takes at least as many round trips to the DBMS as there are operations to execute
within the transaction in addition to trips that begin and end the transaction.
2.1.4 Connection pooling
Database connection pooling enables an application to reuse an existing connection from a pool,
instead of repeatedly establishing a new connection with the database. This technique can
significantly increase the scalability of an application, because a limited number of database
connections can service a much larger number of clients. This technique also improves
performance, because the significant time which is required to establish a new connection could
be avoided.
In the DPA system, we will use ADO.NET connection pooling mechanism. We don’t need to spend
effort for this module but still have effective features.
By default and implicitly ADO.NET supports connection pooling mechanism. You can configure
minimum and maximum value of your connections to be pooled just by defining some attributes
in the connection string. ADO.NET doesn't throw sqlCeConnection objects away when the Close
or Dispose methods are called. Instead, it returns them to the connection pool. If a future
request for a sqlCeConnection can be satisfied by a pooled connection, ADO.NET recycles that
connection instead of opening a new one. ADO.NET also allows you to control the connection
pool simply by adding values to the connection string.
2.1.5 The .NET Framework
Developers can reuse their knowledge about .Net technology. With code written in .Net,
developers can reuse code and easy to maintain the system.
Shared Code and Increased Efficiency
Because the .NET Compact Framework delivers the same programming model across a range of
devices, it simplifies the process of developing an application that will run on multiple devices.

Much of the core code for an application, such as the business logic, data access layer, can be
shared across multiple devices and the desktop. This greatly increases the efficiency of
S3I Confidential 11/54/
Routepad_Architecture_and_Detailed_Design v1.0
application development.
Easy to reuse code
It is important to note that the .NET Framework does not take the lowest-common denominator
approach used by other device programming platforms. Developers can get broad portability and
reusability by writing to the common programming model, but the .NET Framework is also
designed to be extended with class libraries that expose features unique to a family of devices, or
even unique to a particular device model. This approach allows developers to create the best
possible application experience on each specific device, while reusing skills and code.
Enterprise-Class Features for More Capable Devices
The success of Microsoft Pocket PC devices is growing, in part, because they have the computing
resources necessary to handle sophisticated business applications. The .NET Compact Framework
takes advantage of the Pocket PC platform by providing enhanced frameworks that greatly
simplify the process of developing enterprise applications on Pocket PC devices.
Robust Code, Secure Execution
The .NET Compact Framework offers a robust and secure environment for running client-side
code. The managed code model supported by the .NET Compact Framework increases the
reliability of code, thus reducing software defects. The managed code execution engine ensures
that an ill-behaved application will not be able to "crash" the device. At the same time, the
evidence-based security model built into the .NET Compact Framework ensures that malicious
code will not be allowed to gain access to secure system resources. The security model also
enables software updates to be delivered over the wireless network in a secure way, decreasing
the possibility of a costly device recall.
Great Offline Application Support
With secure client-side code, the .NET Compact Framework enables responsive applications that
can be used offline. This allows a smooth execution despite any intermittent connectivity
problems that might occur when accessing the network. The developer can choose the right mix

of client-side and server-side programming to deliver a rich and always interactive application.
Reduced Cost of Development Creates New Opportunities
This new ease of development provided by the .NET Compact Framework will lead to the creation
of a broad new range of applications and services that will help manufacturers win greater
market acceptance for their mobile devices and create new opportunities for developers. Many
businesses that were unable to afford the cost or special developer training necessary for mobile
S3I Confidential 12/54/
Routepad_Architecture_and_Detailed_Design v1.0
development will be able to develop new mobile applications much more efficiently, which in turn
can help lower their costs of doing business, and increase their market opportunities.
2.2 CRM System Architecture
The architecture of CRM system will be designed to illustrate:
- Transaction Data exchange between Insight host system and CRM machine
- Architecture in CRM machine
From above information and flow constraints:
- CRM client program is built upon .NET Framework 1.1
- The communication via network FTP
- Transaction management mechanism is ADO.NET
We provide the architecture of CRM system as follow:
Figure 2. CRM system architecture
Presentation layer:
Purpose of this layer is for user-interaction. In CRM system, Windows-based GUI application will
be used for most business processes. Built upon System.Windows.Form package from .NET
Framework, the interface is used for inputting complex data and displaying complex views. This
S3I Confidential 13/54/
Routepad_Architecture_and_Detailed_Design v1.0
layer will be containing some business actions that manual data in local database.
Business layer:
The Business layer manages all internal business logic. It will receive data\request from
Presentation, process necessary business logic, access or update data from\to local DB on CRM

Application.
Data layer:
This layer includes storage database, data access components and data conversion sub system
- Data access component: ADO.NET (CRUD Methods – Create – Read – Update – Delete
and orther methods) – Data access logic components retrieve data from database and
save entity data back to the database.Data Access Logic Components also contain any
business logic needed to achieve data – related operations.
- Business Entities components: Data is used to represent real world business entities,
such as products or order.there are numerous ways to represent these business
entities in your application – for example , XML or DataSets or custom object –
oriented classes – depending on the physical and logical design constraints of the
application.
S3I Confidential 14/54/
Routepad_Architecture_and_Detailed_Design v1.0
Figure 3. CRM MVC model
S3I Confidential 15/54/
Routepad_Architecture_and_Detailed_Design v1.0
Figure 4. CRM System Logical Architeture
The CRM System was built exactly to resolve problem dispersion of Business unit,However
database Store require common managerment.For this reason,we have been combined CRM
Architeture Application and XML Web Service base on .NET Framework follow Multi tier
Architeture and MVC model is sensible.
This Model is principle for CRM System.follow this Model:
 Application will resolve business functions,user methods with unique
presentation,application cover work under structure with user.
 XML Web Service,supply Serviceses message- based that be called by Application
through Business Layers tier of Application
CRM System has been built combine of Application components :

S3I Confidential 16/54/

Routepad_Architecture_and_Detailed_Design v1.0
Figure 5. CRM Components Model
 CRM clients Application(Windows forms) : supply Customer Relation Managerment
and Business managerment tools,WareHouse for Enterprise.
 CRM Admin Application(ASP.NET Forms):supply Administrator tools and synthetize
data business Process of Enterprise.
 CRM XML Web Service :supply Services about synchronous data,manipulate so far
with data center
2.3 Module Hierarchy
2.3.1 CRM Modules
Below is the list of functions to be implemented in the application:
- My Informations
- My Customers
- My Quote
- My Order
- My Tasks
- My Products
- My WareHouse
- My Sales
- My Inventory
2.4 Logical View
This session provide an overview of the logical packages of ROUTEPAD-PDA system. Details are
S3I Confidential 17/54/
Routepad_Architecture_and_Detailed_Design v1.0
described in Detailed Design session.
Figure 6. CRM Logical Package
2.4.1 UI Package
This package contains all business object classes which encapsulate business logic of the
application. They will receive requests from Presentation layer, process business logic and call
DAO layer to update/retrieve data to/from CRM Database.

S3I Confidential 18/54/
Routepad_Architecture_and_Detailed_Design v1.0
2.4.2 BO Package
This package contains all business object classes which encapsulate business logic of the
application. They will receive requests from Presentation layer, process business logic and call
DAO layer to update/retrieve data to/from CRM Database.
2.4.3 DAO Package
This package contains classes which will be used for manipulating data on CMR Server.
2.4.4 Common Package
This package contains entity objects which are used for transferring data between internal
modules in CRM program.
2.4.5 Controls Package
This package contains custom controls which are used for specific display purpose. These
controls are consumed by UI components.
2.4.6 System Package
This package contains objects used for logging purpose and objects to download/upload files.
We will use Log4Net to log necessary information for later tracking. This library is open source,
run very fast and reliable.
2.5 Deployment
2.5.1 CRM Side
Packages to be deployed on handheld device:
Package Note
PC CRM Application CRM application running on PC
CRM Database SQL Server 2000 Service Pack 3
2.5.2 Other Sides
N/A
2.6 Hardware and Software requirement
2.6.1 Handheld Device
Configuration Recommended
S3I Confidential 19/54/

Routepad_Architecture_and_Detailed_Design v1.0
CPU Intel Pentium IV
Memory RAM 128 MB and ROM 64 MB
OS Windows Server 2003,WinXP…
2.6.2 Software
Name Purpose
.NET Framework v1.1 Development Framework
SQL Server 2000
Service Pack 3
Used for storing data on local CRM
3 DETAILED DESIGN
3.1 Detailed Design Methodology
In this detailed design document, UML is used as main methodology to illustrate the structure of
ROUTEPAD-PDA application. Diagrams in this document are created in Visual Studio.NET 2005,
Microsoft Visio 2003, and Rational Rose.
3.2 Detailed Design Overview
S3I Confidential 20/54/
Routepad_Architecture_and_Detailed_Design v1.0
Figure 7. ROUTEPAD-PDA Architecture Overview
As described in Figure 4, PDA application will have three layers- Presentation Layer, Business
Layer, Data Access Layer and Value Objects Common package.
• Presentation Layer contains User Graphical Components, UI Process Components
(Form Package).
o User Graphical Components and UI Process Components build screens to
interact with users. They show the information to the user or capture data or
actions from the user to call business layer in order to update into database.
• Business Layers contains all Business Object classes that will encapsulate business
logic of the application. They will receive requests from Presentation layer, process
business logic and call DAO layer to update/retrieve data to/from PDA Database.
• Data Access layer contains classes which will be used for manipulating data on PDA

machine and synchronize data between insight host and PDA Database
S3I Confidential 21/54/
SQL Mobile 2005 Edition
ROUTEPAD-DB
SQL Mobile .NET
Data Provider
Value Objects
Client Side
Server Side
Presentation
Layer
Business
Layer
Data Access
Layer
Data Layer
UI Components
UI Process Components
Business
Workflows
Business
Components
Business Entities
Data Access Logics Components
Insight
Server
PDA
Network FTP
FTP
FTP

Routepad_Architecture_and_Detailed_Design v1.0
• Value Objects classes are used to contain data for transferring between internal
Modules/Layers in PDA application.
3.3 Use Cases View
Figure 8. ROUTEPAD-PDA Use Cases View
3.4 Packages
3.4.1 DAO Package
The base class of DAO package implements common methods to manipulate database. Derived
classes can override those methods if necessary. Below is the specification of DAO base class:
S3I Confidential 22/54/
Routepad_Architecture_and_Detailed_Design v1.0
Figure 9. DAO Class Diagram
No Member Name
Require derived
class to implement Description
1 Conn Connection used to connect to database
No Method Name Description
1 AddNew If necessary Adds a new record
2 Connect No Opens connection to database
3 Close No Close connection
4 Delete If necessary Delete a record
5 ReadAll If necessary Returns all records
6 ReadOne If necessary Reads one record base on identity value
7 Update If necessary Updates a record
Below is description of all classes in DAO package
No Class Name Description
1 CommProfileDAO
Encapsulates methods to interact with CommProfiles data
table.
2 RoutesDAO Encapsulates methods to interact with Routes data table.

3 LoadDAO Encapsulates methods to interact with Loads data table.
4 AppSettingsDAO
Encapsulates methods to interact with AppSettings data
table.
5 LiquorLicenseDAO
Encapsulates methods to interact with LiquorLicenses data
table.
6 SecurityCodeDAO
Encapsulates methods to interact with SecurityCodes data
table.
7 MessageDAO Encapsulates methods to interact with Messages data table.
8 CustomerDAO Encapsulates methods to interact with Customers data
S3I Confidential 23/54/
Routepad_Architecture_and_Detailed_Design v1.0
table.
9 SurveyDAO Encapsulates methods to interact with Surveys data table.
10 LookupDAO Encapsulates methods to interact with Lookup data table.
11 VendingDAO Encapsulates methods to interact with Vending data table.
12 DailyInfoDAO Encapsulates methods to interact with DailyInfo data table.
13 ProductDAO Encapsulates methods to interact with Products data table.
14 ExpenseDAO Encapsulates methods to interact with Expenses data table.
15 RouteStopDAO
Encapsulates methods to interact with RouteStop data
table.
16 OrdersDAO Encapsulates methods to interact with Orders data table.
3.4.2 Business Object Package
The following figure describes the class diagram of Business Objects package
Figure 10. Business Layer Class Diagram
No Member Name
Require derived

class to implement Description
No Method Name Description
1 AddNew If necessary Adds a new record
2 Delete If necessary Delete a record
3 DeleteAll If necessary Delete all records
4 ReadAll If necessary Returns all records base on condition
5 ReadOne If necessary Reads one record base on identity value
6 Update If necessary Updates a record
7 Validate Required Validate data base on business logic
Below is description of Business Objects
S3I Confidential 24/54/
Routepad_Architecture_and_Detailed_Design v1.0
No Class Name Description
1 CommProfileBO
Encapsulates business logic related to communication
profile.
2 RoutesBO Encapsulates business logic related to routes.
3 LoadBO Encapsulates business logic related to load.
4 AppSettingsBO Encapsulates business logic related to application settings.
5 LiquorLicenseBO Encapsulates business logic related to liquor license.
6 SecurityCodeBO Encapsulates business logic related to security code.
7 MessageBO Encapsulates business logic related to message.
8 CustomerBO Encapsulates business logic relates to customer.
9 SurveyBO Encapsulates business logic relates to survey.
10 LookupBO Encapsulates business logic relates to look up.
11 VendingBO Encapsulates business logic relates to vending.
12 DailyInfoBO Encapsulates business logic relates to daily information.
13 ProductBO Encapsulates business logic relates to product.
14 ExpenseBO Encapsulates business logic relates to expense.
15 RouteStopBO Encapsulates business logic relates to route stop.

16 OrdersBO Encapsulates business logic relates to order.
3.4.3 UI Package
The following figure describes the class diagram of UI package
Figure 11. Presentation Class Diagram
No Member Name
Require derived
class to implement Description
S3I Confidential 25/54/

×