Developing Mobile Applications Using the .NET Compact Framework A Case Study

1 / 37
About This Presentation
Title:

Developing Mobile Applications Using the .NET Compact Framework A Case Study

Description:

... were taken via a paper-based Order Sheet' customized to the store/location. ... Maintain chain/location product control in a familiar format. ... –

Number of Views:205
Avg rating:3.0/5.0
Slides: 38
Provided by: cnydeve
Category:

less

Transcript and Presenter's Notes

Title: Developing Mobile Applications Using the .NET Compact Framework A Case Study


1
Developing Mobile Applications Using the .NET
Compact FrameworkA Case Study
Tom Kopcik MCSD, MCDBA, MCTS, MCT Software
Engineer/Trainer PTSI
2
Agenda
  • Application Requirements/Challenges
  • Solution Architecture
  • Compact Framework Development Concepts
  • Best Practices
  • Whats New in the Compact Framework 2.0

3
Agenda
  • Application Requirements/Challenges
  • Solution Architecture
  • Compact Framework Development Concepts
  • Best Practices
  • Whats New in the Compact Framework 2.0

4
Resources
  • Quick Poll
  • In what year did your primary personal computer
    have approximately the following specifications
  • 400 MHz Processor
  • 64 MB RAM
  • 9600 Baud Modem
  • Storage 22MB

5
Resources
  • Quick Poll
  • In what year did your primary personal computer
    have approximately the following specifications
  • 400 MHz Processor
  • 64 MB RAM
  • 9600 Baud Modem
  • Storage 22MB
  • This IS a typical resource set for a Pocket PC

6
The Company River Valley Foods
  • Regional food distributor
  • Stock major frozen food ice cream brands (2500
    SKUs)
  • Orders were taken via a paper-based Order Sheet
    customized to the store/location.
  • Deliver to major supermarkets, drug stores, and
    independents in Upstate New York Pennsylvania
  • Before completion of the project, the company
    acquired another food distributor with a much
    broader product line (50,000 SKUs). The
    acquired company was utilizing an out-dated and
    unsupportable hand-held UPC scanning device for
    order taking.

7
Application Objectives
  • Initial
  • Automate order taking phase of the sales process.
  • Maintain chain/location product control in a
    familiar format.
  • Allow communication of orders to the central
    warehouse from throughout the entire geographical
    market including numerous rural locations.
  • Minimize hardware ongoing incremental
    communication expense
  • Post Acquisition
  • Extend the application to support UPC scanning

8
Agenda
  • Application Requirements/Challenges
  • Solution Architecture
  • Compact Framework Development Concepts
  • Best Practices
  • Whats New in the Compact Framework 2.0

9
Application Architecture Initial Phase
  • Hardware/OS
  • Pocket PC Application with Compact Framework 1.0
  • Windows Mobile 2003 OS
  • Dell Axim Pocket PC (X5, X50,X51)
  • Use existing cell phones for modem communication
    (9600 Baud)
  • Data Transfer/Storage
  • Plain Flat Text Files minimize bandwidth

10
Application Architecture Post Acquisition
  • Hardware/OS
  • Pocket PC Application with Compact Framework 1.0
  • Windows Mobile 2003 OS
  • Intermec Pocket PC with integrated UPC scanner
  • Phone Modem Communication (9600 Baud)
  • Data Transfer/Storage
  • Flat Plain Text Files
  • File structure extended to support UPC data file
    with incremental update.

11
Agenda
  • Application Requirements/Challenges
  • Solution Architecture
  • Compact Framework Development Concepts
  • Best Practices
  • Whats New in the Compact Framework 2.0

12
Development Environment Tools
Onscreen Device Emulators
ActiveSync/Ethernet
13
Development Tools
  • Visual Studio .NET 2003 used in the project
  • VS 2005 will be discussed later
  • Pocket PC 2003 SDK
  • Installation Sequence uninstall of Visual
    Studio related tools and reinstallation in a
    prescribed sequence recommended by Microsoft
    violate at your risk!
  • http//msdn.microsoft.com/library/default.asp?url
    /library/en-us/dnppcgen/html/devtoolsmobileapps.as
    p

14
Installation Sequence
  • Uninstall all existing tools, SDKs, and emulators
    before proceeding.
  • Install the development tools in the correct
    order
  • Install Microsoft ActiveSync 4.0
  • Install the eMbedded Visual Tools - 2002 Edition,
    Pocket PC 2002 SDK, and Smartphone 2002 SDK
  • Install eMbedded Visual C 4.0 and Service Pack
    4.
  • Install Visual Studio .NET 2003.
  • Install the Pocket PC 2003 SDK Smartphone 2003
    SDK and emulators
  • Developer Resources for Windows Mobile 2003
    Second Edition
  • Install Visual Studio 2005.
  • Install Windows Mobile 5.0 SDKs for PocketPC
    and/or Smarpthone

15
Architecture
Common Language Runtime
.NET Applications
Launch
Application Domain Host
Platform Extension Frameworks
Core Framework
Managed
Native
Execution Engine
Platform Adaption Layer
Host Operating System
Host Operating System Services
Hardware
16
Class Library Support
SQL Server CE and IrDA classes only available in
the .NET Compact Framework
17
Key Differences from the .NET Framework
18
Selecting a Target Platform/Target Device
19
Demonstration Pocket PC Application (Visual
Studio 2005)
  • Set the Target Platform
  • Set the Target (deployment) Device

