Title: .NET Compact Framework Development
1.NET Compact Framework Development
Don Sorcinelli Microsoft MVP Mobile
Devices Editor-In-Chief Bostonpocketpc.com Club
Pocket PC - Boston
2Agenda
- 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
3Introduction
- Windows Mobile Evangelist
- Consumer
- Enterprise
- Developer
- Developer
- Enterprise focus
- Multiple languages, platforms and technologies
4A 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
5Current State of the .NET Compact Framework
- Visual Studio.NET 2003
- Smart Device Projects
- .NET Compact Framework 1.1
6Introduction to the .NET Compact Framework
- What is the .NET CF?
- What can I do with the .NET CF?
- What cant I do with the .NET CF?
7What 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
8What 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
9What cant 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
10DEMO VS.NET / .NET CF Development
11.NET CF Tips, Tricks and Recommendations
- Fill In The Holes
- UI Design Considerations
- Extending Enterprise Applications
12Fill 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
13OpenNETCF.org Smart Device Framework
- Open source .NET CF library
- Designed to fill the gaps in the .NET CF
- http//www.opennetcf.org
14DEMO Smart Device Framework
15Pocket Outlook In-The-Hand
- Managed access to Pocket Outlook
- Contacts
- Tasks
- Appointments
16DEMO Pocket Outlook In-The-Hand
17Pocket PC Magazine Best Software Awards
- Includes a Developer category
- Dozens of third-party tools for .NET CF
development
18UI Design Considerations
19UI 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
20UI 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
21DEMO Orientation-Awareness
22UI 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
23Performance
- Windows Mobile Architecture Primer
- Performance Techniques
24Windows Mobile Architecture
25Device 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
26Device 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
27Memory 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
28Memory 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.
29Performance Tips
- UI Usability
- Memory Management/Performance
30UI 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
31DEMO UI Usability
32Memory 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
33SQL 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
34XML
- Good for
- Persistent storage of smaller sets of data
- Local storage
- Occasionally-connected computing
- Not as secure as SQL Server CE
35.NET CF Futures
- Whidbey Visual Studio.NET 2005
- .NET Compact Framework 2.0
36Visual 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
37.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
38Q A