Sample App Campaign Service NET

Contents

Campaign Service

The Campaign Service provides the user with the ability to create and maintain dialing campaigns. These campaigns can contain numbers provided directly or through a previously created list. The sound files to play can be added directly or ids for previously existing sound files can also be specified. A C# based API has been created to utilize operations of the campaign service and simplify customer integration. The details of this API are covered in the following sections:

Video Tutorials

To aid developers with CallFire integration, Devil Dog Software Inc. has created a series of video tutorials. A tutorial demonstrating how to test the CallFire Campaign Service is available on their website at: Tutorials. These videos will show you step by step how easy it is to begin taking advantage of CallFire's powerful services. When combined with the documentation found on this Wiki, you should have all the knowledge necessary to start implementing your own CallFire enabled applications.

Controller Layer

The Campaign service sample API for campaigns is centered on the CampaignController class. It is the entry point for customers in which they can call campaign operations by providing their CallFire account key and required parameters. The Model/View/Controller (MVC) design pattern is well established in the software industry as the preferred means of separating functionality in code. The CampaignController acts as a Controller component of an MVC architecture. It serves as a layer of abstraction surrounding CallFire's Campaign 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 are hidden.

All operations are capable of failures due to reasons such as invalid parameters. To gracefully handle errors, the CampaignException class is thrown from the CreateCampaignController when the CallFire service encounters a problem. This class derives from the Exception class and allows developers to separate exceptions related to campaigns from the rest of their code. This practice ensures exception handling blocks are only trying to respond to their respective errors.

Model Layer

The use of a Model layer within a MVC architecture is a well established practice to separate data storage and transport objects from other functionality. Due to the nature of the campaign operations which focus on byte[] arrays and ids, the CampaignController does not leverage a formal Model layer. Customers should consider the use of model classes though and make an educated decision on what structure is most appropriate for their given situation and needs.

View Layer

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. A WinForms sample application featuring C# code has been created to help developers test their use of CallFire services. The CampaignController has been integrated with this sample application to demonstrate the operations of the Campaign Service. Please consult the documentaton provided in this Wiki to take advantage of this sample UI.

UML Class Diagram

To aid developers and architects understand the basic architecture of the campaign controller, a Unified Modeling Language (UML) diagram is provided in this section. It is a class diagram depicting the classes mentioned earlier: CampaignController and CampaignException. All of the relationships between these classes are modeled in the diagram below:

Source Code