FSTS Software Architecture Document

Purpose
This document provides a comprehensive architectural overview of the system, using a number of different architectural views to depict different aspects of the system. It is intended to capture and convey the significant architectural decisions which have been made on the system.

Definitions, Acronyms and Abbreviations
[This subsection should provide the definitions of all terms, acronyms, and abbreviations required to properly interpret the Software Architecture Document. This information may be provided by reference to the project Glossary.]

Overview
The divides the system into different views. Each view descripbing one aspect of the system.

Use-Case View
This section lists use cases or scenarios from the use-case model that represents a central functionality of the final system. The Use case 1.01 : Manage Client file has been chosen as it is the use case that will occur most frequently.

Fully-Dressed Use Cases for Client File Management
Id : UC1.01

Use Case:  Manage FSTS Client File

Description:  Employee wishes to manage a family's file in the FSTS system.

Level: User-goal

Primary Actor  Employee

Stakeholders and Interests  Family: Their interest is to get confirmation by the Employee that their file is up-to-date with the needed information. Employee: Their interest is to make sure updates and creation of family files have been properly registered in the system. Developer: Their interest is to make sure that file management features properly work.

Pre-Conditions  N/A

<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Post Conditions  N/A

<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Success end condition <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Family file is updated in the FSTS Client Files System

<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Failure end condition <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; color:black">: <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">User (Employee, manager) is notified that the system failed to add family to FSTS Client Files System and is prompted to try again.

<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Minimal Guarantee <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">User is returned to the Main Info page of the FSTS system.

Main Success Scenario
 * 1) <span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Employee requests to manage a family file <span style="font-size:11.5pt;     font-family:"Arial","sans-serif"">
 * 2) <span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Employee searches for a family and finds file for family in question <span style="font-size:11.5pt;font-family:"Arial","sans-serif"">
 * 3) <span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Employee updates wanted information in specific field of the family’s file <span style="font-size:11.5pt;font-family:"Arial","sans-serif"">
 * 4) <span style="font-size:10.0pt;font-family:"Arial","sans-serif"">System notifies employee that family file has been updated <span style="font-size:11.5pt;font-family:"Arial","sans-serif"">
 * 5) <span style="font-size:10.0pt;font-family:"Arial","sans-serif"">System updates current family statistical data throughout the organization

<p style="color: black;"> Extensions

<span style="font-size:10.0pt;font-family:"Arial","sans-serif"; color:black">2. a) System notifies employee that the family file does not exist.

<span style="font-size:10.0pt;font-family:"Arial","sans-serif"; color:black">b) Employee creates a new family file. <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">c) Employee enters all available data in the empty template and submits it. <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">d) System notifies employee that new family has been added to the FSTS system. <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">e) Use Case continues at Step 2.

<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">3. a) Employee needs to add special information to new category or new field of a section of <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">the family’s file <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">b) Employee creates the new category or field of the specific section, and adds the special information <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; color:black">to it. <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">c) System updates its database for the newly added category or field. <span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">d) Use Case continues at Step 4

Special Requirements

