Building Applications for Mobile Devices with .NET - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Building Applications for Mobile Devices with .NET

Description:

Provides garbage collection, error handling. Security. Provides common ... Mobile designer. Rich device identification. Rapidly develop Mobile Web Applications ... – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 32
Provided by: onlin
Category:

less

Transcript and Presenter's Notes

Title: Building Applications for Mobile Devices with .NET


1
Building Applications for Mobile Devices with .NET
  • Sam S. Gill
  • February 4, 2004
  • Slides are available online at
    online.sfsu.edu/sgill

2
Architecture of the .NET Platform
  • Common Language Runtime (CLR)
  • Manages running code
  • Verifies type safety
  • Provides garbage collection, error handling
  • Security
  • Provides common type system
  • Provides access to system resources
  • Native API, COM interop, etc.
  • A collection of unified classes
  • ASP.NET
  • ADO.NET
  • Enterprise Services
  • System, System.Drawing, System.Web, System.XML,
    etc.

3
Win32 and the .NET Framework
C
Visual J...
Visual Basic .NET
ASP.NET
ADO.NET
Enterprise Services
CLR
Active Directory
MSMQ
COM
IIS
WMI
Win32
4
The .NET Framework
5
Inside the .NET Framework
  • Common Language Runtime
  • The .NET Framework Class Library
  • ADO.NET Namespaces
  • ASP.NET Namespaces

6
Common Language Runtime
7
The .NET Framework Class Library
8
ADO.NET Namespaces
  • ADO.NET implements the following namespaces
  • System.Data namespace
  • System.Xml namespace

9
ASP.NET Namespaces
10
Demonstration Building a Window Application and
a Web Application
  • In this demonstration, you will see how to Build
    a Windows Application
  • You will then see how to use the same code in
    Building a Web Application

11
Demonstration Using Multiple Languages and MSIL
  • In this demonstration, you will see how to use
    multiple languages to develop a Visual Studio
    .NET solution
  • You will then see how to use the Microsoft
    Intermediate Language (MSIL) Disassembler to
    display a portable executable (PE) file

12
Mobile DevelopmentApproaches
  • Application on device
  • Device specific
  • Fewer devices
  • Offline options
  • Richest UI

Smart Device Applications
  • Application on server
  • Runs in browser
  • Many devices
  • Online only
  • Less UI choice
  • Easy to deploy

ASP.NET Mobile Web Applications
13
Introduction to the .NET Compact Framework
  • What Is the .NET Compact Framework?
  • What Is the Architecture of the .NET Compact
    Framework?
  • Comparison of the .NET Compact Framework and the
    .NET Framework
  • Guidelines for Programming .NET Compact Framework
    Applications

14
What is the .NET Compact Framework?
  • The .NET Compact Framework is a program execution
    environment for mobile devices
  • Core functionality
  • Uses Visual Studio .NET tools
  • Provides hardware and platform independence
  • Consistency with desktop programming model
  • Rich enterprise-class data access features with
    ADO.NET
  • Offers secure installation and clean
    uninstallation
  • Debugs remote applications
  • Integrates with XML Web services

15
.NET Compact Framework Architecture
  • Windows UI
  • Standard Windows look and feel
  • Forms-based UI
  • All the standard controls
  • Significant subset for small size
  • XML Web Services
  • Windows NT network integration
  • Data Access
  • Local data (offline)
  • Remote data (online)
  • Simple structured files (text)

16
Comparison of the .NET Compact Framework and the
.NET Framework
  • The .NET Compact Framework supports only a subset
    of the System namespace
  • You can add platform-specific class libraries to
    the .NET Compact Framework
  • The .NET Compact Framework imposes restrictions
    on I/O
  • The .NET Compact Framework uses only socket-level
    APIs for networking
  • The .NET Compact Framework avoids heavy use of
    RAM and CPU cycles

17
Guidelines for Programming .NET Compact Framework
Applications
  • When to Use ASP.NET Mobile Web Applications
  • Code runs on server
  • Supports more devices
  • Requires constant connection
  • When to Use Smart Device Applications
  • Code runs on client
  • Graphically rich environment
  • Requires .NET Compact Framework to be installed
    on the device
  • Can run in a disconnected environment

18
What Are Smart Device Projects?
  • Smart Device Projects are used to develop
    applications that target the .NET Compact
    Framework
  • Supported devices include
  • Pocket PC 2000
  • Pocket PC 2002
  • Pocket PC 2002 Phone Edition
  • Custom-designed embedded devices built with the
    Windows CE .NET 4.1 operating system
  • Supported languages are Visual Basic and C

19
How to Design a Smart Device Application
  • Usability is a key consideration
  • Avoid requiring intensive data entry
  • Provide access to the Software Input Panel (SIP)
  • Enable device hardware buttons
  • Avoid presenting too many options
  • Use large buttons

20
How to Create a Smart Device Application
  • Create a New Smart Device Application Project
  • Choose the platform and type of project
  • Add additional forms, controls, and code

21
How to Test a Smart Device Application
  • Visual Studio .NET 2003 includes device emulators
    that let you test your application
  • Pocket PC 2002
  • Windows CE .NET 4.1
  • You should also test with an actual device
  • Debugging
  • Set breakpoints
  • Step through executing code in emulators or on
    device

22
How to Deploy a Smart Device Application
  • You can use Microsoft ActiveSync from a desktop
    computer to manually deploy applications
  • You can also use automated distribution
    mechanisms such as
  • Downloading CAB files from a Web site
  • Microsoft Systems Management Server (SMS)

23
Demonstration Creating a Smart Device Application
  • In this demonstration, you will see how to create
    a Smart Device application that uses the Soft
    Input Panel (SIP) and SQL Server CE.

24
ASP.NET Mobile Web Applications
  • Components
  • Mobile controls
  • Mobile designer
  • Rich device identification
  • Rapidly develop Mobile Web Applications
  • Powerful and flexible
  • Easy to customize and extend
  • For future devices

25
Mobile Controls
  • Render based on device capabilities
  • Automatically output multiple markup languages
  • Built upon ASP.NET control base classes
  • Common controls
  • Label
  • TextView
  • Link
  • Calendar

26
Extensible Control Model
27
ASP .NET Mobile Web Form Designer
  • Integrated into Visual Studio
  • Code development
  • Debugging
  • Code management
  • Uses familiar (Visual Basic-like) authoring
  • Drag and drop creation of mobile applications
  • Properties and events
  • Allows Web applications to be authored in
    numerous languages

28
Mobile Web Form Designer
29
Device Identification
  • Schema for tracking device capabilities
  • Browser version
  • Markup language
  • Display parameters
  • Resolution
  • Pagination lines
  • Image capabilities
  • Input methods (e.g., number of soft keys)
  • Etc

30
ASP.NET Mobile Web Applications Demo
31
Questions
Write a Comment
User Comments (0)
About PowerShow.com