Description
–From the Foreword by Rob Tiffany, mobility architect, Microsoft
Completely revised and updated for .NET Compact Framework 2.0 and 3.5, Visual Studio 2008, and Windows Mobile Smart Phones, Programming .NET Compact Framework 3.5, Second Edition, teaches you how to write highly effective applications for handheld wireless devices with small screens, limited memory, and finite battery life.
This book is the definitive tutorial and reference for the .NET Compact Framework and Windows Mobile. If you’re interested in developing for this burgeoning platform, there is no one better able to get you up to speed than industry veterans, master programmers, and teachers Paul Yao and David Durant.
With this book you will learn how to
- Use each of the ten API sets available for Windows Mobile; when to use each; and, especially, when to use Win32 and the .NET Compact Framework 2.0 and 3.5
- Write programs that make the most of a Windows Mobile device’s limited battery life
- Efficiently invoke Win32 APIs from the .NET Compact Framework
- Write exceptional, data-driven applications using data binding and .NET controls
- Manage device data with the object store, file I/O, and the registry
- Work with databases using ADO.NET and LINQ
- Synchronize mobile data with remote databases and the remote API
- Make a mobile device work with the Windows Communication Foundation (WCF)
- Create graphical output on Windows Mobile devices
If you want to learn Windows Mobile development but only have limited experience with the .NET Framework, this is the only book you need.
Table of Contents
Figures xvii
Tables xxi
Foreword xxv
Preface xxvii
Acknowledgments xxxiii
About the Authors xxxvii
Chapter 1: Mobile Phone Programming 1
1.1 Selecting an Application Programming Interface 4
1.2 Memory Management 19
1.3 Conclusion 37
Chapter 2: Extending Battery Life 39
2.1 What Is the Problem? 40
2.2 Measuring Battery Usage 43
2.3 Device Power Study 51
2.4 Conclusion 58
Chapter 3: Platform Invoke 59
3.1 Overview of P/Invoke 60
3.2 Creating P/Invoke Declarations 66
3.3 Supported P/Invoke Function Parameters 75
3.4 A Sample Program: CallWin32 93
3.5 Writing Win32 Dynamic Link Libraries 96
3.6 Manual P/Invoke Parameter Passing 100
3.7 Communicating between Native and Managed Code 108
3.8 Comparing P/Invoke Support 112
3.9 Conclusion 113
Chapter 4: Data Binding to Controls 115
4.1 Data Binding 115
4.2 Complex Data Binding 124
4.3 Simple Data Binding 126
4.4 The DataGrid Control 132
4.5 Conclusion 177
Chapter 5: Storage 179
5.1 Smart-Device Data Storage 179
5.2 File I/O 183
5.3 Registry Access 213
5.4 Conclusion 221
Chapter 6: ADO.NET Programming 223
6.1 Examining ADO.NET 226
6.2 Working with Data Sets 236
6.3 Microsoft SQL Server CE 254
6.4 Microsoft SQL Server 287
6.5 Web Services 318
6.6 Conclusion 335
Chapter 7: LINQ 337
7.1 Overview 337
7.2 The Sample Application 344
7.3 LINQ to XML 378
7.4 Conclusion 383
Chapter 8: Synchronizing Mobile Data 385
8.1 Understanding SQL Server CE Synchronization 387
8.2 Installing Remote Data Connectivity 392
8.3 Using RDA 397
8.4 Using Merge Replication 409
8.5 Choosing between Merge Replication and RDA 424
8.6 Using Data Synchronization Services 424
8.7 Conclusion 448
Chapter 9: The Remote API 451
9.1 RAPI Fundamentals 451
9.2 Accessing the Object Store 470
9.3 Detecting Changes in Device Connection State 499
9.4 Loading Programs and DLLs 507
9.5 Conclusion 514
Chapter 10: Windows Communication Foundation 515
10.1 What Is WCF? 515
10.2 Creating a WCF Service 523
10.3 Creating a WCF Client in Windows Mobile 538
10.4 Conclusion 546
Chapter 11: Creating Graphical Output 549
11.1 An Introduction to .NET Compact Framework Graphics 549
11.2 Drawing on the Display Screen 561
11.3 Raster Graphics 570
11.4 Vector Graphics 602
11.5 Conclusion 619
Chapter 12: Text and Fonts 621
12.1 Drawing Text 621
12.2 Font Selection 625
12.3 Placing Text 632
12.4 Conclusion 640
Appendix A: Hungarian Notation for .NET Programs 641
A.1 Goals and Objectives 642
A.2 Guidelines 642
A.3 .NET Naming Guidelines 644
A.4 Hungarian Notation 646
Appendix B: Windows API Allocation and Cleanup Functions 659
Index 669
Purchase Info
ISBN-10: 0-321-60653-1
ISBN-13: 978-0-321-60653-2
Format: On-line Supplement
$59.99
You can purchase immediate access to this online product with a credit card.