Export (0) Print
Expand All
6 out of 9 rated this helpful - Rate this topic

Mobile Client Software Factory - July 2006

 

Mobile Client Software Factory – July 2006

patterns & practices Developer Center

patterns & practices Developer Center
Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

July 2006

Summary

The Mobile Client Software Factory provides integrated guidance to help architects and developers create line-of-business Windows Mobile applications that interact with back-end systems over networks such as WiFi and GPRS that might be intermittently available.

A mobile smart client line-of-business application has one or more of the following characteristics:

  • It has a rich user interface that takes advantage of the power of the Windows Mobile device.
  • It might use a gateway server and the most cost effective underlying network technology to connect to and exchange data with multiple back-end systems.
  • It takes advantage of local caching and processing to enable operation during periods of no network connectivity or intermittent network connectivity.
  • It is easily deployed and configured.
  • It helps to keep local, potentially confidential information secure.

The Mobile Client Software Factory provides extensive guidance, including patterns, step-by-step instructions (How-to topics), sample application source code (reference implementation), reusable components (Application Blocks), a Guidance Automation Toolkit package that automates common mobile client development tasks in Visual Studio, and architecture documentation.

In addition, the Mobile Client Software Factory builds on and incorporates the following existing patterns & practices assets:

  • Composite UI Application Block and Data Access Application Block ported into the .NET Compact Framework
  • Guidance Automation Toolkit

Architects can use the Mobile Client Software Factory to create baseline architectures for their organizations. A baseline architecture is a starting point for implementing instances of similar applications —in this case, a mobile application —that includes the most critical mechanisms and shared elements common to those applications. Developers can use the baseline architecture to create mobile client applications in a predictable and agile way, using the Application Blocks and tools provided.

The patterns & practices team used an agile, community-connected process to develop the Mobile Client Software Factory. Incremental code and milestone releases (called Customer Technology Previews, or CTPs) were made available to the community throughout the development of the Factory. The community feedback influenced both the code and the guidance included in this release.

Contents

Overview
Scenarios
Benefits
Contents
Existing patterns & practices Assets
Intended Audience
System Requirements and Installation
Mobile Client Software Factory Features
Getting Started
Community
Future Plans
Feedback and Support
Authors and Contributors
Related Titles

Overview

With the Mobile Client Software Factory, architects and developers can quickly incorporate many of the proven patterns and best practices of mobile client development into their solutions. The factory content guides you through the development of mobile applications, including plug-in-based applications built with the Compact Composite UI Application Block architecture. By using the Mobile Client Software Factory, architects and developers can focus more of their efforts on implementing business requirements, and reduce the risk of creating low-level infrastructure around areas such as connectivity, configuration, or security.

Scenarios

The growing capabilities of mobile devices, such as the Pocket PC, and their increasingly widespread usage within the commercial world, provide an opportunity for business solutions to broaden their reach to include remote and mobile workers. These workers could be sales staff traveling away from the office, goods dispatch workers in a warehouse, or offsite engineers. Any of these workers might require access to the corporate IT system in either a connected or a disconnected scenario.

For example, sales staff may need to check product specifications or delivery schedules while on a customer's premises. This situation suits an occasionally connected model, where the central system updates the data stored on the mobile device at specific intervals, perhaps when the user is in the office each morning or connected from home or a hotel room in the evening. Alternatively, the application could connect over a wireless cellular network or via a public WiFi when these are available. While the user is connected, the device can push updates, such as new orders, back to the back-end servers, and receive new information for the application to use.

Staff working within the corporation premises may also require a mobile solution: for example, when checking stock in a warehouse or assembling orders for dispatch. A connected (online) model suits this scenario. In this scenario, the mobile device could access back-end systems directly by using a Web UI application or via a Terminal Services client. The application, however would not be available if there is some brief interruption of the connectivity.

Offsite engineers may require live data some or all of the time, but might be out of range of the corporate wireless network. In this case, a cellular telephone connection can provide an online experience for periods when required, while an offline model could be suitable for other tasks.

In addition, many users require several applications to be available, and these applications might be dependent on roles defined within the main system, and they might be integrated with a back-end Enterprise Resource Planning (ERP) or Contact Relationship Management (CRM) platforms. All of these factors combine to require something more than simple, individual remote-capable applications. Instead, as demonstrated by the example application shown in Figure 1, businesses require comprehensive, extensible, and flexible mobile business solutions. This example application requires access to information even when disconnected, can present the user with multiple task-oriented user interfaces that integrate with each other, and would be manageable and secured with little or no user intervention.

