The Mobile LOB Accelerator 2008 is an enterprise mobile application demonstrating how a mythical hardware distributor could use Windows Mobile devices to support the sale and distribution of hardware goods. This blog entry looks at the architecture being used.
The new infrastructure architecture is much more complex than the original Mobile Line of Business Accelerator (see figure 1). The original version used Merge Replication and talked to MapPoint. The new version is a multi-tiered solution. It requires the end-users to have Windows Mobile devices although both Professional and Standard is support from a single code base. The devices while self contained needs to occasionally interact with three services Virtual Earth, sync services and push email in the form of Exchange.
Figure 1 - Solution Architecture
An IIS server runs a web services for synchronizes data to SQL Server using the new ADO.Net for Devices. This replaces Merge Replication although if you look through the code you can see where we upgraded Merge Replication using a sync client metaphor.
The Exchange server is an optional server component for pushing notification out to devices to let them know that data is available for synchronization. This notification uses email and Exchange Active Sync to let devices know that data is available for synchronization. This gets around having to poll the sync server and saves resources and bandwidth from unnecessary synchronizations.
The client code is partition along lines similar to most applications. There is the UI, application logic (services and entities) and a data layer.
Figure 2 - Client Architecture
When the team started this project one of the goals was to show the power of this type of client architecture. So the team worked hard to maintain the original interfaces between the UI and application logic. This allowed for totally re-factoring the data layer without recoding the UI. Similarly moving from Merge Replication late in the project to Sync Services had little impact on the UI.
As an enterprise application the solution consists of multiple projects. A lot of these projects were done to allow for re-use by the community including
- ctlSignatureCapture – this is a UI control for capturing a signature during the delivery process.
- Launcher – this is an application used to speed up the user’s experience of launching the application.
- Microsoft.Mobile – a set of classes for accessing data by the business layer.
- StoreAndFwdTransport – classes used by Windows Communication Foundation to push notifications to the device to perform synchronization.
So if you do not need the functionality you do not need to reference or include these projects. For example if you do want to use the store and forward communication to push out notifications in your applications leave out the StoreAndFwdTransport. Similarly if your mobile application is small you might not need to use Launcher.
The remaining projects are specific to the solution and include
- HardwareDistributor – this is the actual mobile client and supports all the roles within the organization that require the client.
- HardwareDistributorSyncServices – this is the code required to synchronize the client side database with SQL Server and uses the new ADO.Net for Devices
- HardwareDistributorCab – an installation project for building a CAB file for installation on the device.
Hopefully this gives you more information about what was built and directions for your own development projects.