The Application Structure

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The Training Management application is a SharePoint application. This topic discusses its structure, the interactions between components, and the application's classes.

Assemblies

The Training Management application consists of nine .NET Framework assemblies that interact with SharePoint and with Windows Server components. Each assembly corresponds to a Visual Studio project that is found in the Contoso.RI.sln file. The assemblies are the following:

  • Contoso.TrainingManagement.Common. This assembly contains constants that are used throughout the Training Management application.
  • Contoso.TrainingManagement.ServiceLocator. This assembly implements the Service Locator pattern for the components that are provided by Training Management application. For more information about the service locator assembly, see Service Locator Assembly in this guidance. For more information about the service locator pattern, see Service Locator on MSDN.
  • Contoso.TrainingManagement.Web. This project defines the ASPX pages that are used by the Training Management application. It does not have an assembly. The files in this project are included in the Contoso.TrainingManagement project as links.
  • Contoso.TrainingManagement. This assembly defines the data structures and lists that are used by the SharePoint Web site. It also includes presenter helper classes that process the application's ASPX pages. ASPX pages handle HTTP requests by invoking methods of Web presenter classes that validate the input and format the responses.
  • Contoso.TrainingManagement.Repository. This assembly provides business entity and repository classes that act as an interface to the list items stored in SharePoint.
  • Contoso.AccountingManagement. This assembly contains the interface to the financial operations.
  • Contoso.HRManagement. This assembly contains the interface to the human resources (HR) information.
  • Contoso.TrainingManagement.Workflows. This project defines the workflows that are used by the Training Management application. It does not have an assembly. The files in this project are included in the Contoso.TrainingManagement.Workflows.RegistrationApproval project as links.
  • Contoso.TrainingManagement.Workflows.RegistrationApproval. This project is used to package the registration approval workflow as a SharePoint feature in a SharePoint solution.

Structure of the Application

The Training Management application interacts with SharePoint in several ways. Figure 1 illustrates the structure of the Training Management application.

Ff647026.training_manage_structure4(en-us,PandP.10).png

Figure 1
Training Management application assemblies

The preceding diagram is color coded so that you can determine which assembly contains each element of the Training Management application. The Contoso.TrainingManagement.Common and Contoso.TrainingManagement.ServiceLocator assemblies are not shown. They are utilities that are used by all parts of the application. For more information about the service locator, see Service Locator Assembly.

Note

The diagram shows the unit testing domain. This is the set of components for which unit tests have been written. One of the design goals of the Training Management application is to demonstrate how unit testing methodologies can be incorporated into applications that are based on the SharePoint platform. For more information, see Unit Testing in this guidance.

Interactions Between Components

The arrows in the preceding diagram represent method invocations or the initiation of an activity. These interactions are the following:

  • IIS to SharePoint. SharePoint pages are loaded as a result of HTTP requests that are received by Microsoft Internet Information Services (IIS).
  • IIS to Training Management ASPX pages and Web Parts. The Training Management application's ASPX pages and Web Parts are loaded as a result of HTTP requests that are received by IIS.
  • Training Management content definitions to SharePoint. The Training Management application includes content type and list definitions for SharePoint.
  • ASPX pages and Web Parts to Training Management Web presenter classes. The ASPX pages and Web Parts provided by the Training Management application invoke methods of helper classes named presenters. When there is an HTTP request, these methods validate the user input and calculate the HTTP response.
  • Presenter classes to repository classes. Web presenters call methods of the Training Management repository classes. These methods query and update the Training Management application's list of course registrations.
  • Presenter classes to HR management. The application's presenters invoke methods of the HRManagement class to query for human resources data.
  • Presenter classes to Accounting Management. The application's presenters invoke methods of the AccountingManagement class. These methods query and update the accounting database.
  • Repository classes to SharePoint. The repository layer interacts with SharePoint's data store by invoking methods of classes provided by SharePoint.
  • SharePoint to Windows Workflow Foundation. When updates occur in SharePoint, such as the addition of a new registration list item, they trigger event activities in the Windows Workflow Foundation workflow engine.
  • Windows Workflow Foundation to SharePoint. The workflow engine can initiate SharePoint activities. For example, the workflow engine can initiate the creation or deletion of SharePoint tasks.
  • Training Management workflow to Windows Workflow. The Training Management workflow component provides the definition of the workflow rules that are used by the workflow engine. To learn more about the workflow, see Designing the Registration Approval Workflow.
  • Windows Workflow to Training Management workflow. The workflow engine invokes methods of the Training Management workflow classes when events or workflow-initiated activities occur.
  • Training Management workflow to workflow controller class. When processing events or workflow-initiated activities, the application's workflow activities invoke methods of a helper class known as a workflow controller. This division of responsibility is motivated by the unit testing architecture chosen for the Training Management application.
  • Workflow controller class to repository classes. The workflow controller class invokes data access methods that are provided by the Repository classes.
  • Workflow controller class to HRManagement classes. The workflow controller class invokes data access methods that are provided by the HRManagement classes.
  • Workflow controller class to AccountingManagement classes. The workflow controller class invokes data access methods that are provided by the AccountingManagement classes.

Application Classes

This section summarizes the classes that are defined in the Training Management application. Refer to the diagram of the application structure to determine the assembly that contains each class.

ASPX Page Classes

The ASPX page classes are the following:

  • CourseRegistration. This class derives from System.Web.UI.Page. It was created with a Visual Studio designer. It handles ASPX processing for course registrations.
  • RegistrationApproval. This class derives from System.Web.UI.Page. It was created with a Visual Studio designer. It handles ASPX processing for registration approval.

Training Management Web Presenter Classes

The Training Management Web presenter classes are the following:

  • CourseRegistrationPresenter. This class is used when processing a course registration HTTP request. It interacts with the TrainingCourseRepository and RegistrationRepository classes to validate user input and format the HTTP response.
  • RegistrationApprovalPresenter. This class is used when processing a registration approval HTTP request. It interacts with the TrainingCourseRepository and RegistrationRepository classes to validate user input and format the HTTP response.
  • DirectReportsPresenter. This class presents a manager's direct reports using information from the HRManagement component. The DirectReportsPresenter class is used by the DirectReports Web Part that is on the dashboard.
  • TrainingBudgetPresenter. This class presents the training budget for each department based on information from the AccountingManagement component. It is used by the TrainingBudget Web Part that is on the dashboard.

Training Management Repository Classes

The Training Management repository classes are the following:

  • TrainingCourseRepository. This class is the data interface to the list of training courses.
  • RegistrationRepository. This class is the data interface to the list of registration requests.
  • ListItemRepository. This class is a helper class that simplifies the calls that modify SharePoint list items.

Training Management Workflow Controller Class

The RegistrationApprovalWorkflowController class provides the business logic that controls the workflow for registration approvals.

Training Management Workflow class

The RegistrationApprovalWorkflow class is a subclass of the **SequentialWorkflowActivity class, which is provided by Windows Workflow Foundation. This class contains methods created by the workflow designer hosted in Visual Studio and programmer-written code that invokes methods of the RegistrationApprovalWorkflowController class **to handle the execution of workflow activities.

HR Management Class

The HRManager class is the interface to the human resources information.

Accounting Manager Class

The AccountingManager class is the interface to the accounting database.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Footer image

To provide feedback, get assistance, or download additional, please visit the SharePoint Guidance Community Web site.

Copyright © 2008 by Microsoft Corporation. All rights reserved.