The sample Contacts pluggable module is made of two assemblies: Sample.Contacts and Sample.Contacts.Data. This topic will
focus on explaining what these two assemblies include.
In a sentence: the business logic and User Interface are implemented in the Sample.Contacts module, while the data access is achieved by
the Sample.Contacts.Data assembly. Take a look at the following diagram to see their relations:
Sample.Contacts assembly
There are five main parts of this assembly :
- Web controls - Admin Web controls that provide a way for authorized users to work with Contacts and Public controls which will display the
contacts on the pages
- Resources - all the messages and labels are stored there for facilitating localization
- Contacts Manager - Web controls work exclusively with Contacts Manager when manipulating data
- Contacts Provider - Contacts Manager calls the methods inside of a Provider class. Since there can be more than one provider (for example,
SQL and XML), the Contacts Provider is an abstract class from which the actual provider classes derive. In addition to this, the
Contacts Provider class will be used for retrieving various settings from the web.config file. They are later used by the module
(like paths to external templates).
Both the Contacts Manager and Contacts Provider classes get the needed settings from the web.config file by using
Configuration classes.
Sample.Contacts.Data assembly
There are four main parts of this assembly :
- Contact (DB class) - a Nolics class that defines the database object for storing contacts. The Contact partial class will
be used to add some additional functionality.
- Department (DB class) - a Nolics class that defines the database object for storing departments. The Department partial
class will be used to add some additional functionality.
- Default Provider - this class derives from the Contacts Provider abstract class. It actually implements all the data
manipulation methods (such as inserting a new job, deleting a department, and so on)
- Resources - used mostly to hold error and exception messages in case there is a need to localize the application at a later stage
Next Topic
In the topic Web Control Anatomy you can find the logic behind creating the Web controls. You could read about where
to create controls, how to bind controls to data, and more.