<span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">Can register without all info, but missing info is flagged such that empty fields are highlighted. <span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family: "MS Mincho";mso-ansi-language:EN-US;mso-fareast-language:AR-SA;mso-bidi-language: AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">Age and Sex automatically generated with Medicare card number. <span style="font-size:12.0pt; font-family:"Times New Roman","serif";mso-fareast-font-family:"MS Mincho"; mso-ansi-language:EN-US;mso-fareast-language:AR-SA;mso-bidi-language:AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">Automatically flag when multiple entries are made for the same address. <span style="font-size: 12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:"MS Mincho"; mso-ansi-language:EN-US;mso-fareast-language:AR-SA;mso-bidi-language:AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">Automatically flag family file for rehabilitation after certain number of months in the organization (decided by Employee). <span style="font-size:12.0pt;font-family:"Times New Roman","serif"; mso-fareast-font-family:"MS Mincho";mso-ansi-language:EN-US;mso-fareast-language: AR-SA;mso-bidi-language:AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">Event flags are stored in a special separate category, such as “no shows” to events. <span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family: "MS Mincho";mso-ansi-language:EN-US;mso-fareast-language:AR-SA;mso-bidi-language: AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">The family dependencies section should have about 5 to 10 editable categories. <span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family: "MS Mincho";mso-ansi-language:EN-US;mso-fareast-language:AR-SA;mso-bidi-language: AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">All mostly used functions should be accessible from the Main Info page, in forms of tabs. <span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family: "MS Mincho";mso-ansi-language:EN-US;mso-fareast-language:AR-SA;mso-bidi-language: AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">Country selection should be in form of drop-down menu, where employees can add additional countries. <span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family: "MS Mincho";mso-ansi-language:EN-US;mso-fareast-language:AR-SA;mso-bidi-language: AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">Upon entering a family’s postal code, the system will automatically generate the specific city’s district where the family lives. <span style="font-size:12.0pt; font-family:"Times New Roman","serif";mso-fareast-font-family:"MS Mincho"; mso-ansi-language:EN-US;mso-fareast-language:AR-SA;mso-bidi-language:AR-SA"> <span style="font-size:10.0pt;font-family:"Arial","sans-serif"; mso-fareast-font-family:"MS Mincho";color:black;mso-ansi-language:EN-US; mso-fareast-language:AR-SA;mso-bidi-language:AR-SA">Languages will be split into Mother Tongue and Spoken Language, with the capability of adding more mother tongues and keeping the spoken language options to French, English or none. <span style="font-size:12.0pt;font-family:"Times New Roman","serif"; mso-fareast-font-family:"MS Mincho";mso-ansi-language:EN-US;mso-fareast-language: AR-SA;mso-bidi-language:AR-SA">

Use-Case Realizations
This section illustrates how the software actually works by giving a few selected use-case (or scenario) realizations, and explains how the various design model elements contribute to their functionality.



Logical View
This section describes the architecturally significant parts of the design model, such as its decomposition into subsystems and packages. And for each significant package, its decomposition into classes and class utilities.

Overview
The System uses the open-source off the shelf ASP.NET Web Forms web framework as its core architecture for server-side programming. This section describes its components.

The system's web framework overall architecture may be summarize with the following diagram :



(Note : As the ASP.NET MVC package will not be used, it is not going to be described in this document.)

ASP.NET Web Forms
ASP.NET Web Forms is a rich and matured technology for web development on the Microsoft platform. It allows quick development, rich user interface and rapid adaptability by naïve developers. Developers get WYSIWYG kind of designer support right in the development environment

An ASP.NET Web form is composed of two files, one template file that includes the Client Side Code (html, css, and js) and a code-behind file that contains the server side logic. This separation between client-side and server-side code is at the core of the WebForm architecture. Such separation of concern improves the maintainability as well as the understandibility of the whole system/source code.

ASP.NET Framework
The ASP.NET page and controls framework is a programming framework that runs on a Web server to dynamically produce and render ASP.NET Web pages. ASP.NET Web pages can be requested from any browser or client device, and ASP.NET renders markup (such as HTML) to the requesting browser. As a rule, you can use the same page for multiple browsers, because ASP.NET renders the appropriate markup for the browser making the request. However, you can design your ASP.NET Web page to target a specific browser and take advantage of the features of that browser.

ASP.NET Web pages are completely object-oriented. Within ASP.NET Web pages you can work with HTML elements using properties, methods, and events. The ASP.NET page framework removes the implementation details of the separation of client and server inherent in Web-based applications by presenting a unified model for responding to client events in code that runs at the server. The framework also automatically maintains the state of a page and the controls on that page during the page processing life cycle.

The ASP.NET page and controls framework also enables you to encapsulate common UI functionality in easy-to-use, reusable controls. Controls are written once, can be used in many pages, and are integrated into the ASP.NET Web page that they are placed in during rendering.

The ASP.NET page and controls framework also provides features to control the overall look and feel of your Web site via themes and skins. You can define themes and skins and then apply them at a page level or at a control level.

In addition to themes, you can define master pages that you use to create a consistent layout for the pages in your application. A single master page defines the layout and standard behavior that you want for all the pages (or a group of pages) in your application. You can then create individual content pages that contain the page-specific content you want to display. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page.

The ASP.NET page framework also enables you to define the pattern for URLs that will be used in your site. This helps with search engine optimization (SEO) and makes URLs more user-friendly.

The ASP.NET page and control framework is designed to generate HTML that conforms to accessibility guidelines.

The .NET Framework