Ff648751.mobile_intro_01(en-us,PandP.10).gif

Figure 1. An example of a mobile business solution

Figure 2 shows the common elements of a mobile business solution based on the Microsoft Windows operating system and a range of applications and services. The Microsoft platform provides the core features required for all applications, including the tools and code libraries required to build mobile applications and the services that provide data and integration capabilities to these applications. In most cases, complex mobile solutions will integrate with a back-end ERP or CRM system, or other corporate application.

Ff648751.mobile_intro_02(en-us,PandP.10).gif

Figure 2. The base platform, layers, and components of a mobile business solution

The upper section of Figure 2 shows the approach to mobile business solution development that the Mobile Client Software Factory enables. The guidance and application blocks developed by the patterns & practices group, together with code developed by Microsoft partners, implement the services and components for applications running on the mobile client device.

Figure 3 shows the actual architecture of a simple mobile application. The common elements include:

  • User interface layers that consist of the following:
    • Views: controls that appear on the device display
    • Presenters: classes that drive the views
  • Business logic layers that consisting of the following:
    • Business entities: classes that represent business concepts, such as Customer, Bank Account, or Address
    • Business logic components: classes that implement the majority of the business logic within the application
    • Business workflows: logic that drives the overall flow of control within the application
  • Resource and data layers that consist of the following:
    • Data access components, which can fetch data from a local store such as Microsoft SQL Server Mobile Edition, and might use infrastructure components to manage data subscriptions and expirations
    • Service agents, which act as proxies to external Web services and facilitate working in occasionally connected environments

Ff648751.mobile_intro_03(en-us,PandP.10).gif

Figure 3. Common components and layers of a mobile line of business application

Building applications that follow the design and structure shown in Figure 3 requires infrastructure components that implement common tasks. The Mobile Client Software Factory provides many of these infrastructure capabilities, including:

  • Management tasks, such as logging and storing data about instrumentation events, which can then be collected on the server when the device is connected.
  • Deployment tasks that make it easier to deploy applications to the device and to update applications as you add new functionality
  • Configuration tasks that allow the servers to push complex data, such as specific configurations per user or per device
  • Security tasks, such as storing user credentials so that calls to occasionally connected Web Services can be authenticated
  • Connectivity tasks, such as connection and network management features for assessing the current connectivity of the device and reacting to changes in connectivity

You can also use the container model to simplify application architecture and the development of its internal logic. The Mobile Client Software Factory uses the Compact Composite UI Application Block (CAB) as the basis for this container. The CAB included in the Mobile Client Software Factory is an almost exact replica of the CAB that is available for desktop .NET applications, which means that you can take advantage of existing skills and code across both environments.

Architect Scenarios

As a software architect, you want to make sure that your mobile smart client applications derive from a sound, proven practice-based foundation that:

  • Provides a standard approach to application development.
  • Promotes re-usability of common architectural components.
  • Hides complexity.
  • Allows developers to focus on business problems instead of infrastructure components.

The Mobile Client Software Factory provides a starting point for creating that foundation. It provides out-of-the-box implementation of a set of features and mechanisms that are common to mobile applications. Additionally, you can customize and extended it to better fit your specific needs. You can add your patterns, How-to topics, and extend the Guidance Automation Toolkit packages to meet specific requirements for your organization.

Developer Scenarios

As an application developer, you want to focus on the business logic and the user experience of your application. You need a baseline that provides you with the necessary infrastructure and the architecture mechanisms that you need. That baseline is the Mobile Client Software Factory modified and extended by the architect.

You should review the patterns, the How-to topics and the reference implementation to understand the proven practices for developing smart clients. After you are ready to build your application, you can use the Guidance Automation Toolkit packages to generate items such as your initial solution, modules, and service agent.

Benefits

The Mobile Client Software Factory provides the following benefits:

  • Accelerated start. It provides an effective way for architects and developers to create a high-quality starting point (baseline) for their solutions. The baseline includes code and patterns that are typically discovered in Iteration 0, or the inception and elaboration phases, of a project. This means that projects begin with a greater level of maturity than applications developed without source code or guidance.
  • Reduced risk. It provides you with a proven baseline architecture. The baseline addresses the architecturally significant use cases by exposing design decisions and risks early in the development cycle.
  • Increased quality. It provides reusable assets, guidance, and examples that address common smart client scenarios and challenges. The code and guidance have been tested for the target scenarios. Tests are supplied as part of the package and they can be extended and used to automatically verify changes and identify problems.
  • Increased productivity. It includes automation for Visual Studio 2005. With this automation, developers can easily apply guidance in consistent and repeatable ways.
  • Ease of adoption. It is open and customizable. Architects and development leads can customize the factory to meet specific needs. The factory is fully documented.

