Introduction to Windows Mobile Development. Daniel Moth Developer and Platform Group Microsoft UK http://www.danielmoth.com/blog



Similar documents
Considerations for Mobile Application Development

Accelerating Windows Mobile Line of Business Development

Embedded PC The modular Industrial PC for mid-range control. Embedded PC 1

Useful metrics for Interpreting.NET performance. UKCMG Free Forum 2011 Tuesday 22nd May Session C3a. Introduction

MS Active Sync: Sync with External Memory Files

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

Contents. Introduction. Chapter 1 Some Hot Tips to Get You Started. Chapter 2 Tips on Working with Strings and Arrays..

Programming with the Microsoft.NET Framework Using Microsoft Visual Studio 2005 (VB)

IBM WebSphere ILOG Rules for.net

WhatsUp Gold v11 Features Overview

Key Benefits of Microsoft Visual Studio 2008

Microsoft.NET mobiililaitteille:.net Compact Framework

Transition your MCPD Web Developer Skills to MCPD ASP.NET Developer 3.5 (VB)

Building cross-platform Modern Apps: the Design perspective. Amit Bahree, Senior Director,

Objectif. Participant. Prérequis. Remarque. Programme. C# 3.0 Programming in the.net Framework. 1. Introduction to the.

Release Notes FlexPendant SDK Date Table of Content GENERAL Release Information...2. Introduction...2. Installation...

T16 Information on the Go: Mobility Solutions

MS 10978A Introduction to Azure for Developers

Wise Package Studio 8.0 MR1 Release Notes

ADOBE AIR. Working with Data in AIR. David Tucker

Speech as a Service. How to Put Your Speech Solution in the Cloud

Developing Mapping Applications with ArcGIS Runtime SDK for Windows Mobile. Jay Chen Justin Colville

CATALOG OF CLASSES IT and Technical Courses

João Diogo Almeida Premier Field Engineer Microsoft Corporation

Resource Utilization of Middleware Components in Embedded Systems

Course 10978A Introduction to Azure for Developers

Getting Started with Telerik Data Access. Contents

EXAM PRO:Design & Develop Windows Apps Using MS.NET Frmwk 4. Buy Full Product.

DMS Performance Tuning Guide for SQL Server

Practical Performance Understanding the Performance of Your Application

FAQ CE 5.0 and WM 5.0 Application Development

CSC230 Getting Starting in C. Tyler Bletsch

Application manual Robot Application Builder

Cloud-based Data Logging, Monitoring and Analysis

(ENTD361 is highly recommended before taking this course)

Programación de Sistemas Empotrados y Móviles (PSEM)

Kentico CMS 6.0 Performance Test Report. Kentico CMS 6.0. Performance Test Report February 2012 ANOTHER SUBTITLE

CA Plex and Microsoft Windows Presentation

Boost SQL Server Performance Buffer Pool Extensions & Delayed Durability

Automated Performance Testing of Desktop Applications

New Features in XE8. Marco Cantù RAD Studio Product Manager

Xperia TM and apps

An Easier Way for Cross-Platform Data Acquisition Application Development

Interworks. Interworks Cloud Platform Installation Guide

Using SQL Server Management Studio

Monitoring DoubleTake Availability

Developing Microsoft SQL Server Databases (20464) H8N64S

Introducing Windows Workflow Foundation. Building Basic Activities. Building Composite Activities. Activity Development Advanced Features

Administrator s Guide to deploying Engagement across multiple computers in a network using Microsoft Active Directory

High Frequency Trading and NoSQL. Peter Lawrey CEO, Principal Consultant Higher Frequency Trading

SplendidCRM Deployment Guide

Microsoft Corporation. Project Server 2010 Installation Guide

Beginning C# 5.0. Databases. Vidya Vrat Agarwal. Second Edition

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

Java Garbage Collection Basics

Upgrading a Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 Database to Microsoft Dynamics NAV 2015

C#5.0 IN A NUTSHELL. Joseph O'REILLY. Albahari and Ben Albahari. Fifth Edition. Tokyo. Sebastopol. Beijing. Cambridge. Koln.

Getting Started with the LabVIEW Mobile Module Version 2009

10978A: Introduction to Azure for Developers

Develop Once, Deploy Anywhere

System Requirements for Microsoft Dynamics NAV 2013 R2

Sitecore Health. Christopher Wojciech. netzkern AG. Sitecore User Group Conference 2015

Cross-Platform Mobile Apps Solution

Performance Test Report KENTICO CMS 5.5. Prepared by Kentico Software in July 2010

70-487: Developing Windows Azure and Web Services

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation

David Chou. Architect Microsoft

Dell Spotlight on Active Directory Deployment Guide

Catálogo de cursos plataforma elearning Microsoft Imagine Academy: Microsoft SQL Server y Visual Studio

