Customization

The Dovetail Mobile Agent deployment includes source code, tests, and build automation for developers wishing to customize the web application.

Tooling Requirements

Developers will need Visual Studio 2010 and a good comfort level with C# and an understanding of Model View Controller (MVC) architecture.

Important: Before opening the Dovetail Mobile Agent solution located in the source directory you will need to run the ASP.NET MVC Installer.

Source Code

The source code and Visual Studio solution for Dovetail Mobile Agent can be found in the source subdirectory where you installed Dovetail Mobile Agent.

Customization

We have a created two customization extension points to assist you in keeping your customizations separated from baseline Dovetail Mobile Agent code. These conventions are in place to help make it easier to see the differences between baseline Dovetail Mobile Agent code and your customizations. They should also make it a bit easier to upgrade your customizations if future versions of Dovetail Mobile Agent should modify the code your customizations are based on. In addition it is possible to customize the application Master page to brand Dovetail Mobile Agent to better suit your organization and to include alternate stylesheets and javascript files.

Customizing Views

The simplest customization would be View customization. If you do not like how a view is rendered you can customize the view creating an alternate copy of the view in a CustomViews directory which mirrors the baseline Views directory. When a custom version of a view is present it will always be used in lieu of the original.

Views for a given controller action can be customized by copying the baseline view into the 'CustomViews\<controller name>' directory. This is easy to do in visual studio doing a Control+Drag of the view you wish to copy into the corresponding custom view directory. For example if you want to customize the look and feel of the CaseSummary view on the Cases controller views you would do the following:


<%@ Page CodeBehind="CaseSummary.aspx.cs" Inherits="Dovetail.Agent.Mobile.CustomViews.Cases.CaseSummary"%>

Customizing Controllers

When you want to add additional information to the Model consumed by an action's view model you will need to customize both the controller and the view. To create a copy of the existing baseline controller suitable for customization you should to do the following:

The controller factory will first look for a controller named Custom before looking for the traditional controller. For example every request to a route having /cases/ will first look for a CustomCasesController and then the CasesController.

Tests

Dovetail Mobile Agent includes the same tests that Dovetail uses to verify the release. We encourage developers that wish to customize Dovetail Mobile Agent to use good testing practices.

Build Automation

Dovetail Mobile Agent uses a tool called NAnt to automate common tasks like compiling code, running tests, and deploying tested code. Helpful batch files are included at the root of the deployment to make it easy to running tests or build a release.

Next

Using Dovetail Mobile Agent

Customization