Contents

The Mobile Client Software Factory contains the following:

  • Documentation (provided in Help format):
    • "Getting Started with the Mobile Client Software Factory." This provides a vocabulary and framework that the remaining documentation uses to describe the mobile client architecture.
    • "The Mobile Client Software Factory Project Scope." This describes the applicable business solutions, purpose, scope, and components included in the Mobile Client Software Factory.
    • "Developing with the Mobile Client Software Factory." This provides information on installing and using the software factory, and includes detailed information on testing your applications.
    • "The Mobile Client Software Factory Application Blocks." This provides a thorough description of the reusable building blocks included in the software factory. The documentation provides detailed information, instructions, and examples for using each of the application blocks.
    • "The Automated Guidance Package." This explains how to install and use the Mobile Client Software Factory automated guidance.
    • "The C# Hello Mobile World QuickStart." This provides step-by-step instructions for using the Compact Composite UI Application Block to build a mobile application in C#.
    • "Visual Basic .NET Hello Mobile World QuickStart." This provides step-by-step instructions for using the Compact Composite UI Application Block to build a mobile application in Visual Basic .NET.
    • "AdventureWorks2Go Reference Implementation." This describes the requirements, architecture, and implementation of the AdventureWorks2Go reference implementation.
  • Reference implementation. The reference implementation is an executable sample application that demonstrates the mobile client guidance in action. You can use the reference implementation to learn how the factory's deliverables are applied, or you can use its concepts and imitate its design in your applications.
  • Guidance package. The Mobile Client Guidance Package automates development activities that developers would usually have to manually perform frequently by following a series of instructions. It helps developers build smart client solutions in a way consistent with the architecture guidance.
  • Application Blocks. The Application Blocks in the Mobile Client Software Factory are:
    • a set of Mobile Application Blocks designed specifically to help you build mobile applications
    • The Mobile CAB and Mobile Object Builder blocks that provide the core features for creating object instances, and instantiating services in a container model.

The fundamental nature of mobile devices, and the kinds of application deployed on them, means that the Mobile Client Software Factory must incorporate several features that are not usually required for desktop or server applications, or that are part of the underlying desktop or server platform. To minimize the memory footprint on the mobile device, the Mobile Client Software Factory exposes these features as separate application blocks that you can install and use in any combination you require. The application blocks provided with the Mobile Client Software Factory are:

  • The Configuration Block, which provides comprehensive features for managing application configuration, including encrypted configuration, on a mobile device
  • The Connection Monitor Block, which monitors and exposes connections between the device and networks and services it uses.
  • The Data Access Block, which provides features to simplify data access code requirements when using the SQL Server 2005 Mobile Edition database
  • The Data Subscription Block, which provides services that simplify setting up and executing SQL Mobile replication subscriptions.
  • The Disconnected Service Agent Block, which provides features for storing offline Web Service requests, and executing them when connectivity is available
  • The Endpoint Catalog Block, which stores and exposes physical address and associated details (including credentials) for remote services to which the device can connect from configuration.
  • The Orientation Aware Control Block, which implements a control that allows you to design your user interfaces to suit different screen orientations, form factors and resolutions, and culture/localization settings of different devices.
  • The Password Authentication Block, which provides the features required to authenticate users manage encryption and secure storage for data

Existing patterns & practices Assets

The factory uses a ported version of the Composite UI Application Block to address the core Client UI patterns —such as composite, provider, event broker and layout management. The Composite pattern combines simple user interface parts to create a complex user interface, while allowing the parts to be independently developed, tested, and deployed. For more information, see the Composite UI Application Block.

The factory also uses modified versions of Enterprise Library to address common challenges such as data access.

The factory uses the Guidance Automation Toolkit to automate common development tasks that simplify the development of templates and recipes. The Guidance Automation Toolkit is a lightweight Visual Studio extensibility mechanism. For more information, see the Guidance Automation Extensions and Guidance Automation Toolkit.

Many patterns implemented in the Mobile Client Software Factory are also available for desktop Smart Clients in the Smart Client Software Factory.

Intended Audience

This guidance is intended for software architects and software developers. To develop using this guidance, you should have an understanding of the following technologies:

  • Microsoft Visual C# or Microsoft Visual Basic 2005
  • Microsoft .NET Framework 2.0 and .NET Compact Framework 2.0
  • Windows Forms
  • Windows Mobile 5.0

