380 likes | 594 Views
.NET Compact Framework Development. With VB.NET. Don Sorcinelli Microsoft MVP – Mobile Devices Editor-In-Chief Bostonpocketpc.com Club Pocket PC - Boston. Agenda. Introduction A Brief History of Windows Mobile Development Introduction to .NET Compact Framework Development
E N D
.NET Compact Framework Development With VB.NET Don Sorcinelli Microsoft MVP – Mobile Devices Editor-In-Chief Bostonpocketpc.com Club Pocket PC - Boston
Agenda • Introduction • A Brief History of Windows Mobile Development • Introduction to .NET Compact Framework Development • .NET CF Tips, Tricks and Recommendations • .NET CF “Futures” • Q & A
Introduction • Windows Mobile “Evangelist” • Consumer • Enterprise • Developer • Developer • Enterprise focus • Multiple languages, platforms and technologies
A Brief History of Windows Mobile Development • Embedded Tools for Visual Studio • VS 6 • Tools for VB, C++ • eMBedded Tools • Standalone and free • eVB • eC++ • .NET Compact Framework (First Pass) • Visual Studio.NET • Smart Device Extensions
Current State of the .NET Compact Framework • Visual Studio.NET 2003 • Smart Device Projects • .NET Compact Framework 1.1
Introduction to the .NET Compact Framework • What is the .NET CF? • What can I do with the .NET CF? • What can’t I do with the .NET CF?
What is the .NET CF? • Essentially, the .NET CF is an “extended subset” of the .NET Framework • “Subset”: Some non-essential classes are not included • “Extended”: Functionality specific to the Windows Mobile platform • High-level goal: Extend the .NET developer platform to the Windows Mobile device platform
What can I do with the .NET CF? • Simple answer – • Much of what you would do with regards to .NET client development • Possibilities • Rich client applications • Web services • Extending enterprise applications to Windows Mobile devices
What can’t I do with the .NET CF? • Simple answer: “Not much” • Limitations are mostly restricted to the classes not included in the .NET CF • .NET Remoting • Web server/ASP.NET • Some of the limitations can be overcome by third-party supplements • More on that later
.NET CF Tips, Tricks and Recommendations • “Fill In The Holes” • UI Design Considerations • Extending Enterprise Applications
“Fill In The Holes” • Notable gaps in the .NET CF: • Managed access to “Pocket Outlook” • XML Serialization • Managed access to platform APIs • Third-Party Tools can fill the gap
OpenNETCF.org – Smart Device Framework • Open source .NET CF library • Designed to fill the gaps in the .NET CF • http://www.opennetcf.org
Pocket Outlook In-The-Hand • Managed access to Pocket Outlook • Contacts • Tasks • Appointments
Pocket PC Magazine Best Software Awards • Includes a Developer category • Dozens of third-party tools for .NET CF development
UI Design Considerations • UI Usability • Performance
UI Usability • Three device categories within the Windows Mobile platform: • Windows Mobile for Pocket PC • Windows Mobile for Pocket PC Phone Edition • Windows Mobile for Smartphone • Smartphone does not support stylus entry • T9 input and key navigation • IMPACT: Screen layouts for Smartphone should be carefully considered • Tab Order
UI Usability • Windows Mobile 2003 Second Edition • Supports: • Landscape and portrait orientations • HiDPI resolution (VGA) • IMPACT: Applications should be orientation- and resolution-aware • For more information: • MSDN Mobile and Embedded Developer Center • http://msdn.microsoft.com/mobility • ARTICLE: Developing Orientation and dpi Aware Applications for the .NET Compact Framework • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwm2k3/html/dpi_awareness.asp
UI Usability • Limited Screen “Real Estate” • Pocket PC, Phone Edition • VGA – 480 x 640 • QVGA (Most Common) – 240 x 320 • Smartphone (Smaller Screen) • VGA – 480 x 640 • QVGA (Most Common) – 240 x 320 • IMPACT: UIs should be designed and tested for usability • Analogy: Early days of GUI and web application development
Performance • Windows Mobile Architecture “Primer” • Performance Techniques
Windows Mobile Architecture • CPUs • Memory
Device CPUs • Intel XScale • Designed for battery life (ULV) • Fastest production model – 624 MHz • TI OMAP • Designed for use in Phone Edition and Smartphone • Even more emphasis on battery life • 200 MHz • Samsung Mobile CPU • Multiple clock speeds; fastest = 533 MHz
Device CPUs • All are ARM Instruction Set compatible • You do not have to worry about device CPU differences • OVERALL IMPACTS: • CPUs are not as powerful as desktop computers • Processor-intensive applications will run more slowly • Consider offloading “heavy lifting” • Web services/Server
Memory Model • Non-volatile ROM • System ROM • “FileStore” • Data will persist beyond a hard reset • Volatile ROM • “Main Memory” • Data will not persist beyond a hard reset • Smartphone OS • Volatile ROM will not persist beyond a soft reset
Memory Management • Volatile ROM is broken into two categories: • Storage Memory: Application and data stored in the file system • Program Memory: Memory space for running applications • “Virtual RAM” • The more that is stored in Storage Memory, the less that is available for Program Memory • IMPACT: Memory can be constrained. Applications should be designed for maximum memory management.
Performance Tips • UI Usability • Memory Management/Performance
UI Usability • Avoid graphics-intensive screens • Real Estate • Processing • Consider tabs rather than multiple forms • There is an initial performance hit • Less need for opening multiple forms • Preloading of forms • There is an initial performance hit • Showing rather than initializing saves time during execution
Memory Management • When done with objects, dispose of them • Do not rely solely on garbage collection • When connecting via the network, connect only as long as you need to • For enterprise and Internet applications: Plan for an “occasionally connected” model of data management • There is no perfect wireless technology • Consider: • SQL Server CE • XML
SQL Server CE • Limited subset of SQL Server functionality • Good for: • Persistent storage locally • Persistent storage for occasionally-connected applications and large sets of data • Merge Replication • Currently, SQL Server CE requires an additional installation
XML • Good for: • Persistent storage of smaller sets of data • Local storage • Occasionally-connected computing • Not as secure as SQL Server CE
.NET CF “Futures” • Whidbey – Visual Studio.NET 2005 • .NET Compact Framework 2.0
Visual Studio.NET 2005 • New Packaging • “Express” versions: Will not include .NET CF development • “Professional” version will provide .NET CF support • Native Emulators • Previously, an x86 emulator ran on the desktop • Integrated support for landscape development • Complete deployment support • Installation wizard support for Windows Mobile
.NET Compact Framework 2.0 • Additional classes • Serialization • Event Notification API • Publish/Subscribe methodology • Applications can subscribe to a variety of system events • Applications can publish events • POSSIBLE USES: • SMS Interception • Device-side real-time application integration