REQUEST A DEMO

What Is Under The Hood In Dovetail Mobile?

Dovetail Mobile is our first shipping ASP.NET MVC based application. Because this is a newer technology one of our customers asked for some guidance on customizing the application. The following is a distillation of that guidance which I hope might come in handy for future Mobile customers.

Customizing Dovetail Mobile (Agent Lite)

Dovetail Mobile and its desktop skinned alter ego Agent Lite is a ASP.Net MVC 1.0 application. There are lots of reading and tutorial resources available that will translate directly to understanding how this type of application works and thus how to customize Dovetail Mobile. It is important to understand Model View Controller based web applications to know where the part you wish to change is most likely found.

Controllers

If you need to customize behavior you will likely need to add or modify controllers and their related views.

We provide a place to add customized versions of your controllers. Please take a look at the ReadMe.txt under the controllersCustomControllers directory for guidance on how this hook works. You are not required to put your customization in the custom controllers directory. In other words you could easily modify the baseline code and be fine. We put the custom folder hook in there to help keep customized code sequestered from the baseline.

Mobile uses dependency injection (DI) to make the controller behavior easier to test and thus maintain. The responsibility of creating controller classes and their dependencies is turned over to a tool called StructureMap.  The advantage of having StructureMap handle the complexity of controller creation is in isolation of controllers from their dependencies which in turn facilitates testability and also tends to keep the controllers thin. Elijah Manor has a post on using Structure Map with ASP.Net MVC which shows a pretty similar usage to how we use StructureMap in Dovetail Mobile and links to all sorts of goodness about DI and inversion of control. All things we are big fans of here at Dovetail.

Model

Dovetail Mobile data access is mostly done using Dovetail DataMaps to populate viewmodels which are consumed by by the views. I have already done an introductory post on DataMaps.

Views

Views are organized under the views directory by controller. ViewsCaseCreateNew.aspx – the the location of the view shown when creating a new case. These files contain the the HTML of that to be rendered by that page view. Any changes to view files do not require that you rebuild the application. Each view gets a view model passed to it by the controller.

If you simply want to style the application’s dive into the Content directory for access to CSS and images. I believe we did a pretty good job of providing CSS id/class hooks for you to style the application.

If you are familiar with ASP.Net applications you should be comfortable with the concept of Master Pages. Mobile’s master page is found in the ViewsSharedSite.Master. You’ll notice that there is also an AgentLite.Master file. You can control which master page is used by changing the //pages/masterPageFile attribute of the web.config file. If you change your master file to use the Agent Lite master page you will notice that it works much better with desktop browsers.

Finally

If you are looking for more information on the creation and development of Dovetail Mobile Gary and I have been posting about Mobile for some time check out our respective blogs here and here.