Applications built using this guidance will require the .NET Framework 2.0 to run.

System Requirements and Installation

The minimum requirements for satisfactory performance when developing Mobile Client applications are:

  • Using an external device:
    • Windows XP or Windows Server 2003
    • 1.5GHz processor
    • 512 MB memory (1 GB preferable for best performance)
    • 20MB free disk space
    • Pocket PC device with 512 MB memory available
  • Using the Visual Studio Mobile Device Emulator:
    • Windows XP or Windows Server 2003
    • 1.5GHz processor
    • 1 GB memory (2 GB preferable for best performance)
    • 20MB free disk space
Note: The Mobile Client Software Factory is not supported in 64 bit Operating Systems.

Before using the Mobile Client Software Factory, you must install some tools and utilities. The requirements for developing with and using the Mobile Client Software Factory are:

Additionally, you can download the Windows Mobile 6 Developer Resource Kit from http://msdn.microsoft.com/en-us/windowsmobile/bb264329.aspx. This contains:

  • Visual Studio 2005 Professional Edition (90-day trial)*
  • Windows Mobile 6 SDKs for Touch Screen and non-Touch Screen devices
  • ActiveSync 4.5
  • Windows Mobile Device Center for Windows Vista
  • .NET Compact Framework 2.0 Service Pack 2
  • The latest Visual Studio Service Packs
  • SQL Server 2005 Compact Edition Tools and Utilities

Notes:

  • If you install the AdventureWorks Database for the reference implementation, you must have a running instance of SQL Server 2005.
  • If you install the Web service for the reference implementation, you must have IIS 5.0 or IIS 6.0.
  • If you want to run the reference implementation, you must install both the AdventureWorks Database and the Web service for the reference implementation.

The mobile devices tested against the Mobile Client Software Factory, based on their capabilities.

  • Windows Mobile 5 Phone Devices
    • The Cingular 8125 PocketPC phone is a GSM-capable device that has a quarter VGA screen and a slide-out keyboard. It is useful for testing screen orientation changes, and keyboard support. This phone has features that are hard to test with the emulator.
    • The T-Mobile MDA is a GSM-capable device.
    • The Verizon XV6700 (the same as the Sprint PPC-6700) is a CDMA-capable device.
  • Mobile Devices with a Square Display
    • The Palm Treo700w is a Windows Mobile 5.0 phone with a square screen, useful for testing with a square screen and keyboard support. You can also use the equivalent emulator for this type of testing.
    • The HP iPAQ hw6515 phone has a square screen with a keyboard below, but is a Windows Mobile 2003 device.
  • Mobile Devices with a VGA Screen
    • The Dell Axim x51v has a VGA screen.

Mobile Client Software Factory Features

Table 1 lists the features the Mobile Client Software Factory provides guidance for.

Table 1: Guidance for Mobile Client Software Factory Features

Mobile client featuresGuidanceAutomation
Asynchronous communication to Web services, queuing messages, and working offlinePatterns

Reference Implementation

Connection Monitor Application Block
Service Agent Application Block

X
Building complex UIs based on independently developed, tested, and deployed parts (smart parts)Compact Composite UI Application Block

Quickstarts

Reference Implementation

X
Building UIs that are independent of screen sizes, screen resolutions, and screen orientations.Orientation Aware Control Application Block

Reference Implementation

 
Loosely coupled components communicating by way of eventsCompact Composite UI Application Block

Reference Implementation

 
ConfigurationConfiguration Application Block

Reference Implementation

X
Synchronizing reference dataReference Implementation 
Unit testing components on the deviceReference Implementation
TestRunner for Compact Framework
 

Getting Started

The following recommendations allow you to quickly use the guidance in the Mobile Client Software Factory.

To learn about proven practices of mobile client development

  1. Install the Mobile Client Software Factory.
  2. Read the documentation for common patterns.
  3. Review the Reference Implementation.
  4. Read and follow the procedures in the Quickstart examples.

To create a mobile client application

  1. Install the Mobile Client Software Factory.
  2. Use the templates and recipes in the guidance package.
  3. Read and follow the procedures in the Quickstart examples.
  4. Review the Reference Implementation. Use it as a starting point for your own application.
  5. Review the Getting Started section in the documentation. Click Start on the taskbar, click All Programs, click Microsoft patterns & practices, click Mobile Client Software Factory – July 2006, and then click Help.

Community

The Mobile Client Software Factory, like other patterns & practices deliverables, is associated with a community site. On this community site, you can post questions, provide feedback, or connect with other users to share ideas. Community members can download additional content such as extensions and training material, and can also help Microsoft plan and test future offerings.