Programming in C# with Microsoft Visual Studio 2010

A lap around Team Foundation Server 2015 en Visual Studio 2015

Microsoft Office Programs and SharePoint Products and Technologies Integration Fair, Good, Better, Best

SQL Server 2005 Reporting Services (SSRS)

01. Introduction of Android

Live Maps. for System Center Operations Manager 2007 R2 v Installation Guide

Introduction to Azure for Developers

Performance Tools for Parallel Java Environments

Introducing the.net Framework 4.0

Jonathan Worthington Scarborough Linux User Group

System Requirements for Microsoft Dynamics NAV 2015

QUICK GUIDE FOR. Installing Nokia Connectivity Cable Drivers

Course 5431: Getting Started with Microsoft Office PowerPoint Course 5420: Editing and Proofreading Documents in Microsoft Office Word 2007

CA Nimsoft Monitor Snap

Unisys INFOIMAGE FOLDER ON WINDOWS NT. Connector for Microsoft Exchange. Getting Started Guide

Mobile Operating Systems. Week I

USER GUIDE Deploying Your Application to WinHost

Monitoring.NET Framework with Verax NMS

Xperia TM and apps

simplify monitoring Environment Prerequisites for Installation Simplify Monitoring 11.4 (v11.4) Document Date: January

ASP.NET Overview. Ken Casada Developer Evangelist Developer & Platform Evangelism Microsoft Switzerland

Oracle Corporation Proprietary and Confidential

Transcription:

Introduction to Windows Mobile Development Daniel Moth Developer and Platform Group Microsoft UK http://www.danielmoth.com/blog

Same skills, same tools.net Visual Studio

AGENDA Same tools, same skills, same code.net Differences of NETCF with Full FX The Windows Mobile platform Platform-to-Code Cross-platform assets Windows Mobile Managed APIs

.NET Through The Ages 2002 2003 2005 2006 200? Tool (Visual Studio) VS.NET 2002 VS.NET 2003 VS2005 VS2005 Orcas Language(s) C# v1.0 VB.NET (v7.0) C# v1.1 VB.NET (v7.1) C# v2.0 VB (v8.0) as before C# v3.0 VB9 Framework Libraries NetFx v1.0 NetFx v1.1 (NETCF v1.0) NetFx v2.0 (NETCF v2.0) NetFx v3.0 NetFx v3.5 (NETCF v3.5) Engine (CLR) CLR v1.0 CLR v1.1 (CF CLR v1.0) CLR v2.0 (CF CLR v2.0) as before as before (CF CLR v3.5)

.NET Compact Framework Same IDE Visual Studio Same language features VB and C# only Smaller class library framework Approximately 1/20 th Compact CLR For more info: http://www.danielmoth.com/blog/2005/11/getting-started-with-net-compact.html

Install VS2005 Standard

Framework Compactness No... ASP.NET server Runtime hosting Code access security Binary serialization Reflection.Emit Codedom Configuration Also No... WPF WF LINQ to SQL LINQ to Entities Trimmed namespaces (XSLT), classes (Button.Image), missing method overloads, etc.

Classes Specific to NETCF v1.0 Microsoft.WindowsCE.Forms InputPanel, MessageWindow/Message System.Net.IrDA IrDAXXX EndPoint, Client, DeviceInfo, Listener System.Data.SqlServerCE SqlCeXXXX Command, CommandBuilder, Connection, DataAdapter, DataReader, Engine, Error, ErrorCollection, Exception, Parameter, RemoteDataAccess, Replication, Transaction

Classes Specific to NETCF v2.0 Microsoft.WindowsCE.Forms HardwareButton MobileDevice.Hibernate SystemSettings.ScreenOrientation.WinCEPlatform in v3.5 DocumentList Notification LogFont Microsoft.WindowsMobile.DirectX.Direct3D SqlCeResultSet For more info: http://www.danielmoth.com/blog/2005/08/not-strict-subset.html

