Get practical information for developing applications with the Microsoft .NET Compact Framework 2.0—straight from mobile-development experts. This definitive guide delivers the proven techniques, real-world insights, and extensive code samples you need to bring information access to any Windows-based mobile device.
Discover how to:
Design a user interface that is optimized for smart devices
Add functionality by using Windows® Mobile APIs
Organize and persist data stored on a device
Establish network connections and respond to changes in network state
Synchronize mobile devices with data stored on backend servers
Implement authentication, symmetric encryption, and asymmetric encryption algorithms
Optimize application performance for resource-constrained devices
Interoperate with native code by using PInvoke and COM interop
PLUS—Get an introduction to .NET Compact Framework 3.5 and Microsoft Visual Studio® code name “Orcas”
PLUS—Get Microsoft Visual C#® and Visual Basic® code samples on the Web
The Essentials of Mobile Application Development
Chapter 1 .NET Compact Framework—a Platform on the Move
Getting Started with Mobile Application Development in Visual Studio
Understanding the Differences Between the .NET Framework 2.0 and .NET Compact Framework 2.0
Understanding the Differences Between .NET Compact Framework Version 1.0 and Version 2.0
Introducing .NET Compact Framework Version 3.5
Using Community Resources
Summary
Chapter 2 Building a Microsoft Windows Forms GUI
Understanding Windows Forms Version 2.0 Enhancements
Using the Same Workflow as for Developing Desktop Applications
Mapping Device Screens to Device Forms
Exploring Important Windows Forms Controls
Handling Input
Considering the Physical Screen
Developing for Smartphones
Developing for Windows CE–Powered Devices
Summary
Chapter 3 Using SQL Server 2005 Compact Edition and Other Data Stores
Using SQL Server 2005 Compact Edition Databases
Creating Connections to Data in Your Project
Building a Data-Bound GUI
Persisting Data Without a Database
Summary
Chapter 4 Catching Errors, Testing, and Debugging
Connecting to a Target
Compile-Time Errors
Exception Handling: Same as the Full .NET Framework
Runtime Exceptions
Global Exception Handling
Some Exceptions Worthy of Further Mention
The Log Files
Instrumentation
Unit Testing
Summary
Chapter 5 Understanding and Optimizing .NET Compact Framework Performance
What Every Developer Should Know
Understanding the Compact CLR Engine
.NET Compact Framework Performance Statistics
Measuring Performance Programmatically
Performance Guidance
Summary
Chapter 6 Completing the Application: Packaging and Deployment
Implementing Help
Locking Down Your Application
Deploying the Runtime
Building a Device Installer
Security Policies and Code Signing
The Global Assembly Cache
Building a Desktop Installer
Summary
Solutions for Challenges in Mobile Applications
Chapter 7 Exchanging Data with Backend Servers
Architecting a Data Synchronization Application
Using Web Services for Data Synchronization
Accessing SQL Server Directly by Using SqlClient
Synchronizing Data Using SQL Server 2005 Compact Edition Remote Data Access
Replicating Data Using SQL Server Merge Replication
Summary
Chapter 8 Networking
Understanding Complications of Networking and Mobile Devices
Using Web Services
Understanding System.Net
Using IrDA and Bluetooth
Using Serial Ports
Understanding System.Messaging
Summary
Chapter 9 Getting Connected
Understanding Connections on Windows Mobile
Using Desktop Passthrough
Making Voice and Data Calls
Enabling and Disabling Adapters
SMS Interception
Summary
Chapter 10 Security Programming for Mobile Applications
Implementing Good Security
Storing Credentials and Other Secrets Securely
Encrypting Data
Securing Network Connections
Validating User Input
Perimeter Security: Securing Access to the Device
Signing Applications
Summary
Chapter 11 Threading
Why Use Threads?
Understanding Underlying Fundamentals
Maintaining a Responsive User Interface
Synchronizing Thread Activities and Access to Data
ThreadPool
Understanding Threading and Application Shutdown
Using .NET Timers
Summary
Chapter 12 Graphics Programming
Drawing Images, Text, and Shapes
Handling Different Resolutions
Rotating Text
Reducing Flicker by Using Double Buffering
Using Advanced Formatting Techniques
Summary
Chapter 13 Direct3D Mobile
Getting Started with Direct3D
Working in Three Dimensions
Direct3D on Mobile Devices
Summary
Chapter 14 Interoperating with the Platform
Understanding Platform Invocation Services
Understanding COM Interop
Summary
Chapter 15 Building Custom Controls
Extending Existing Controls
Creating Custom Controls
Programming the Design-Time Experience
Summary
Chapter 16 Internationalization
Understanding the Challenges of Globalization
Culture
Using Language Translation (or Localization)
Summary
Chapter 17 Developing with Windows Mobile
Pocket Outlook
State and Notifications
Pictures
GPS
Configuration
Telephony
Earlier Versions of Windows Mobile
Summary
New Developments
Chapter 18 Introducing .NET Compact Framework Version 3.5 and Visual Studio Code Name "Orcas"
Introducing .NET Compact Framework 3.5
Introducing Visual Studio Code Name "Orcas"
Developing Applications with .NET Compact Framework 3.5
Unit Testing in Visual Studio Code Name "Orcas" Team System
Andy Wigley is a Microsoft MVP for Device Application Development and founder of his own mobile development and consulting company. He is coauthor of several books, including Building Microsoft ASP.NET Applications for Mobile Devices, Second Edition, and Microsoft .NET Compact Framework Core Reference.
Daniel Moth works for Microsoft UK in the Developer and Platform group and is a former MVP for Device Application Development. He is a developer, a consultant, and an author who specializes in the .NET Framework and mobile technologies.
Peter Foot
Peter Foot is a Microsoft MVP for Device Application Development. His company, In The Hand Ltd., provides development and consulting services and software components for the .NET Compact Framework. He is an active contributor to the mobile and embedded development community.