Future Plans

At the time of publication, no new releases of the Mobile Client Software Factory are planned for 2006. The patterns & practices Client team will start collecting customer feedback immediately after the July 2006 release. This feedback will be incorporated into our product planning process and will be broadly communicated in our community site. The team will also evaluate the opportunity to update the Mobile Client Software Factory as new platform technologies are released. patterns & practices plans are driven by community input, so please participate and help us understand what additional guidance you might need.

Feedback and Support

Questions? Comments? Suggestions? To provide feedback about the Mobile Client Software Factory, or to get help with any problems you encounter while using the factory, visit the Mobile Client Software Factory Community. The message board on the community Web site is the preferred feedback and support channel because it allows you to share your ideas, questions, and solutions with the entire community. Alternatively, you can send e-mail directly to the Microsoft patterns & practices team at devfdbck@microsoft.com, although we are unable to respond to every message.

The Mobile Client Software Factory is a guidance offering, designed to be reused, customized, and extended. It is not a Microsoft product. For more information, see Table 2.

Table 2: Mobile Client Software Factory Attributes

AttributeDescription
SupportCode-based guidance is shipped "as is" and without warranties. Customers can obtain support through Microsoft Support Services for a fee, but the code is considered user-written by Microsoft support staff. The patterns & practices team works with product support and will assist them with escalations as needed. Customers are encouraged to support one another through online communities.
FunctionalityThis guidance provides a flexible and architecturally sound solution to a common enterprise development challenge. The guidance addresses the challenges by using base platform features and adhering to proven practices. The guidance is designed to be extended and customized by users.
ReleaseGuidance releases are typically developed in a 3–6 month life cycle. Assets are released as they become ready on the currently available platform. New versions of existing assets (possibly revised to run on later versions of the platform) are released if there is sufficient customer demand.
CompatibilityCode-based guidance is designed to help solve problems on specific versions of Microsoft products. As the products change, the guidance issued may change or become obsolete. When possible, the patterns & practices team Microsoft develops guidance with future releases in mind. There are no guarantees about compatibility with earlier releases of guidance or with past or future platform releases. A phased migration strategy is recommended, and coexistence of multiple versions of the guidance is given high priority by the patterns & practices team.
Form factorThis guidance is released as source code. Variability is provided through configuration and defined extensibility points, as well as through direct modification of the source code. Documentation focuses on how to use the asset, how to extend it, and the goals, patterns, and tradeoffs that drive its design.

Authors and Contributors

The Mobile Client Software Factory was produced by the following individuals:

  • Program and product management: Per Vonge Nielsen and Eugenio Pace (Microsoft Corporation)
  • Architect: Edward Jezierski (Microsoft Corporation)
  • Development: Francis Cheung (Microsoft Corporation); John Socha-Leialoha; Daniel Cazzulino, Santiago Blason and Jose Salazar (Clarius Consulting / Q4 Tech)
  • Test team: Carlos Farre and Mohammad Al-Sabt (Microsoft Corporation); Rohit Sharma, Terrence Cyril Joseph Anthuvan, Lavanya Selvaraj, Saravanan Marappan, Ritesh Chaturvedi and Benjamin Chou (Infosys Technologies Ltd)
  • Documentation: Alex Homer (Content Master Ltd.); Tina Burden McGrayne (TinaTech, Inc.); Paul Slater (Wadeware LLC); Claudette Siroky (Wadeware LLC)
  • Release management: Sanjeev Garg (Microsoft Corporation)

The Mobile Client Software Factory was developed in collaboration with Microsoft Dynamics Mobile Application Group:

  • Erik Dibbern Röser; Ricky Kaare Rasmussen; Laurent Lopez; Bjarne Schøn and the Mobile and Embedded Devices Group in Microsoft Corporation:
  • Eric Engineer, John Dietz, and Loke Uei Tan

patterns & practices would also like to thank the following expert advisors who provided invaluable assistance throughout the development of the project:

  • Alex Yakhnin (Infusion Development), Andy Wigley (Andy Wigley Computing Ltd), Dan Fergus (Forest Software Group), Daniel Moth (Microsoft UK), Keni Barwick (Conchango), Leandro Olivestro (Q4Tech S.A.), Maarten Struys (PTS Software bv), Nickolas Landry (Infusion Development), and Peter Nowak (T-Systems Enterprise Services GmbH, Germany)

Related Titles

patterns & practices Developer Center

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Show:
© 2014 Microsoft. All rights reserved.