Advanced Windows Mobile Development - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Advanced Windows Mobile Development

Description:

Execution will now stop on breakpoints. Demonstration 3. Unit Testing for ... Visit us frequently on MSDN for the latest developer news, samples, videos, etc. ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 21
Provided by: pauli168
Category:

less

Transcript and Presenter's Notes

Title: Advanced Windows Mobile Development


1
(No Transcript)
2
Advanced Windows Mobile Development
  • Maarten Struys
  • Windows Embedded Evangelist
  • PTS Software

3
Agenda
  • Introduction
  • Challenges in Device Development
  • Targeting Multiple Devices
  • Introducing LINQ for Devices
  • Introducing Unit Testing for Devices
  • Conclusions
  • QA

4
IntroductionDeveloping Windows Mobile Apps
  • Use the same development tools as desktop
    developers
  • Visual Studio 2005 Visual Studio 2008 Pro or
    better
  • Install the Windows Mobile 6 SDKs
  • Developer experience identical for desktop and
    Windows Mobile applications
  • Fewer UI controls available
  • Fewer APIs available
  • Target the .NET Compact Framework
  • Highly compatible subset of the full .NET
    Framework

5
The Real ChallengeWindows Mobile Applications
  • Mobile devices introduce new challenges
  • Differences in user input capabilities
  • Differences in display characteristics
  • Differences in feature support
  • Preserving battery life

6
Targeting Multiple DevicesTouch Screen Support
or Not
  • Two philosophies
  • Limit application to common features
  • Advantage Easy to develop
  • Disadvantage Limits user experience
  • Application auto-upgrades
  • Apps basic design supports nontouch-screen
  • App turns on additional features for
    touch-screen
  • Advantage Capitalizes on features of each device
  • Disadvantage More effort to develop

7
Targeting Multiple DevicesAuto Upgrade
Applications
  • Create basic nontouch-screen layout
  • Determine touch-screen support on startup
  • Create additional controls if touch-screen
  • Dont over do it
  • Focus on simplifying existing features
  • Avoid introducing entirely new features
  • Be careful not to change UI too much
  • Should still feel like the same application

8
Demonstration 1
  • Creating an Auto Upgrade Application

9
LINQ for DevicesIntroduction
  • General-purpose query processor built right into
    your favorite programming language
  • Flexible
  • Extensible
  • Familiar SQL-like syntax
  • Easy to use for increased productivity
  • Type safe
  • Syntax check
  • IntelliSense support

10
LINQ for DevicesWhat is supported?
  • Compatible subset of .NET Framework functionality
  • LINQ to Objects
  • LINQ to XML
  • LINQ to DataSets
  • Less than 200K in size
  • Not Available
  • LINQ to Entities
  • LINQ to SQL
  • Expression trees

11
Demonstration 2
  • LINQ for Devices

12
Unit Testing for DevicesIntroduction
  • Unit Testing is a procedure used to validate that
    individual pieces of source code are working
    properly
  • A Unit is the smallest testable part of code
  • In C and VB.NET methods inside classes
  • Calling methods with different parameters and
    examining return values
  • Unit Tests are written by the developer of the
    class

13
Unit Testing for DevicesExecuting Tests and
Viewing Results
  • Unit Tests are started on the development machine
    but will execute on the device
  • Test results are displayed inside Visual Studio
  • Detailed and summary views available
  • Test Lists can be created to logically group unit
    tests together and execute them in one single run

14
Unit Testing for DevicesConnecting to the Device
  • Make sure to have a connection to the device
  • Connect through DMA to the Emulator
  • Connect through ActiveSync / Windows Mobile
    Device Center to a physical device
  • Make sure that your test are deployed to the
    device using test run settings
  • Cant use the device toolbar to select the device
  • Allows you to specify timeouts for tests as well
  • Helps finding connectivity problems or endless
    loops

15
Unit Testing for DevicesDebugging Unit Tests
  • Automatic debugging of unit tests not supported
  • To debug unit tests you need to manually attach
    the debugger
  • Add the following registry value on the device
  • HKLM\SOFTWARE\Microsoft\.NETCompactFramework\Manag
    ed Debugger\AttachEnabled 1
  • Attaching to the debugger
  • Prior to the location where you want to break in
    your test, add the following statementSystem.Dia
    gnostics.Debugger.Break()
  • Start your test
  • When the user break occurs on the device
  • Attach the Visual Studio debugger to the test
    host process on the device
  • Continue running the test on the device
  • Execution will now stop on breakpoints

16
Demonstration 3
  • Unit Testing for Devices

17
Session Summary
  • Developing applications for Windows Mobile
    devices is as easy as developing desktop
    applications
  • Using Visual Studio 2008 Device Developers are
    true 1st class citizens
  • Most of LINQ functionality supported
  • Lightweight implementation of WCF available
  • Unit Testing for Devices
  • Debugging tests is not the best experience right
    now, but we are looking into fixing this

18
Next Steps
  • Meet me in person during the remainder of DevDays
  • Join me and my good friends Jim Wilson and
    Constanze Roman during our preparing for TechEd
    webcast series
  • Check all our blogs for the next appointment
  • Meet us at TechEd USA or TechEd Europe

19
More Information
  • Visit us frequently on MSDN for the latest
    developer news, samples, videos, etc.
  • http//msdn2.microsoft.com/en-us/windowsmobile/def
    ault.aspx
  • Download the Windows Mobile 6 SDKs
  • www.microsoft.com/downloads/details.aspx?FamilyID
    06111a3a-a651-4745-88ef-3d48091a390bDisplayLange
    n
  • Visit My blog for sample code and more
  • http//www.dotnetfordevices.com
  • Visit Jim Wilsons blog for cool WM stuff
  • http//pluralsight.com/blogs/jimw
  • Visit Constanze Romans blog for mobile developer
    news
  • http//blogs.msdn.com/croman

20
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com