The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is designed to fulfill the following objectives:
 * To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.
 * To provide a code-execution environment that minimizes software deployment and versioning conflicts.
 * To provide a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party.
 * To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments.
 * To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications.
 * To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code.

The .NET Framework has two main components: the common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that promote security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. The class library, the other main component of the .NET Framework, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services.

The .NET framework also includes the ADO.NET Entity framework. <span style="color: rgb(0, 0, 0); font-family: 'Segoe UI', Verdana, Arial; font-style: normal; line-height: normal; text-align: left; ">The ADO.NET Entity Framework enables developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema. The goal is to decrease the amount of code and maintenance required for data-oriented applications. Entity Framework applications provide the following benefits:
 * Applications can work in terms of a more application-centric conceptual model, including types with inheritance, complex members, and relationships.
 * Applications are freed from hard-coded dependencies on a particular data engine or storage schema.
 * Mappings between the conceptual model and the storage-specific schema can change without changing the application code.
 * Developers can work with a consistent application object model that can be mapped to various storage schemas, possibly implemented in different database management systems.
 * Multiple conceptual models can be mapped to a single storage schema.
 * Language-integrated query (LINQ) support provides compile-time syntax validation for queries against a conceptual model.

Process View
This section describes the system's decomposition into processes (single threads of control) and heavyweight processes (groupings of lightweight processes).

IIS Multitasking Architecture
The System's concurrency requirements can be resolved through the IIS webserver multi-tasking architecture. This section describes how the IIS server processes a web request concurrently.

Components in IIS
IIS contains several components that perform important functions for the application and Web server roles in Windows Server®2008 (IIS 7.0) and Windows Server 2008 R2 (IIS 7.5). Each component has responsibilities, such as listening for requests made to the server, managing processes, and reading configuration files. These components include protocol listeners, such as HTTP.sys, and services, such as World Wide Web Publishing Service (WWW service) and Windows Process Activation Service (WAS).

Protocol Listeners
Protocol listeners receive protocol-specific requests, send them to IIS for processing, and then return responses to requestors. For example, when a client browser requests a Web page from the Internet, the HTTP listener, HTTP.sys, picks up the request and sends it to IIS for processing. Once IIS processes the request, HTTP.sys returns a response to the client browser.

Hypertext Transfer Protocol Stack (HTTP.sys)
The HTTP listener is part of the networking subsystem of Windows operating systems, and it is implemented as a kernel-mode device driver called the HTTP protocol stack (HTTP.sys). HTTP.sys listens for HTTP requests from the network, passes the requests onto IIS for processing, and then returns processed responses to client browsers.

World Wide Web Publishing Service (WWW service)
In IIS 7 and above, functionality that was previously handled by the World Wide Web Publishing Service (WWW Service) alone is now split between two services: WWW Service and a new service, Windows Process Activation Service (WAS). These two services run as LocalSystem in the same Svchost.exe process, and share the same binaries.

How the WWW Service works in IIS7
In IIS, the WWW service no longer manages worker processes. Instead, the WWW Service is the listener adapter for the HTTP listener, HTTP.sys. As the listener adapter, the WWW Service is primarily responsible for configuring HTTP.sys, updating HTTP.sys when configuration changes, and notifying WAS when a request enters the request queue.Additionally, the WWW Service continues to collect the counters for Web sites. Because performance counters remain part of the WWW Service, they are HTTP specific and do not apply to WAS.

Windows Process Activation Service (WAS)
In IIS 7 and above, Windows Process Activation Service (WAS) manages application pool configuration and worker processes instead of the WWW Service. This enables you to use the same configuration and process model for HTTP and non-HTTP sites.

Request Processing in IIS 7
In IIS, the IIS and ASP.NET request pipelines combine to process requests with an integrated approach. The new request-processing architecture consists of an ordered list of native and managed modules that perform specific tasks in response to requests.You can manage all of the modules in one location, instead of managing some features in IIS and some in the ASP.NET configuration. This simplifies the administration of sites and applications on the server.

Application Pools in IIS
Application pools separate applications by process boundaries to prevent an application from affecting another application on the server. In IIS 7 and above, application pools continue to use IIS 6.0 worker process isolation mode.

