Content
u what is the .net framework?
u Mobile Application Developments
u What is the .NET Compact Framework?
u development environment
u.NET Compact Framework 2.0
U FUTURE Windows Mobile Platform
u summary
Momentum Continues To Build ...
Microsoft Strategy
.NET Framework definition
U The .NET Framework IS A New Computing Platform That Simplifies Application Development In The HiGhly Distributed Environment of the Internet
.NET Framework in context
.NET Framework Architecture
Mobile Application Developments
Windows Mobile Device
DEFINITION: Mobile Solution
U Mobile Solutions Are Defined As Any Application That Enables Seamless Computing to Enterprise Applications and Data Regardless of the Type, Quality and Duration of Network Connectivity.
Design Goals
u Target Mobile and Embedded Devices
u portable subset of .net framework
v no new 'Compact' Namespaces
v Visual Basic .NET and C # Compiler Suppirl in V1
u Leverage Visual Studio .NET
v Run management .exes and .dlls Directly
V Debug with Visual Studio .NET
u peacefully co-exist with host os
v Run on native threads, P / Invoke to Call Native Code
What is the .NET Compact Framework?
.NET Compact Framework
u Lightweight Version of .NET Framework
u Designed for Resource-Constrained Devices
u Compatible with vs.net, C #, VB.NET
U Runs Applications Securely on-Device
v High Performance Jit Compiler
V Guarantees Robustness and Security
v hotly intective, offline, and networked experiences
v Makes It Easy to Consume Web SERVICES
u tunable size and performance
.NET Device Programmingtwo Approaches - One Model, One Tool.Net Device Programmingsmart Device Programmability
.NET CF Design Goals
u Compatibility
v strict compatibility with .NET Framework
v subset functionality
u Subset for Devices
v Give the developer a known target
v Enable Skills Andcode Transfer
v size / functionality
Desktop .NET Framework
.NET Compact Framework
Framework size
u Framework size (Ram or ROM)
V ~ 1.5 MB
u Running Ram Needs
V 1 MB (Depends ON App)
U Typical Application Sizes
V 5 - 100 kB
v Apps offsser Due To Use of Platform Features in The Framework
.NET Compact Framework Platform Architecture
.NET CLR Common Features
u verifiable Type Safe Execution
V No Uninitialized Variables, unsafe casts, bad array indexing, bad pointer math
u Garbage Collection
v no reason
u jit compilation
U Error Handling with Exceptions
U Common Type System
v Call, Inherit, And Source-Level Debug Across Different Languages
Compact CLR Differences
u COM Interop
v Good Support for Calling Native DLLS
v Support for calling a com Object through dll wrappers
V no support for Writing a COM / ACTIVEX Object in C # or Visual Basic
u No install-time jit (ngen)
u No Reflection EMIT
u No remoting
v Client Web Services IS Fully Supported
u No generic serialization
v datasets can be serialized to XML
u Subsets of Other Areas of Functionality
The development environment
Creating a Device Project In Visual Studio
U Smart Device Project Type in the New Project Dialogu Select Device Platform and Project Type with the New Project Application Wizard
u New Project Has A Default Set of References That Are Appropriate for Your Platform
u Environment adapts to the new placeform by inspecting references
Writing your application
U Toolbox Has The Device Controls with The Proper Properties and Events
v Devices Look and Feel At Design Time
U IntelliSenseTM targets the .NET Compact Framework and Project References
u Editor underline (Squiggles) Classes and methods That Are Not Available
u Web Services and Web References Fully Supported
v Auto-generated proxy
U Additional Project Properties For Device Projects
Running your application
U Running your application, will automaticly copy it to the device
U Visual Studio Installs The .NET Compact Framework on the device
u Select the deployment device from the device toolbar or project Properties
u Emulator Will Automatically Start IF NEEDED
Emulation
u Robust, Accurate Device Emulation
U Runs Windows® CE Operating System on Windows XP
u Emulates localized version of the overrating system
u CAN add images create in platage builder
u configurable in Device Settings in Tools Options
V Configure Ram Availability
v Map PC Hardware to the emulator
Debugging
u busted features include
V on-device debugging from visual studio shell
v line and data breakpoints
V Multi-language debugging
v Call Stack, Watch Windows
V Command Window - Immediate
u Features Not Supported
v no set next statement
v no native <-> managed unified debugging
v no attach to process
Debugging
Application deployment
u Application Install Uses Windows CE Installer Technology
U Visual Studio Will Auto-Generate Simple Cab Files For Device Installer
v INCLUDE Application and Dependant References
v Does not include the runtime or sql-ce
u Application Install Will Check for The Runtime When Installing
U Temporary Files Are Kept if User Wants To Customize The Cab File Contents
Windows Forms Support
u layout
v manual positioning
u Drawing
V Polygons, Lines, ARCS, Ellipses, Rectangles
v JPEG, BMP image
U TEXT AND 小
v TrueType Bitmap Fonts on Mobile
u Most Desktop Controls
u Designer Support
Supported Controls
Button
Checkbox
ComboBox
ContextMenu
DataGrid
Domainupdown
FileOpendialog
u Supported Controls
Major areas of .net CF
u base classes
U Drawing / Forms
U Data / XML
U XML Web Service Client
Basic Data Types
u base data type it the Same as the desktop
v Formatting
V StringBuilder
V More efficient when string length change
v arrays
v Value Types (INT16, INT32, INT64, UINT16, ETC ...)
v floats and doubles
u Collectes
v classes for Storing Sets of Objects
v ArrayLists and hashtables
Base: networking
u sockets
v Synchronous and askNCHRONUS
V Multiple Protocols
u streams
V Built on top of sockets
v Synchronous and askNCHRONOMS
u http request and response
v Use stream model
v Requires no user knowdge of http
Base: threading
u Applications Start with an inTIAL THREAD
u Applications CAN Start New Threadsu Using Threads
v Responsive UI
v Program Function SegRegation
U Thread Synchronization Primitives
u App Domains exist unTil All Threads exit
Base: Native Code Interop
u managed à native (p / invoke)
v Calls Into EXISTING NATIVE CODE
v .NET Compact Framework Does "Flat" Marshalling of Arguments
v Calling COM Objects in Process
u native à managed
v p / invoke and block
Base: Globalization
u Culture-Correct String Comparist
u Calendar Math
u DateTime and numeric formatting and paarsing
u external data
V EncoDings
u.NET Compact Framework CLR Is Fully Globalized
v Data Tables Are Factored
v can Use Windows CE Tables
Xml
u xmltextReader and xmltextwriter
v Forward-Only Parsers of XML Data
v Better Performance, No in-Memory Caching
V low memory requests
u xmldocument
v Parse Entire Document
V in Memory Traversal
v higher memory; more functionality
Unsupported XML Classes
u xmldatadocument
v RELATIONAL AND HIERARCHIWS OF XML
u xpath
v Query over unstructured XML Data
U XSL / T
v Transform XML Data To Other Forms
U XML Validation
v Verifies Correctness of XML Document
ADO.NET Support
u Handling Data Offline with dataset
u Communicating Dataset with XML
U Common Data Model from Server to PC To Device
u extensible ado.net provider model
U included data providers
v SQL Server (System.Data.sqlclient)
v SQL Server CE (System.Data.sqlServerce)
Web Services Support
u Calling XML Web Servicesu All Encoding Types
u Synchronous and askNCHRONOMS INVOCATION
u Basic and digest authentication
u Secure Sockets Layer Support for Encryption (SSL)
u Custom SOAP Headers
U SOAP EXTENSION FRMEWORK
uHiGhly Reuse
Application deployment
Why not do an "evb 4.0"?
u eVB was adequate for quickly building simple applications, but fell short for larger, more complex applications. The next generation of highly network oriented applications will demand even more functionality and new paradigms.
VB .NET Desktop Differences
u Very Rich Subset, But Some Limitations
v no Implicit late binding
V E.G. DIM X as Object: x.callfoo ()
V No Legacy VB Style File I / O Support
v Use Full .NET File I / O
v no hosting activex controls in forms
V no create activex controls in Visual Basic
VB .NET and C # Native Code Inter-op
u Managed app can use native code (pinvoke)
v Same Syntax as the desktop
v Exposes Rich Windows CE APIS
v Automatically Marshals Simple Data Types
v High Performance, Low Overhead Transitions
u no automatic "com inter-op"
V Create a managed class to walap
u cannot Expose Managed Code to Native Code
U Some Attributes Not Supported
Compatibility and Performance
u Compatible with full .NET Framework
v Interoperability, Protocols
u Compatible with .NET CF 1.0
v Side-by-side execution
v Application Compatibility
u Enhanced Performance
v unified jit
v IMPROVED STRING HANDLING
v XML IMPROVEMENTS
v IMPROVED ADO.NET with SQL Mobile
Displays and layout
u Orientation Support
v Docking and anchoring
v Autoscroll Property - Forms, Panelsv Suspendlayout and ResumeLayout
v Changeorientation - Portrait or Landscape
u resolution support
v Automatic Scaling
v graphics
v dpix
v dpiy
u Data Access
v SQL Mobile
v DataGridView
U TEXTBOX IME SWITCHING
v INPUTMODEEDITOR
u Enable Multiple Menu Items on LEFT SOFTKEY
u Enhanced VB.Net Features
v "my" namespace support
u Enhanced C # Features
v Iterators
v Anonymous methods
U Cross Language Features
v generics
v Partial classes
New Windows Forms Controls
u DateTimePicker
u Monthcalendar
u DocumentList
u linklabel
u notification
u help
u Webbrowser
Windows Forms Features
u Clipboard Support
U Additional Properties, Methods and Events
v Control.doubleClick
v ToolbarButton Tooltips
V More TreeView Events
u Keyboard Support
v form.keypreview
v TabINDEX, Tabstop
System.xml namespace
u improved performance
u Schema Validation Support
V NO DTD Support
u static create method and xmltextReader and xmlTextwriter
u xml processing through xpath
u xmlserialization
System.Messaging Namespace
u support for message queuing
V send and received message
v Inter-Application Communication WITHOUT A LIVE Connection
V Communication Using Unreliable Connections
v Administer, Connect, And Monitor Network Message Queues
FUTURE Windows Mobile Platform
Windows Mobile RoadMap
Visual Studio 2005
u Enhanced Project Wizard
v Target Pocket PC or Smartphone
u enhanced designers
u Emulator Support
v based on arm Processor
V Save Multiple States
u Cab and setup Projects
u integrated device and emulatordebugging
u Remote Tools
v Process Viewer, File Viewer, Heap Walker, And More ...
Emulators
U Build and test applications without a device
v Requires a network connection or loopback adapter
u Smart Device Applications Use a Variety of Windows Mobile Based Emulators
u Visual studio 2005 Automates Debugging and deployment
Native Language Support
u first-class native C support
V MFC 8.0
V ATL 8.0
u One IDE for developing Both Managed and Native Components of An Application
v Debug Mixed Native / Managed Application At the Same Time
Key Features
u Enhanced Services and Device Support
V Messaging - SMS, Poom, And Telephony
v Notifications - Signal, Connections
v location and badra apis
u peripherals support
v MicroDrives, Cameras, Keyboards, Secondary Displays
u Not accessible through the net cf 2.0
v Apis embedded in Operating system
v Accessed through fortcoming SDK
Managed APIS
u Pocket Outlook Object Model (POOM)
v Managed Access to Pim Objects
v Contacts, Tasks, Appointments
u Mapi and SMS
v senting and receiving email and sms
v Receiving SMS Is A Filter Based System
u Telephony
V Make Phone Calls
v Display Call log
Pocket Outlook Listing Appointments
SMS Messagingsending a message
u Easier tour
u Similar to Winsock API
u just create sms object and send
Location Services Microsoft Location Server Overview
Location ServicesMicrosoft Location Server
u acquires real-time location information from operator networks. INFORMATION
v Where am i? Where are my askDIES? Where are my assets?
U Complements Microsoft's MapPoint Web Service
u Hosted by your Enterprise, Not Microsoft
v Enterprise Controls Security and Privacy Policy
v Opt-in model
v allows end-users to become invisible
v end-users receive notifications when the isy areadlocation Services Web Service API
u Use to build location-enabled applications
u Used in ConjunctionWith Mappoint Web Service
Notifications Broker Unified State & Notification Architecture
u provides light-weight mechanism for storing state
v Device, Application, And Service State
v Simplified Access to State Properties
v extensible architecture for add third party state printies
u Supports Multiple Devices
v Pocket PC
v smartphone
Notifications Broker Development Scenarios
u register for notifications
v you choise the notifications to which you respond
u examples
v Connect to a Server When GPRS IS AVAILABLE
v INITIATE A SYNCHRONIZATION EVENT
v when Fast Connectivity Is Available
v Synchronize Offline Store
v when Device is cradled
v Persist Application Settings Across Sessions
v Respond to low battery Notification
v Schedule Device Management Behavior
u create Custom Notification Events
Summary
Summary
u Leverage your knowledge and build device apps!
V Desktop Framework & Tools
v .Net Languages (C #, VB .NET)
u Choose the appropriate project template
u Compile, Debug, And Deploy in Visual Studio .NET
u Web information:
v http://msdn.microsoft.com/mobility
v http://www.microsoft.com/mobile
v http://msdn.microsoft.com/smartclient/understanding/netcf/faq/default.aspx
u newsgroup:
v Microsoft.public.dotNet.Framework.comPactFramework
U THANKS!