Review: .NET Compact Framework Programming with Visual Basic .NET
page 1 of 1
Published: 24 Sep 2004
Unedited - Community Contributed
This book is the book to get if you have no experience at all with Pocket PC Application Development, for this book contains A to Z information book on this topic.
by Jose Fuentes
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 7811/ 16

This book is the book to get if you have no experience at all with Pocket PC Application Development, for this book contains A to Z information book on this topic.

It’s so densely packed is hard to believe that they left anything out. I have never been exposed to Pocket PC development, though I have wanted to develop for it for a while I just didn’t have any good resource on the topic. With this book I was able to get up and going into Pocket PC application development before I knew it. The authors also did a great job of helping explain the differences from windows development and Pocket PC development. They also go though how to setup and use VS.NET to build your Pocket PC application; there are many great tips and how-to tutorials throughout the book.  The code samples provided were excellent and very meaningful.

On page XXXI of the preface, you will find the links ( to download the samples in both C# and VB.NET. This is by far the most recommended way to do books, is to provide samples in both popular languages somewhere (either on disk or a site). This set is unique in that they went and did two separate books (one in VB.NET and one in C#). After talking with a fellow ASP Alliance columnist (Teemu Keiski) that did the review on the C# version, we both concluded that the books are basically the same and the code samples are too. No odd C# using unmanaged code bits that he was aware of.

This book is broken up into 17 rich chapters that take you step by step in the building process. It also includes a 4-part reference section for many of the elements used in the book. Below is a synopsis of the chapters.

Chapter 1
Design goals, .NET and the compact framework is what this chapter is all about, it goes though explaining the files, capabilities and limitations, as well as the main classes you will be using.

Chapter 2
The chapter goes into the uses of the Compact framework libraries, GUI’s and how much is brought in from the “System.Windows.Forms.Form” class. It also goes though the use of VS.NET 2003 as well as some other generic information. We also get our first taste of a code sample.

Chapter 3
The type system, here the author takes us though the different types of types and other related information. We also learn about type conversion and memory management.

Chapter 4
P/Invoke, the very thing that strikes fear in some managed developers hearts, here there is a good bit of knowledge about P/invoke, when to use it, why you will need to use it (mainly since the compact framework is missing so many parts you have to P/Invoke to do things you could normally do with the full version). This is one of the most important and largest chapters it seems in the book. No compact framework developer could do without this knowledge.

Chapter 5
The main part of any application with user interaction, the UI interface, chapters 5-10 are mostly related to UI elements and how to use them in your applications. Chapter 5 starts off with a healthy dose of what forms are and how to use them. Forms are discussed quite a bit here and you learn much about this topic, which is very important since a form is the basis of the UI presentation.

Chapter 6
Here the authors take us though the use of input via Mouse and keyboard, we learn how to use that input and control events that are generated by these inputs.

Chapter 7
Controls, controls and more about controls, this chapter does a great job of what are controls and how to use the controls in your interface, as well as the basic properties, methods and events.

Chapter 8
Data binding, oh my favorite, this chapter goes though the basic information you need in order to know how to bind (bindable) controls and objects as well as some complex ways for controls like the listbox and combo box. Also in this chapter we are exposed for the first time to the Data Grid control.

Chapter 9
In this chapter we go though some of the menus, toolbars, image lists and dialog boxes we also learn about properties of controls and event grabbing, the gold of this chapter is the win32 message bit, starting on page 567.

Chapter 10
Custom controls and how to build them, that’s what this chapter is all about, you throw a few controls together and boom you have a new custom control. This chapter also shows you how to extend current controls (or fix them since they should have had the abilities or worked correctly (in some cases) to begin with). There is even a nice little bit on how to add the custom control to the .Net toolbox. Don’t expect any thing detailed on how to make your controls work great with the form designer though, it’s missing quite a bit, but this isn’t the focus of the book.

Chapter 11
Managing data, what application would not have data? Even video games have data, so you must learn how to manage that data. This chapter goes though quite a few interesting and different ways you will need to learn to manage data. After all managing data and how you store it will mean the difference in how much you can store. Oh BTW, registry bits are shown here quite different then what you might have learned in the full version of .NET (using the Registry Class), so you might want to look carefully at this bit.

Chapter 12
ADO.NET programmers will feel at home in this chapter, not much has changed, but to use SQL Server CE you will have a new set of classes to deal with. The interesting thing to note is how data access is done, in the Winforms world you would fill a data table in a dataset, though here you would handle data like you would in the Webforms world, you would use a datareader to read and populate. They do go into the adapter and filling of dataset/datatable but I didn’t find one bit on STC (Strongly typed Collections) after all you could build a STC and populate it via a datareader and get the best of both worlds. Personally I wouldn’t bother with a STC in the winforms world due to how many resources I have available on the client, but here it would have been useful information. The chapter also goes into accessing SQL server (full not CE) but it’s pretty close to how you normally did things in Winforms.

Chapter 13
Synchronizing Mobile data, this chapter just shows you one single minded way to do data synchronization. Nothing is said about storing the data retrieved from a data source while connected and then reverting to that stored data when disconnected. Many applications need a simple XML file that would serve this purpose. A good chapter on DAL (Data Access Layer) design would have gone along way in doing such a thing, you could build it right into your DALS to automatically store then present. Also how do you resolve conflicts of primary keys? Since this chapter only shows you the one way (between SQL CE and SQL server) you don’t get any understanding on how to build a structure that won’t have conflicts or very little conflicts. For instance if I knew records would be added on the mobile device while disconnected and I used a XML file I would opt for a Guid ID so that when I merge back into the database I won’t have any primary key violations.  I suppose there are several ways to go about doing this, but the SQL CE would have the highest overhead and if you have a simple application that needs such a thing then it really won’t be worth the trouble.

Chapter 14
RAPI fundamentals and ActiveSync, don’t be fooled, RAPI is not .NET remoting. These are very specialized bits that are designed for sole use of Mobile devices running Pocket PC. ActiveSync allows you to keep files synchronized with a desktop while RAPI gives you the ability to access and use the object store.

Chapter 15
Graphics, the spice of sight, if you are good at GDI.NET then you will find this interesting, The main bit you will find interesting is what doesn’t work (classes not implemented) and how to use the WinAPI directly to do many common things, after all to quote the book “Of the 400 or so functions that exist on desktop versions of GDI, only about 85 are included in Windows CE.”, so this is a very interest chapter as I said before, for all those doing custom controls you will want to read this.

Chapter 16
Fonts and text, how can you have fonts without text? This extends our knowledge from chapter 15 on GDI. We also learn how to set the font of a control and basically how the font class is designed. Also you will find a treasure of Win32 functions to use with fonts and other text related information (like alignment, placement and such). Color is also talked about and shows how to change colors of text, both foreground and background along with the color picker dialog box.

Chapter 17
Printing, probably one of the most important bits you will find in this book is how to output the information to a printer. This is vital for many applications and this chapter does a great job of helping you figure the mystery of printing as well as a little history.

Pros: Very in-depth and full of information and samples.

Cons: Lots of repeating basic generic information, at some points it gets a little two basic and can make one feel like falling asleep if one has .NET experience. It’s hard to just go to where you want, since you really need to go though the book at least once to get an overall understanding of developing for the Pocket PC with the .NET compact framework.

I’ve enjoyed this book very much, it has provided me with a great depth of information, and more then I could handle in one sitting. I would differently recommend this book to those interested in developing for the Pocket PC/Windows CE.

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-04-23 1:28:47 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search