HTTP Request Processing in IIS
IIS 7 and above have a similar HTTP request-processing flow as IIS 6.0. The diagrams in this section provide an overview of an HTTP request in process. The following list describes the request-processing flow that is shown in the figure above: In a worker process, an HTTP request passes through several ordered steps, called events, in the Web Server Core. At each event, a native module processes part of the request, such as authenticating the user or adding information to the event log. If a request requires a managed module, the native ManagedEngine module creates an AppDomain, where the managed module can perform the necessary processing, such as authenticating a user with Forms authentication. When the request passes through all of the events in the Web Server Core, the response is returned to HTTP.sys. The figure below shows an HTTP request entering the worker process. 
 * 1) When a client browser initiates an HTTP request for a resource on the Web server, HTTP.sys intercepts the request.
 * 2) HTTP.sys contacts WAS to obtain information from the configuration store.
 * 3) WAS requests configuration information from the configuration store, applicationHost.config.
 * 4) The WWW Service receives configuration information, such as application pool and site configuration.
 * 5) The WWW Service uses the configuration information to configure HTTP.sys.
 * 6) WAS starts a worker process for the application pool to which the request was made.
 * 7) The worker process processes the request and returns a response to HTTP.sys.
 * 8) The client receives a response.

Deployment View
This section describes one or more physical network (hardware) configurations on which the software is deployed and run. It is a view of the Deployment Model.



Data View
<p style="font-style: normal;">A description of the persistent data storage perspective of the system.

RDBMS
RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. A Relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd.

What is a table ?
<p style="font-style: normal;">The data in RDBMS is stored in database objects called tables. The table is a collection of related data entries and it consists of columns and rows. A table is the most common and simplest form of data storage in a relational database.

What is a field ?
<p style="font-style: normal;">Every table is broken up into smaller entities called fields. A field is a column in a table that is designed to maintain specific information about every record in the table.

What is record, or row?
<p style="font-style: normal;">A record, also called a row of data, is each individual entry that exists in a table. A record is a horizontal entity in a table.

What is column?
<p style="font-style: normal;">A column is a vertical entity in a table that contains all information associated with a specific field in a table.

What is NULL value?
<p style="font-style: normal;">A NULL value in a table is a value in a field that appears to be blank which means A field with a NULL value is a field with no value. It is very important to understand that a NULL value is different than a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation.

Database Transactions
<p style="font-style: normal;">As the IIS Server architecture supports concurrency, consistency issues may arise. In order to tackle this problem, the System will make the use of Database transactions. This section describes the SQL transaction system A transaction is a unit of work that is performed against a database. Transactions are units or sequences of work accomplished in a logical order, whether in a manual fashion by a user or automatically by some sort of a database program. A transaction is the propagation of one or more changes to the database. For example, if you are creating a record or updating a record or deleting a record from the table then you are performing transaction on the table. It is important to control transactions to ensure data integrity and to handle database errors. <p style="font-style: normal;">Practically you will club many SQL queries into a group and you will execute all of them together as a part of a transaction.

Properties of Transactions:
Transactions have the following four standard properties, usually referred to by the acronym ACID:


 * Atomicity: ensures that all operations within the work unit are completed successfully; otherwise, the transaction is aborted at the point of failure, and previous operations are rolled back to their former state.
 * Consistency: ensures that the database properly changes states upon a successfully committed transaction.
 * Isolation: enables transactions to operate independently of and transparent to each other.
 * Durability: ensures that the result or effect of a committed transaction persists in case of a system failure.

Transaction Control:
There are following commands used to control transactions:

Transactional control commands are only used with the DML commands INSERT, UPDATE, and DELETE only. They can not be used while creating tables or dropping them because these operations are automatically commited in the database. <h4 style="font-style: normal; ">COMMIT
 * 1) <p style="text-align: justify;">COMMIT: to save the changes.
 * 2) <p style="text-align: justify;">ROLLBACK: to rollback the changes.
 * 3) <p style="text-align: justify;">SAVEPOINT: creates points within groups of transactions in which to ROLLBACK
 * 4) <p style="text-align: justify;">SET TRANSACTION: Places a name on a transaction.

The COMMIT command is the transactional command used to save changes invoked by a transaction to the database. The COMMIT command saves all transactions to the database since the last COMMIT or ROLLBACK command. <h4 style="font-style: normal; "> <h4 style="font-style: normal; ">ROLLBACK The ROLLBACK command is the transactional command used to undo transactions that have not already been saved to the database. The ROLLBACK command can only be used to undo transactions.