Pictorial View of Versions Device Choices 2000 2002 2003 2003 Second Edition Windows Mobile 5 Core OS WinCE 3.0 WinCE 3.0 WinCE 4.2 WinCE 4.2 WinCE 5.0 evc 3 (C++) evc 3 (C++) evc 3 (C++) evc 3 (C++) Better evb 3 (VB) evb 3 (VB) evc 4 (C++) evc 4 (C++) Development VS.NET 2003 VS.NET 2003 VS 2005 (C#, VB.NET) (C#, VB.NET) (C#, VB.NET, C++) MFC 3.0 MFC 3.0, ATL 3.0.NET CF.NET CF SP2.NET CF 2.0 MFC 8.0, ATL 8.0 Richer Platform Capabilities Win32, POOM Active Sync Connection Mgr MAPI OBEX Telephony Enhanced Emulator Configuration Mgr, Bluetooth, SMS VGA (PPC) QVGA (SP) Square Landscape Broad managed code support Notification broker, Location, Camera, SQL CE, D3DM

Windows Mobile 6 Still based on Windows CE 5.0 New Naming scheme Pocket PC -> Classic Pocket PC Phone Edition -> Professional Smartphone -> Standard Improvements for business and consumer users For developer NETCF 2.0 SP1 in ROM Strong Windows Mobile 5.0 compatibility Device Emulator v2.0 + Cellular Emulator + other tools

Windows Mobile vs. Desktop Input Methods Form/Dialog size Navigation between applications App/Form Closing Take Over the Device don t! File System Memory (resource) Constraint Deployment For more info: http://www.danielmoth.com/blog/2005/01/desktop-to-ppc-part.html

I have to understand the platform! Soft Keys Input Methods Smart minimize Wait Cursor

Cross-Platform Assets Don t try your desktop binaries on device TypeLoadException, MissingMethodException Different PKTs Retargetable NETCF binaries can be executed on PC System.Environment.OSVersion.Platform Conditional Compilation Two projects, two outputs, one set of code files Build platform-specific binaries from same source For more info: http://www.danielmoth.com/blog/2004/09/share-code-if-fullframe_17.html

I can leverage my existing code!

Windows Mobile 5.0 / 6 Windows Mobile managed APIs Part of the platform, not part of NETCF Can be used by all versions of the NETCF WindowsMobile.PocketOutlook Edit Contacts, Appointments, and Tasks Control the Messaging application Send SMS and e-mail messages Intercept incoming SMS messages WindowsMobile.Status Query 100+ system properties Get notified of changes WindowsMobile.Configuration Configuration Manager WindowsMobile.Telephony Initiate phone calls WindowsMobile.Forms Contact Picker Dialog Picture Picker Dialog Camera Capture Dialog For more info: http://www.danielmoth.com/blog/2005/07/microsoftwindowsmobile.html

Device-specific libraries State & Notification Broker POOM

Summary Mobility is taking off rapidly! Be part of the game Get a Windows Mobile device Write NETCF applications

Resources Blogs, e.g. Mine http://www.danielmoth.com/blog Newsgroups http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.p ublic.dotnet.framework.compactframework Forums http://forums.microsoft.com/msdn/default.aspx?forumgroupid=11 Libraries Mobile Client Software Factory http://msdn.microsoft.com/mobileclientfactory SDF from OpenNETCF http://www.opennetcf.org/sdf/

Book Soon to be released From Microsoft Press Mobile Development Handbook co-authored with Peter Foot and Andy Wigley http://www.danielmoth.com/blog

2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Backup Slides Advanced topics

Compact CLR Garbage Collector JIT Mark and sweep (not generational) Three phases: Simple, Compact, Full Triggered by: Allocation failure App goes to background 1MB allocation in current versions (750KB in v1.0) Pitching No ngen For more info: http://www.danielmoth.com/blog/2004/12/jit.html

Learn from Smartphone Model Entirely Keyboard driven D-Pad (Left, Right, Up, Down, Enter) Good use of Soft Keys are crucial Controls are stacked Label, LinkLabel, CheckBox, ComboBox, TextBox, DateTimePicker TabIndex, TabStop...or full screen ListView, TreeView, DataGrid

Common Language Runtime Where does garbage come from? Unnecessary string copies Strings are immutable String manipulations (Concat(), etc.) cause copies Use StringBuilder http://weblogs.asp.net/ricom/archive/2003/12/02/40778.aspx String result = ""; StringBuilder result = new StringBuilder(); for (int i=0; i<10000; i++) { result += ".NET Compact Framework"; result += " Rocks!"; } for (int i=0; i<10000; i++){ result.append( ".NET Compact Framework"); result.append(" Rocks!"); }

.stat counter total last datum n mean min max Total Program Run Time (ms) 11843 - - - - - App Domains Created 1 - - - - - App Domains Unloaded 1 - - - - - Assemblies Loaded 2 - - - - - Classes Loaded 175 - - - - - Methods Loaded 198 - - - - - Closed Types Loaded String result 0 = - ""; - - - - Closed Types Loaded per Definition 0 0 0 0 0 0 Open Types Loaded 0 - - - - - Closed Methods for Loaded (int i=0; 0 i<10000; - - -i++) - {- Closed Methods Loaded per Definition 0 0 0 0 0 0 Open Methods Loaded 0 - - - - - Threads in Thread Pool - 0 2 0 0 1 Pending Timers - 0 2 0 0 1 Scheduled Timers 1 - - - - - Timers Delayed by Thread Pool Limit 0 - - - - - Work Items Queued result += 1 " Rocks!"; - - - - - Uncontested Monitor.Enter Calls 2 - - - - - Contested Monitor.Enter Calls 0 - - - - - Peak Bytes Allocated (native + managed) 3326004 - - - - - Managed Objects } Allocated 60266 - - - - - Managed Bytes Allocated 5801679432 28 60266 96267 8 580020 Managed String Objects Allocated 20041 - - - - - Bytes of String Objects Allocated 5800480578 - - - - - Garbage Collections (GC) 4912 - - - - - Bytes Collected By GC 5918699036 1160076 4912 1204946 597824 1572512 Managed Bytes In Use After GC - 580752 4912 381831 8364 580752 Total Bytes In Use After GC - 1810560 4912 1611885 1097856 1810560 GC Compactions 0 - - - - - Code Pitchings 0 - - - - - Calls to GC.Collect 0 - - - - - GC Latency Time (ms) 686 0 4912 0 0 16 Pinned Objects 0 - - - - - Objects Moved by Compactor 0 - - - - - Objects Not Moved by Compactor 0 - - - - - Objects Finalized 1 - - - - - Boxed Value Types 3 - - - - - Process Heap - 278 235 2352 68 8733 Short Term Heap - 0 278 986 0 10424 JIT Heap - 0 360 12103 0 24444 App Domain Heap - 0 1341 46799 0 64562 GC Heap - 0 35524 2095727 0 3276800 Native Bytes Jitted 22427 140 98 228 68 1367 Methods Jitted 98 - - - - - Bytes Pitched 0 0 0 0 0 0 Methods Pitched 0 - - - - - Method Pitch Latency Time (ms) 0 0 0 0 0 0 Exceptions Thrown GC latency 0 - - - - - Platform Invoke Calls 0 - - - - - Run time 173 sec result += ".NET Compact Framework"; Managed String Objects Allocated 20040 Garbage Collections (GC) 4912 Bytes of String Objects Allocate 5,800,480,574 Bytes Collected By GC 5,918,699,036 107128 ms

.stat counter total last datum n mean min max Total Program Run Time (ms) 11843 - - - - - App Domains Created 1 - - - - - App Domains Unloaded 1 - - - - - Assemblies Loaded 2 - - - - - Classes Loaded 175 - - - - - Methods Loaded 198 - - - - - Closed Types Loaded 0 - - - - - Closed Types Loaded per Definition 0 0 0 0 0 0 Open Types Loaded 0 - - - - - Closed for Methods Loaded (int i=0; i<10000; 0 - - i++){ - - - Closed Methods Loaded per Definition 0 0 0 0 0 0 Open Methods Loaded 0 - - - - - Threads in Thread Pool - 0 2 0 0 1 Pending Timers result.append(".net - 0 2 Compact 0 0 1 Scheduled Timers 1 - - - - - Timers Delayed by Thread Pool Limit 0 - - - - - Work Items Queued Framework"); 1 - - - - - Uncontested Monitor.Enter Calls 2 - - - - - Contested Monitor.Enter Calls 0 - - - - - Peak Bytes Allocated (native + managed) 3326004 - - - - - Managed Objects Allocated result.append(" 60266 - Rocks!"); - - - - Managed Bytes Allocated 5801679432 28 60266 96267 8 580020 Managed String Objects Allocated 20041 - - - - - Bytes } of String Objects Allocated 5800480578 - - - - - Garbage Collections (GC) 4912 - - - - - Bytes Collected By GC 5918699036 1160076 4912 1204946 597824 1572512 Managed Bytes In Use After GC - 580752 4912 381831 8364 580752 Total Bytes In Use After GC - 1810560 4912 1611885 1097856 1810560 GC Compactions 0 - - - - - Code Pitchings 0 - - - - - Calls to Managed GC.Collect String Objects 0 - Allocated - - - - 56 GC Latency Time (ms) 686 0 4912 0 0 16 Pinned Objects 0 - - - - - Objects Moved by Compactor 0 - - - - - Objects Not Moved by Compactor 0 - - - - - Objects Finalized 1 - - - - - Boxed Value Types 3 - - - - - Garbage Collections (GC) Process Heap - 278 235 2352 68 8733 2 Short Term Heap - 0 278 986 0 10424 JIT Heap - 0 360 12103 0 24444 App Domain Heap - 0 1341 46799 0 64562 GC Heap - 0 35524 2095727 0 3276800 Native Bytes Jitted 22427 140 98 228 68 1367 Methods GC Jitted Latency 98 - - - - - Bytes Pitched 0 0 0 0 0 0 Methods Pitched 0 - - - - - Method Pitch Latency Time (ms) 0 0 0 0 0 0 Exceptions Thrown 0 - - - - - Platform Invoke Calls 0 - - - - - Run time 0.1 sec StringBuilder result = new StringBuilder(); Bytes of String Objects Allocated 2097718 Bytes Collected By GC 1081620 21 ms