Contents |
The List service provides the user with the ability to create and maintain phone number lists. These lists contain numbers for use in customer campaigns and serve as a basic addressbook. A Master Do Not Call (DNC) list is also provided. A C# based API has been created to utilize the List service and simplify customer integration. The details of this API are covered in the following sections:
The List service sample API is centered on the ListServiceController class. It is the entry point for customers in which they can call all List service operations by providing their CallFire account key. The Model/View/Controller (MVC) design pattern is well established in the software industry as the preferred means of separating functionality in code. The ListServiceController acts as Controller component of an MVC architecture. It acts as a layer of abstraction surrounding CallFire's List web service. Since the details of the actual web service transactions are hidden from the calling code, developers can quickly integrate their existing applications with CallFire's features. The abstraction may also save time and money should the actual web service parameters change since those details hidden.
All operations are capable of failures due to reasons such as invalid parameters. To gracefully handle errors, the ListServiceException class is thrown from the ListServiceController when the CallFire service encounters a problem. This class derives from the Exception class and allows developers to separate exceptions related to the List service from the rest of the code. This practice ensures exception handling blocks are only trying to respond to their respective errors.
The ListServiceController leverages the ListDTO class as a Data Transfer Object (DTO). The ListDTO class functions as a Model object in a MVC architecture. It stores the basic information regarding the list such as its name and identifier fields. It is used for input and output parameters of the controller's operations. The use of this model object simplifies development and promotes the use of the MVC design pattern.
In a standard MVC architecture, the User Interface (UI) should only execute operations on the controller to perform work. Interacting directly with a database or web service from the UI layer is generally discouraged in the software industry. CallFire provides an ASP.Net sample application featuring C# code behind files which serve as a View layer interacting with the Controller layer. A WinForms sample application will also be provided feature C# code which also interacts with the ListServiceController class. These two sample approaches allow developers to learn how to leverage the functionality provided by the controller and determine how to best create a UI to match the needs of the customer. Documentation for both the ASP .Net and WinForms examples are provided separately. Please consult the respective documentation to learn more details features and requirements.
To aid developers and architects understand the basic architecture of the List service sample application, a Unified Modeling Language (UML) diagram is provided in this section. It is a class diagram depicting the classes mentioned earlier: ListServiceController, ListDTO, and ListServiceException. The ListService class is also contained which is auto-generated by Microsoft's Visual Studio as a means of calling CallFire's web service. This class is often referred to as a Proxy or Stub since it doesn't to perform any processing itself but routes the work to a web service. All of the relationships between these classes are modeled in the diagram below:
