Architecture Design CUSTOMER RELATION MANAGEMENT SYSTEM Version 1.0 Submitted in partial fulfillment of the requirements of the degree of Master of Software Engineering CIS 895 MSE Project Kansas State University Committee Members Major Professor: - Dr. Dan Andresen Dr. Torben Amtoft Dr. Mitchell L. Neilsen 1
TABLE OF CONTENTS 1. Introduction...3 2. Architecture...3 3. Presentation Tier 5 4. Business logic Tier.8 4.1. Class Descriptions..8 4.2. Sequence Diagrams..10 5. Data Tier..14 6. References...15 2
1. Introduction The purpose of this document is to provide an architectural design for Customer Relationship Management System (CRMS). The design will show the presentation tier, the business tier, and the data tier. Each class will have a brief description about its purpose. 2. Architecture of the Customer Relationship Management System The architecture of the Customer Relationship Management System is based on three-tier architecture. There are three logical tiers: the presentation tier, the business tier, and the data tier. Figure 1 Three-tier architecture The presentation tier supplies the user interface on a client machine. The business logic tier contains functional process logic, it communicates between presentation tier and data tier. The data tier, an RDBMS (relational database management system) on a database server contains the data storage logic. 3
The main considerations for choosing three-tier architecture for the Customer Relationship Management System are as follows: Scalability: The key 3-tier benefit is improved scalability since the application servers can be deployed on many machines. Also, the database no longer requires a connection from every client -- it only requires connections from a smaller number of application servers. In addition, can be used to balance loads and dynamically manage the number of application server(s) available. Better Re-use: The same logic can be initiated from many clients or applications. The specific language implementation of the business tier can be made transparent. Improved Data Integrity: since all updates go through the business tier, the business tier can ensure that only valid data is allowed to be updated in the database and the risk of a client application corrupting data is removed. Improved Security: Security is improved since it can be implemented at multiple levels (not just the database). Security can be granted on a service-by-service basis. Since the client does not have direct access to the database, it is more difficult for a client to obtain unauthorized data. Business logic is generally more secure since it is placed on a more secure central server. Reduced Distribution: Changes to business logic only need to be updated on the application servers and do not have to be distributed to all the clients. Improved Availability: mission-critical applications can make use of redundant application servers and redundant database servers. With redundant servers, it is possible to architect an application so that it can recover from network or server failures. Hidden Database Structure: since the actual structure of the database is hidden from the caller, it is possible that many database changes can be made transparently. Therefore, a 4
service in the middle tier that exchanges information/data with other applications could retain its original interface while the underlying database structure was enhanced during a new application release. 3. Presentation Tier The presentation tier contains the UI (User Interface) elements of the site, and includes all the logic that manages the interaction. (ASP.NET Web Forms, Web User Controls, ASP.NET Master Pages). Presentation layer contains pages like.aspx or windows form where data is presented to the user or input is taken from the user. Programmer uses this layer for designing purpose and to get or set the data back and forth. The Visual Studio.NET IDE will be used to create the Web Forms. The table below shows ASP.NET Web forms for users of Customer Relationship Management System: ASP.NET Web Forms Main Page Login.aspx ForgotPwd.aspx Register.aspx Default.aspx Customer Create/ViewTicket.aspx Ticket.aspx HelpDeskUser Create/ViewTicket.aspx Ticket.aspx TechUser Create/ViewTicket.aspx Ticket.aspx Supervisor Create/ViewTicket.aspx Ticket.aspx ManageUser.aspx ManageCategory.aspx MangeSubCategory.aspx Purpose The Web page for user to login. For retrieving the password For registering into CRMS For Redirecting according to roles. The Web page where the Customer can create, update, view. The Web page where Customer can search. The Web page where the HelpDeskUser can create, update, view. The Web page where HelpDeskUser can search. The Web page where the TechUser can create, update, view. The Web page where TechUser can search. The Web page where the Supervisor can create, update, view. The Web page where Supervisor can search. The Web page where Supervisor assigns roles to users The Web page where Supervisor can add a new category. The Web page where Supervisor can add a new subcategory to an existing category. 5
Presentation Tier: Screen Shoots of CRMS. Login Screen 6
Register Screen Create a New Ticket Screen 7
4. Business logic layer or Middle Tier The Business logic layer receives requests from the presentation tier and returns a result to the presentation tier depending on the business logic it contains (C# Classes). Business tier contains business logic, validations or calculations related with the data. This layer is a class which we use to write the function which works as a mediator to transfer the data from Application or presentation layer data layer. In the three tier architecture we never let the data access layer to interact with the presentation layer. 4.1. Class Descriptions The following are the classes involved and relationships between them. 8
4.1.1. User This class represents a user, and handles all user actions. This information is entered by the User at the time of registration. It includes the private methods to verify the login and get the user information. The verify Login method is called when the user clicks the sign in button on the Login.aspx Web form. It returns true if the login is successful, false if it is not. 4.1.2. Role CreateRole () is used to assign a role to a registered user. There are four roles in CRMS. They are Customer, HelpDeskUser, TechUser and Supervisor. The Get_Role method is called when the user role information needs to be displayed. 4.1.3. Ticket This class is used to store complete details about the Ticket. The operations involved with this class are Get Description (), Get Subject () and Ticket (). 4.1.4. Ticket Priority This class is used to get Priority details assigned to the different Tickets. 4.1.5. Ticket Status This class is used to get Status details assigned to the different Tickets. Initially all tickets are assigned a Status as New. Either a TechUser or a Supervisor can change the status. 4.1.6. Category This class is used to create a new category or to get the category for a specified ticket. 9
4.1.7. SubCategory This class is used to create a new sub category under a category or to get the sub category for a specified ticket. 4.1.8. Mail This class is used to create a mail or get details about the mail or send mail to the ticket holder. 4.1.9. MyData This class is used to interact with the database layer. 4.2. Sequence Diagrams 10
11
12
13
5. Data Tier Data Tier is the class which gets the data from the business layer and sends it to the database or gets the data from the database and sends it to the business layer. This layer only interacts with the database. The data tier is responsible for storing the application s data and sending it to the business tier when requested. (SQL Server Stored Procedures) We write the database queries or use stored procedures to access the data from the database or to perform any operation to the database. Usage of stored procedures increases the performance and code transparency of an application. SQL Server is being used for CRMS. Database Tables aspnet_membership aspnet_users aspnet_roles aspnet_userinroles CRMS_Users CRMS_Ticket CRMS_TechUserTicket CRMS_Mail CRMS_Categories CRMS_SubCategories CRMS_Priority CRMS_Status Purpose Represents the Membership information Represents the users information Contains the Different Role Information Contains information about users with their specified role. Detail Information about users Represents the Ticket information Contains information about the tickets assigned to the TechUser. Information required for sending mail to the customer regarding the ticket. Represents the Categories information Represents the SubCategories information Represents the Priority information Represents the Status information 14
5. References Smart draw: http://www.smartdraw.com/ UML: http://en.wikipedia.org/wiki/unified_modeling_language Visual Studio 2010: Database Diagrams Figure 1 Three-tier architecture: http://blog.aggregatedintelligence.com/2009/05/aspnet- 3-tier-diagram-example.html Msdn: http://msdn.microsoft.com/en-us/library/default.aspx Vision Document 2.0 15