Windows Mobile Developer Marcus Perryman Morgan Skinner.

Slides:



Advertisements
Similar presentations
Malek Kemmou Technology Architect, Application Platform Microsoft Middle East and Africa Overview of ASP.NET 2.0.
Advertisements

.Net Compact Framework A Mostly Straight Path, but with Some Interesting Curves Richard Kucia Kucia Associates
Developing Windows ® CE Applications With Visual Basic ® Larry Roof tonked
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
.Net Compact Framework. Microsoft.Net is often referred as Plateform for web services But.net vision is more than web services – It talks about how people.
.Net Overview Giuseppe Attardi Università di Pisa.
Thursday Evening 6.30VB.NET Introduction 7.30Break for food 8.00VB.NET Migration 8.45Q & A 9.00Done.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Scelta della tecnologia di presentazione dei dati.
SQL Server 2005 CLR Integration ADO.NET 2.0 Mike Taulty
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Amit Chopra APP209 Introducing “Orcas” Huh ? What’s “Orcas”?
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Developing International Applications for Mobile Devices with.NET Achim Ruopp International Program Manager Microsoft Corporation.
Punit Shah Technical Lead | Microsoft
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 18 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
Real-time HMI and SCADA software for .NET applications.
Using.NET Skills To Build Mobile Applications In Compact Framework Punit Shah Technical Lead | Microsoft |
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
September 2008 IT Software Development Guide.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
DEV317 Integrating Extensible Business Graphics into Enterprise Applications using Visio 2003 Mai-lan Tomsen Bukovec Program Manager.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
June 2003 Beginning Compact Framework Mohammad Faridi (faridianslip) Umer Faruq.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Microsoft.NET Framework Overview Abidi Mahmoud Seminarium on Component -based Software Engineering.
Microsoft Visual Basic 2005: Reloaded Second Edition
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
Overview of System Development. Overview Selecting a Windows Embedded Operating System The Windows CE Platform Development Cycle The Application Development.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
CF and.NET Working Together Using Web Services Geoff Snowman Developer Community Champion Microsoft Corporation.
Introduction to the Compact Framework Marcus Perryman Principal Consultant Microsoft.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 17 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
Rajiv and Shipra Introduction to.NET (asp.net,c#,vb)
Seamless Mobility: Michael Wehrs Director of Technology & Standards Mobile Device Division, Microsoft Corp. Wireless Software Innovations Spurring User.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
About These Slides This slide set is designed to be used with the OMA sample application It is recommended you follow the steps outlined in the “Preparing.
Enabling Enterprise Applications Marcus Perryman Microsoft
Localization Support in Microsoft.NET Framework François Liger Program Manager Microsoft Corporation.
Developing Applications with Visual Studio 2005 (part 2) Marcus Perryman
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
MBL401.Net Compact Framework: Data Access Best Practices Paul Foster Mobile solutions architect.
.NET Mobile Application Development Messaging & Communication from Mobile Devices.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
MBL490 Deploying Applications to Smartphone and Microsoft® Powered Pocket PC Marcus Perryman Consultant.
.NET Compact Framework Per Ahlberg. Agenda.NET CF vs.NET Framework Major Areas Base Classes Drawing/Forms Data/XML Web Services Application Development.
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
Mobile Applications and SQL Server Mobile v3.0 (Laguna) Kevin Collins Senior Program Manager Microsoft Corporation.
The 100% Inspiration Tour. An Introduction to Building Connected Mobile Applications Gavin King Academic Team, Microsoft UK
DEV394.NET Framework: Migrating To Managed Code Adam Nathan QA Lead Richard Lander Program Manager Microsoft Corporation.
Introduction to.NET Building.NET Applications Mike Taulty Developer & Platform Group Microsoft Ltd
Exploring Networked Data and Data Stores Lesson 3.
Advanced Managed Code Development Features Marcus Perryman
Introducing the Microsoft® .NET Framework
Developing Mobile Web Applications With ASP.NET Mobile Controls
Introduction to .NET Framework Ch2 – Deitel’s Book
NET Compact Framework for Mobile Developers
Mobile Application Development 2005 By Sam Nasr July 25, 2006
Windows Forms and Smart Device Extensions in the End-to-End Application Hans Verbeeck Developer Consultant Microsoft EMEA.
Office 365 Development.
Overview of System Development for Windows CE.NET
Windows Forms in Visual Studio 2005: An in-depth look at key features
Mark Quirk Head of Technology Developer & Platform Group
Developing Managed Code for Smartphone 2003
.NET Framework Design Goals
Presentation transcript:

Windows Mobile Developer Marcus Perryman Morgan Skinner

Agenda Development for Native applications Development for Native applications Compact Framework for the Pocket PC Compact Framework for the Pocket PC  Common Requests Smartphone Development Smartphone Development ASP.NET Mobile Controls ASP.NET Mobile Controls Futures – what’s coming next? Futures – what’s coming next? Summary Summary

Development for Native Applications

Native Code Development Improved Debugging Improved Debugging  JIT debugging (attach to dead process)  Attach to already running process  Multithreaded application debugging Updated Compilers Updated Compilers  SEH and C++ exception handling  STL (Standard Template Library)  Intrinsics (generate in-line code) Updated Remote Tools Updated Remote Tools  Call Profiler  Performance Monitor

New Debugging Features

Compact Framework

The EE A short review Compiled managed code is a binary in Microsoft Intermediate Language Compiled managed code is a binary in Microsoft Intermediate Language Code is just-in-time compiled to the native processor language on type-by-type, method-by-method basis Code is just-in-time compiled to the native processor language on type-by-type, method-by-method basis Resulting native code is cached for later reuse Resulting native code is cached for later reuse Over the lifetime of the app, the up front cost of jitting is amortized, and becomes less and less significant Over the lifetime of the app, the up front cost of jitting is amortized, and becomes less and less significant

Under the Hood Build process Build process  Same compilers  Local exe produced – additional Deploy step File format File format  Standard PE format with no native code  Module load upgraded on device  Contains Intermediate Language (IL) blocks  Resources bound in or deployed in parallel Deploy Deploy  Uses Connection Manager not Platform Manager  Again over Active Sync

ILDASM Multiple environments

.NET Compact Framework System System.DataSystem.Xml System.Web Globalization Text Security Collections Resources Reflection Net IO Threading Diagnostics ServiceProcess Configuration Design ADO.NET SqlServerCe SqlClient Xslt/XPath XmlDocument Runtime InteropServices Remoting Serialization Serialization ConfigurationSessionState CachingSecurity Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printing System.WinForms DesignComponentModel Reader/Writers

Unsupported Pocket PC NETCF Controls ButtonCheckBoxComboBoxContextMenuDataGridDomainUpDownFileOpenDialog HScrollBarImageListLabelListBoxListViewTreeViewTrackBarFileSaveDialogMainMenuNumericUpDownPanelPictureBoxProgressBarInputPanel GroupBox Printing Controls RichTextBox NotificationBubble (PPC) RadioButtonStatusBarTabControlTextBoxTimerToolBarVScrollBar CheckedListBoxColorDialogErrorProvider HelpProviderLinkLabel NotifyIconToolTip ToolTipSplitterFontDialog

Framework Size Framework size (RAM or ROM) Framework size (RAM or ROM)  ~1.5 MB Running RAM needs Running RAM needs  1 MB+ (depends on app) Typical application sizes Typical application sizes  KB  Apps often smaller due to use of platform features in the framework

Using the Compact Framework

Common Application Features Using Graphics for Business Applications Using Graphics for Business Applications Creating Custom Controls Creating Custom Controls Dealing with Form Management Dealing with Form Management Being Smart about Web Services Being Smart about Web Services

Graphics System.Drawing System.Drawing  Supports GDI functions  (line, circle, rectangle etc…)  Good performance  Business application graphics  Wire frame diagrams Games API Games API  No DirectX support (coming soon)  Fast screen access  Sound, hardware buttons

More advanced graphics Speed Considerations Speed Considerations  Delayed draw protected override void OnPaint(PaintEventArgs e) { buffer = new Bitmap(Width, Height); Graphics g = Graphics.FromImage(buffer); // … Calculate new position PostRender(g); // Call post rendering routines... g.Dispose(); // Clean up... // Draw to display... e.Graphics.DrawImage(buffer, 0, 0); }  Double buffering  Sprites  Exclusion drawing

Custom Controls Provides encapsulation and code sharing Provides encapsulation and code sharing No support for User Controls No support for User Controls Derive class from Control: Derive class from Control: public class Visualizer : Control protected override void OnPaint(PaintEventArgs e) Creating the Control: Creating the Control: // Create the 3D warehouse visualizer... this.visualizer = new Warehouse3D(); this.Controls.Add(this.visualizer); Installing to the designer Installing to the designer  Include RuntimeAssemblyAttribute [assembly:System.CF.Design.RuntimeAssemblyAttr ibute”…”)]  Requires desktop build of the control

Creating a Custom Control

Form Management The Form Flow Challenge The Form Flow Challenge  No Multiple Document Interface  Multi form input more common  Which form to display next?  Hide or destroy current form? Solutions Solutions  Dynamic form construction  Forms manager  Wizard based input (e.g. tight scripting of forms)

Form Management Application Kernel Web Service Interface Local Store (SQL CE ) Main FormCollect Form Inspect Form Truck Form Form Manager Main

Form Management Lets see some code Lets see some code public sealed class FormsManager { public Form this[AppForms f] { get{}} // Create an instance of the form and cache... Form frm = (Form)asm.CreateInstance(type); cache.Add(type, frm); public void Swap(AppForms f) frm.Show(); // Display the selected form... frm.BringToFront(); nxtfrm.Hide(); // Hide the last form... } MainForm form =(MainForm)FormsManager.Instance[AppForms.MainForm]; form.PrepareForm();

Being Smart about Web Services Mobile Communication challenges Mobile Communication challenges  Latency, speed, coverage (we are mobile)  Chatty vs monologue? Consider interface to MapPoint Consider interface to MapPoint  Request the Lat / Long for start and end address FindAddress(startAddress); FindAddress(endAddress)  Request map or driving directions GetMap(mapspec)CalculateSimpleRoute(...) Chatty / State full breaks Store and Forward model Chatty / State full breaks Store and Forward model Monologue ==(?) Performance issues Monologue ==(?) Performance issues Consider a server Agent Consider a server Agent Agent.GetMapData(start,end,GET_MAP | GET_DIRECTIONS)

Pocket PC Summary Compact Framework development is very similar to desktop.NET development Compact Framework development is very similar to desktop.NET development Be aware of specific challenges for the mobile device (UI design, communication channel reliability / speed) Be aware of specific challenges for the mobile device (UI design, communication channel reliability / speed)

Smartphone 2003

Based on Windows CE.NET 4.2 Based on Windows CE.NET 4.2.NET Compact Framework in ROM.NET Compact Framework in ROM  Same classes as Pocket PC  ADO.NET  Web services  Rich Forms Designer  XML Support  Platform Invoke to CE APIs

Excluded Supported Smartphone NETCF Controls Label Label TextBox TextBox MainMenu MainMenu CheckBox CheckBox PictureBox PictureBox Panel Panel ComboBox ComboBox ListView ListView TreeView TreeView HScrollBar HScrollBar VScrollBar VScrollBar Timer Timer ProgressBar ProgressBar ImageList ImageList Button Button RadioButton RadioButton ListBox ListBox TabControl TabControl DomainUpDown DomainUpDown NumericUpDown NumericUpDown TrackBar TrackBar ContextMenu ContextMenu ToolBar ToolBar StatusBar StatusBar OpenFileDialog OpenFileDialog SaveFileDialog SaveFileDialog InputPanel InputPanel Unsupported DataGrid DataGrid

Missing Controls Multi-Item Picker Multi-Item Picker Date and Time Pickers Date and Time Pickers

Smartphone User Interface Follow guidelines within the SDK Follow guidelines within the SDK  Left menu item can only be default action  No pop up menu items (Unsupported Exception)  Right menu item can be pop up  Entry fields should be identified by a Label above the field

Input Modes Pocket PC provides Soft Input Panel for data input Pocket PC provides Soft Input Panel for data input Smartphone uses Input Modes Smartphone uses Input Modes

Input Modes Input Mode Description EIM_SPELL Also known as multitap EIM_AMBIG T9 predictive text input EIM_NUMBERS Numeric only EIM_TEXT Either Spell or T9, depending on which of these was last used by the user in an edit control with the EIM_TEXT input mode. Use this in edit controls where the user's mode preference is to be used as the default mode. SendMessage(hControl, EM_SETINPUTMODE, 0, EIM_NUMBERS); Need to use Native Interop

Native Interop Platform Invoke (P/Invoke) Platform Invoke (P/Invoke)  Call custom native code and Windows APIs  Declare statement in Visual Basic.NET  DLLImport Attribute in C# / Visual Basic.NET  Very flexible  Good support on the device Caveats Caveats  No COM Interop  Marshaling is limited

MessageBox int MessageBox( HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType ); [DllImport("coredll.dll")] private static extern int MessageBox( IntPtr hWnd, string lpText, string lpCaption, uint uType); Private Declare Function MessageBox Lib "coredll.dll" ( _ ByVal hwndOwner As IntPtr, _ ByVal hwndOwner As IntPtr, _ ByVal lpText As String, _ ByVal lpText As String, _ ByVal lpCaption As String, _ ByVal lpCaption As String, _ ByVal uType As Integer) As Integer ByVal uType As Integer) As Integer

MessageBox 1.Loads and initialises coredll.dll 2.Locates the entry point MessageBox 3.Calls into the unmanaged code 4.Completes and returns back to managed code using System.Runtime.InteropServices; [DllImport("coredll.dll")] private static extern int MessageBox( IntPtr hWnd, string lpText, string lpCaption, uint uType); MessageBox(IntPtr.Zero, "Hello World!", "Interop1", 0);

Smartphone Input Modes

Interop Warnings Some data types require manual marshalling Some data types require manual marshalling  Nested reference types  Unsafe code in C#  Wrapper DLL in C++ Handling of HWNDs is unsupported Handling of HWNDs is unsupported  Forwards compatibility is not guaranteed

Scrolling Forms Used for larger amounts of data entry Used for larger amounts of data entry Automatic for native applications Automatic for native applications  Create dialog to be longer than screen  Ensure vertical scrollbar is enabled No automatic support in managed code No automatic support in managed code  Implement using a Panel and VScrollBar

Scrolling Downwards Scrolling down should fit the next control on the bottom of the form Scrolling down should fit the next control on the bottom of the form

Scrolling Upwards Scrolling upwards should fit the previous control at the top of the form Scrolling upwards should fit the previous control at the top of the form If the control has a label identifier, this should be at the top of the form If the control has a label identifier, this should be at the top of the form

Scrolling Forms

Owner Drawn ListViews Use to display complex data Use to display complex data Multiple lines / columns Multiple lines / columns Icons / Bitmaps Icons / Bitmaps Respond to key presses Respond to key presses Implemented as a custom control Implemented as a custom control

Owner Drawn ListViews Derive from Control class Derive from Control class OnKeyDown to trap current selection OnKeyDown to trap current selection OnPaint for custom draw routine onto Bitmap object OnPaint for custom draw routine onto Bitmap object Control OwnerDrawnList BitmapVScrollBarOnKeyDownOnPaint

Owner Drawn Listview

Smartphone 2003 UI.NET Compact Framework enables rapid development.NET Compact Framework enables rapid development 14 Inbuilt Controls for rich user interface 14 Inbuilt Controls for rich user interface Extensible using custom controls Extensible using custom controls Workarounds for Input Modes, Scrolling and Owner ListViews Workarounds for Input Modes, Scrolling and Owner ListViews

ASP.NET Mobile Controls Enable web content optimized for Mobile Devices Enable web content optimized for Mobile Devices Over 200 devices supported Over 200 devices supported Extensible for new devices Extensible for new devices

Mobile Web Versus Rich Client Mobile Web Mobile Web  Broad device support  Online  Server side logic  Browser-based UI  No client installation ASP.NET Mobile Controls (Mobile Internet Toolkit) ASP.NET Mobile Controls (Mobile Internet Toolkit) Mobile rich client Mobile rich client  Target rich clients  Offline and Online  Client side logic and data  UI flexibility  Client side installation Smart Device Extensions and.NET Compact Framework Smart Device Extensions and.NET Compact Framework XML Web Services and Data Access Visual Studio.NET

Key Concepts Adaptive rendering Adaptive rendering  Mobile controls and device adapters automatically generate an appropriate rendering for each device Customization Customization  Programmatic model to customize the rendering for a particular device Control extensibility Control extensibility  Ability to create new mobile controls, user controls, inheritance controls, composite controls, and direct control

Web Form And Mobile Web Form Mobile Web Form Hello, Mobile World Hello, World </Form>

Adaptive Control Model PhoneCall example WML cHTML HTML PhoneCall Mobile Capabilities Return HTML with alternative text Mobile.ASPX Get Device Adapter Get Browser & Device Select Device Adapter Get Device Adapter Page instantiates control Return WML with the WTAI tag

Mobile Controls

Reasons To Customize Optimize the generated rendering Optimize the generated rendering  Per device or class of device  Used on a per application basis Control the exact display Control the exact display Ability to override default behavior Ability to override default behavior

ObjectList Control Header Template Item Template AlternateItem Template Footer Template Separator Template Pocket PC Customization ItemDetails Template

ObjectList Template

Mobile Controls Summary

Devices VS Whidbey (C#, VB.NET, C++) eVC 3 (C++) eVC 4 (C++) VS.NET 2003 (VB.NET) eVC 3 (C++) eVB 3 (VB) eVC 3 (C++) eVB 3 (VB) Tools PPC +PE 2003 SP 2003 PPC + PE 2002 SP 2002 PPC 2000 Platforms +.NET CF Whidbey, New native runtimes and Full managed code, (Notification Manager, DirectX, Location APIs, Dr Watson) +.NET Compact Framework, Bluetooth, SMS + MFC, Connection Manager Win32,POOM APIs Macallan CE OS Windows Mobile Roadmap PPC = Pocket PC PPC PE = Pocket PC Phone Edition SP = Smartphone SP v Next (QVGA,Standard) PPC + PE v Next (VGA, Landscape, Square, Standard)

Futures From the PDC In the OS In the OS  eDB – a step forward from CEDB  Location Services API  Update to WebServer (ASP support)  Pocket Watson  DirectX (D3D, modular Media Player) For the developer For the developer  Combined IDE for Native and Managed  Mobile SOAP toolkit.NET CF V2 development.NET CF V2 development  COM interop, XPath, Crypto, Registry, Generics etc.  Hosting Interface  New Libraries  System.Messaging  Unified Notifications  POOM – SMS, Mail, Calendar, Tasks etc.  Telephony, all Phone related functions

Hardware Futures Displays Displays  Pocket PC Portrait/Landscape support  Pocket PC Square Screen  Pocket PC VGA  Smartphone QVGA Form Factors Form Factors  Hybrid devices  Pocket PC softkey support Multiple-Radios Multiple-Radios  GSM/GPRS CDMA/1xRTT  WiFi (802.1x)  Bluetooth  Location Services

SQL CE Futures Laguna code name for SQL CE 3.0 Laguna code name for SQL CE 3.0 Runtime Improvements: Runtime Improvements:  Performance – remove OLEDB for managed code  Re-use spent storage pages  Query hints  Updateable scrollable cursors.  Multi User Tools: Tools:  Integration to Workbench  DTS  Data Designer in Whidbey

Summary Windows Mobile 2003 offers a rich and robust platform on which to build and deploy Mobile applications. Windows Mobile 2003 offers a rich and robust platform on which to build and deploy Mobile applications. Microsoft Visual Studio.NET 2003 provides state of the art development tools for targeting the Compact Framework. Microsoft Visual Studio.NET 2003 provides state of the art development tools for targeting the Compact Framework. The Compact Framework brings Mobile devices to the mainstream development community. The Compact Framework brings Mobile devices to the mainstream development community.

© Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.