20
Demonstration Pocket PC Application (Visual
Studio 2005)
  • Hello World/Logon Application
  • Use Visual Studio 2005
  • Target Platform WM 2003
  • Target Device Emulator
  • Target Device Pocket PC WM 2003
  • Establish USB Connection
  • Use ActiveSync Remote Display

21
Agenda
  • Application Requirements/Challenges
  • Solution Architecture
  • Compact Framework Development Concepts
  • Best Practices
  • Whats New in the Compact Framework 2.0

22
Designing Forms for Usability
  • Keep the user interface simple
  • Place frequently used fields at the top of the
    form
  • Show only the most important controls
  • Group controls for related tasks
  • Make labels and prompts short and concise
  • Limit free text entry on devices with no
    keyboards
  • Easy to distinguish controls and icons
  • Predictable and consistent control functions
  • Feedback

23
Soft Input Panel (SIP) Guidelines
  • Design application so it adjusts windows if user
    activates the SIP
  • If you include custom SIP, give users choice to
    select it
  • Place controls where SIP does not hide them
  • Test application to ensure that it works with SIP

24
Designing Controls for Stylus Input
  • Targeting and tapping can be difficult for some
    users
  • Provide larger interface targets to make it
    easier to tap
  • Provide sufficient space between controls
  • Consider supplemental audio or visual feedback
  • Be consistent with touch screen concepts
  • Single tap
  • Tap and hold

25
Debugging a Mobile Device Application
  • Device and desktop applications share the same
    integrated debugger
  • You can debug applications by using the emulator,
    or remotelyactual device runs the application

26
Remote Debugging
  • ActiveSync
  • USB (ActiveSync 3.x/ or ActiveSync 4.0)
  • USB ActiveSync connections are notoriously
    unstable
  • RemoteSync (Ethernet Connection) (ActiveSync 3.x
    only)
  • Must establish USB connection first.
  • TCP/IP transport provides better performance
  • Only Ethernet Connection option available in
    Windows Mobile 5.0/ActiveSync 4.0
  • Does not require an ActiveSync partnership
  • Wireless (801.b/g) strongly recommended

27
Version Platform Compatibility
X Compact Framework included in OSI -
Compact Framework Installable in OS Some
literature suggests this is not possible
28
Agenda
  • Application Requirements/Challenges
  • Solution Architecture
  • Compact Framework Development Concepts
  • Best Practices
  • Whats New in the Compact Framework 2.0

29
Demonstration River Valley Application (Visual
Studio 2003)
  • Use Visual Studio 2003
  • Review Application Architecture
  • Use USB Connection
  • Set up TCP/IP connection (Wireless)
  • CF Subset

30
Agenda
  • Application Requirements/Challenges
  • Solution Architecture
  • Compact Framework Development Concepts
  • Best Practices
  • Whats New in the Compact Framework 2.0/WM5.0

31
Compact Framework 2.0 Whats New
  • Smart Devices that have been upgraded to version
    2.0 of the .NET Compact Frameworks will have the
    following features
  • Performance improvements.
  • Support for Generic classes.
  • Support for COM interop.
  • Improved support for controls.
  • Support for Direct3D and DirectDraw for Mobile
    Devices.
  • http//msdn.microsoft.com/library/default.asp?url
    /library/en-us/dnnetcomp/html/whats_new_netcf2.asp

32
Windows Mobile 5.0 - New
  • Managed Assemblies Direct Managed API
  • Microsoft.WindowsMobile
  • Microsoft.WindowsMobile.Configuration
  • Microsoft.WindowsMobile.Forms
  • Microsoft.WindowsMobile.PocketOutlook
  • Microsoft.WindowsMobile.Status
  • Microsoft.WindowsMobile.Telephony
  • Independent of Compact Framework

33
Windows Mobile 5.0 Remote debugging From Visual
Studio 2005
  • ActiveSync Remote Connections not allowed, must
    use TCP/IP connection
  • Also Pocket PC-side debugging client tools not
    deployed automatically
  • Copy from Program Files\MicrosoftShared\CoreCon
  • ClientShutdown
  • CommanClient2
  • CMaccept

34
Windows Mobile 5.0 Remote debugging from VS 2005
  • Run CommanClient2.exe on Pocket PC
  • Set correct IP Address in Visual Studio
  • Run CMaccept on PocketPC
  • Connect to device from Visual Studio within 3
    minutes
  • Subsequent connections from same instance of
    Visual Studio should be OK
  • http//blogs.msdn.com/vsdteam/archive/2005/04/28/4
    13304.aspx

35
Demonstration Wireless debugging (Visual Studio
2005)
  • Demonstration Wireless debugging (Visual Studio
    2005)

36
UPC Scanning Edition
  • Tried a plug-in scanner (SDIO) on the Dell units
    although it worked it would not stand up to field
    use.
  • Selected a rugged Pocket PC device from Intermec
    (4-5X of the Dell units) with additional
    capabilities
  • Built-in scanner
  • Keyboard
  • Basic application moved to the Intermec device
    with little or no problems.
  • Added UPC and keyboard logic to the program
  • Single program advanced functionality (UPC,
    keyboard) controlled by a configuration file.-

37
Developing Mobile Applications Using the .NET
Compact FrameworkA Case Study
Tom Kopcik MCSD, MCDBA, MCT Software
Engineer/Trainer PTSI
Write a Comment
User Comments (0)
About PowerShow.com