Post

My First Book Review

My First Book Review

An editor from Broadview asked me to write a review of the Chinese edition of “.NET Compact Framework Programming C# Edition.” I spent a morning squeezing out these words. Basically no flattery — I think it’s fairly objective (no vested interest, no need for that, haha). Posting it here to relieve my blog’s drought.

Exploring New Routes in Mobile Development

— Review of the Chinese Edition of “.NET Compact Framework Programming C# Edition”

By He Zongjian

Mobile Devices and .NET Compact Framework

In recent years, consumer electronics have developed rapidly both domestically and internationally. Personal handheld devices represented by PDAs and smartphones are advancing by leaps and bounds.

Take mobile phones as an example. Everyone probably remembers what phones looked like three years ago, five years ago, ten years ago. In just a few short years, mobile communication technology quickly evolved from 1G analog voice to 2G digital voice, 2.5G digital voice + data, and is gradually transitioning to the fully digital 3G era. Related phone hardware is also developing rapidly. Some current smartphones already have several hundred MHz CPUs, 64MB RAM, and several GB of Flash storage. Intel’s next-generation XScale mobile processor “Monahans” can reach speeds over 1GMHz. Corresponding to hardware development is the rapid evolution of phone software. Driven by increasing application demands, phone software is gradually moving away from “bare metal” programming. Embedded operating systems have become indispensable components of phone software. The layered architecture of phone software is becoming clear.

Microsoft launched Windows CE 10 years ago, designed specifically for embedded devices. After a decade of development, Windows CE has achieved remarkable success in the mobile space. In the PDA market, Pocket PC has surpassed the veteran Palm OS to become the leader. In the smartphone market, Smartphone has formed a three-way stalemate with Symbian and embedded Linux.

I started working with Windows CE and Windows Mobile development before .NET Compact Framework was born. Over the years, I’ve witnessed .NET Compact Framework’s growth from beta to official release to the latest version 2.0. Undoubtedly, .NET Compact Framework is part of Microsoft’s overall .NET strategy, but its path hasn’t been smooth.

Using virtual machines and intermediate code on embedded devices has unique advantages. Long before .NET was born, Microsoft was experimenting with intermediate code on Windows CE. Imagine — developers completely不需要 care about the underlying processor type. Code compiled once runs on ARM, MIPS, PowerPC, and other embedded CPUs. For embedded developers, this is like a dream come true. But in the early days of .NET Compact Framework, there was more质疑 and dissatisfaction than praise. Most problems stemmed from .NET’s virtual machine and intermediate code mechanisms.

First, many embedded software — especially in reliability and real-time critical applications — emphasizes system controllability. While .NET Compact Framework simplifies development, developers largely lose control over runtime efficiency and low-level system access. Additionally, choosing .NET Compact Framework increases the OS footprint by several megabytes. This is undesirable for many embedded developers, especially those long working in electronic engineering and control fields. Second, looking at the entire .NET Framework BCL, ASP.NET is the most brilliant server-side technology. But client-side WinForm requires installing a 30+ MB .NET runtime on user machines, so it hasn’t been推广 well. .NET Compact Framework can’t and doesn’t need to include ASP.NET. Thus, the stripped-down .NET Compact Framework is limited in functionality.

But every technology has strengths and weaknesses. In application, playing to strengths and avoiding weaknesses is the right approach. .NET Compact Framework’s strength is rapid mobile application development and data access, not real-time industrial control. Microsoft seems to have gradually realized this. With .NET Compact Framework 2.0 (shipped with Windows Mobile 5.0), the class library was substantially strengthened. Many features previously only achievable via P/Invoke can now be done through .NET Compact Framework. Moreover, in Pocket PC and Smartphone products, the .NET class library is固化 in ROM, promoting .NET Compact Framework adoption. I think for application development on the Windows Mobile platform, .NET Compact Framework should be the primary choice.

About This Book

I’ve been teaching Windows CE-based embedded courses at Tongji University for three years. The most regrettable feeling over these three years has been the lack of Chinese-language materials. When the course started, finding a Chinese Windows CE technical book for teaching was very difficult. We had to awkwardly use MSDN as reference material. Among the Windows Mobile developers I’ve met, most are self-taught through English materials. A series of Chinese Windows Mobile development books would solve this尴尬 situation. Through Broadview’s editor, I encountered the Chinese translation of “.NET Compact Programming with C#.” After reading the first few chapters, I had some thoughts.

“.NET Compact Programming with C#” is by Paul Yao and David Durant, with a 4.5-star rating on Amazon. The content is rich, covering almost all knowledge needed for .NET Compact Framework development — from basic principles to architecture, from form control programming to backend data access. .NET Compact Framework developers can use it as a desktop reference.

Some technical books are superficial — you feel you know the “what” but not the “why.” Fortunately, the authors of this book don’t just list function or library usage. They探讨 the underlying mechanisms and principles of .NET Compact Framework and its class library. For example, when introducing garbage collection, they not only explain its function but also detail the GC process and the differences between .NET Compact Framework and desktop .NET Framework. This allows developers to peer into the platform’s underlying mechanisms and write better code.

From the插述 in the text, it’s clear the authors have rich experience in software design and development, especially Windows CE and .NET Compact Framework. Many插述 are insights from their experience, with gems that can inspire us.

In today’s China, where Chinese Windows CE technical books are scarce, the Chinese edition of this book lets more Chinese readers access this authoritative work on .NET Compact Framework. It also enriches this book category. Truly a delightful event. I hope this book brings more rewards to mobile and embedded developers.

This post is licensed under CC BY 4.0 by the author.