Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

The Definitive Guide to the Compact Framework 125

William Ryan writes "If you are new to the .NET Compact Framework, you are about to embark upon a challenging yet rewarding path by writing CF applications. For the experienced CF developer, you know there is a lot to learn, and that it's constantly evolving. However, Dan Fergus and Larry Roof's new book, The Definitive Guide to the Compact Framework (available from Apress) is something you'll want in your library regardless of your familiarity with the CF. The book is just short of 1,000 pages including the index, tables of contents etc. It's composed of 22 chapters and 6 appendices. It also includes Microsoft's UI Design guidelines for the Compact Framework, which was a really nice touch by the authors." Read on for the rest of Ryan's review.
The Definitive Guide to the Compact Framework
author Dan Fergus & Larry Roof
pages 1011
publisher Apress
rating 10
reviewer William Ryan
ISBN 1590590953
summary This article reviews Dan and Larry's new book on the Compact Framework (SP) with the .NET Compact Framework (.NETcf). This book is the longest in terms of content on the Compact Framework to Date

The authors made Chapter 1 as interesting as the beginning of a computer book is going to get. The two best parts in the introduction, IMHO, are the discussions of the differences between eVB (eMbedded Visual Basic) and the Compact Framework as well as the differences between the full framework and the CF.

Chapter 2 is where the rubber hits the road, so to speak, and walks you through getting started and a Hello, World application. This is where the authors' attention to detail really becomes obvious. Instead of a standard such program that simply pops up a MessageBox displaying "Hello, World," the authors come up with a cool sample that gives you a good introduction to CF programming.

Chapter 3 talks about designing interfaces. Typically, a lot of developers may take this for granted (have you ever met a developer that didn't think they were a UI Expert?), but there is limited real estate on a PDA, and I think Larry's guidelines are excellent.

Chapter 4 is probably best described as "The last guide to CF controls that you'll ever need." It's packed with examples on how to use everything in the toolbox, and you can tell the authors really put some thought into coming up with interesting and useful examples. While experienced developers will certainly find this chapter helpful, beginning developers would be well advised to buy the whole book even if this were the only chapter. Although I really liked this chapter, the authors sort of skimped on one important area here, but it's not a big deal: If you want to write custom controls and have them placed in the Visual Studio designer, you have to jump through a few hoops. The authors tell you what these hoops are, but don't tell you how to jump through them. In all fairness though, if they covered everything to the level of detail this subject entails, the book would be 20,000 pages and take years to write.

Not every control that you have in your toolbox on the desktop is available here, and if you want to spice up your UI, you'll probably want to roll your own controls. Chapter 5 builds on the topic of custom controls, and delves into building your own. The next two chapters still concentrate on UI issues, mainly menu items and drawing your own graphics. If you intend to write your own control or do anything interesting with your interface, getting familiar with the graphics library is a must.

After discussing the UI, the authors veer off into the CF File System. By its very nature, the PDA has a different file system than the desktop, and is something that many new developers have a fair amount of headaches with. Roof and Fergus show you how to move around files and directories, and how to create a text file or binary. The first time I read the chapter, I was disappointed that XML wasn't discussed when writing files, but there's good reason for this; they dedicated an entire Chapter to XML later on.

With the UI and file system explained, the authors next move into the important area of data access. After all, unless you are simply playing games on the PDA, it probably needs to interact with a database somewhere and I can assure you, just about every common task that you may encounter is discussed in depth. The show you how to bind controls to data, retrieve it from a Web Service, retrieve it from a SQL Server on a local network, use SQL CE to take advantage of replication and using XML as a Data Access technology. Since a PDA may get its data from many different sources, the ability to manipulate XML is very handy. Every problem that I ever encountered regarding data access in the CF was covered here and they have some really interesting ideas on how to implement things.

The book moves on to networking. There were only two chapters dedicated to networking and I would have liked to see more, but they definitely address just about everyt task that you'll routinely face. In all fairness to the authors though, there's about 100 pages dedicated to mobile networking and web services, and it's certainly not glossed over.

Chapter 17 takes a turn into Unmanaged code and P/Invoke and is probably my favorite chapter of the book. Why? Well, because a lot of things aren't yet supported on the CF and many probably won't be. So using Interop is the only way to get stuff done. I've developed CF programs for almost a year now, and this chapter got me through two problems that I hadn't been able to figure out previously. Beginning CF developers may not find this chapter as interesting as I did because it involves API calls, but trust me, this part is a life saver! Then they go right into showing you a really practical example of using Interop and their examples address things that I constantly see asked in newsgroups.

I was impressed by the authors' discussion of some really popular 3rd-party tools. Microsoft has a POOM example, but it leaves a lot to be desired. The authors show you how to use many of its features, and then present a very popular POOM Outlook implementation that is about as cool as it gets.

The rest of the book is pretty much a wind-down. It shows you how to build a help system, create setup applications and HTML reports. However, the authors did something really cool and slipped in a chapter on configuration files and how to use them. Registry access in the CF takes some time to learn (and if you didn't read Chapter 17, good luck!) and traditional configuration files aren't natively supported. However, they create their own implementation and it's very easy to understand. I've thought about implementing a solution like this for a while, but never got around to doing it. Fortunately, Larry and Dan took care of it for me. This is definitely a solution that you will probably want to use over and over.

The last part of the book is the appendices. This stuff is thorough and packed with solutions to all of those little problems that are so pesky when you are first starting out. These serve not only to get you past a whole slew of common frustrations, but they reinforce what was presented in the book I think the degree of detail that they included in the end was another superb touch by two guys who really care about their readers.

In summary, this book is a must by for many reasons. It covers a very broad range of information and it covers the majority of it in great detail. They walk you through getting started, building cool applications and deploying them. They give you a complete arsenal or tools to help build solutions with, and I can't think of anything that they ignored. They also give you the appendices, which, as I mentioned above, will get you through a lot of common pitfalls after you've built your application. As of this writing, I have compiled and run all of the code through Chapter 15 and found it well documented and accurate, but Apress can always be counted on for this. Editorially, the content was interesting and well presented and I found the layout very pleasing.

Without a doubt, this book is really great and something that you'll surely want to purchase if you are going to write CF code.


You can purchase The Definitive Guide to the Compact Framework from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

The Definitive Guide to the Compact Framework

Comments Filter:
  • Amazon has this book for $41.99 ($6 less than bn) and with free shipping.


    For more reviews of this book, check out verygeekybooks.com [verygeekybooks.com]
    • by Anonymous Coward
      What a nice website. I see that's where you hide your referral links now. Nonetheless, your Amazon posts are *still* spam.
    • Froogle... (Score:5, Informative)

      by justMichael ( 606509 ) on Thursday November 20, 2003 @02:25PM (#7522399) Homepage
      Froogle [google.com] shows it for as low as $34.49.

      And if you think tha's some kind of affiliate link, just go to froogle.google.com [google.com] and search on the isbn: 1590590953.
    • The Definitive Guide to the .NET Compact Framework (Paperback)
      by Roof, I.

      18% off Amazon
      Amazon Price: $41.99
      (as of 11/17/2003 01:13 Mountain Time, excludes shipping)

      List Price: $59.99
      Price: $34.49
      You Save: $25.50 (42%)
      Edition: Paperback
      Catalog #: 339468
      Quantity:

      Availability
      In stock. Usually leaves our warehouse within 2-3 business days. Warehouse replenishment issues may stretch that period to 7 business days on some items. If you choose expedited shipping for your order, we will n
  • by kevlar ( 13509 ) on Thursday November 20, 2003 @02:14PM (#7522274)
    For help with development on PocketPC some colleagues of mine and I have created a PocketPC-Development mailing list on yahoo groups:
    PocketPC-Development [yahoo.com]

    It is still in its infancy, but we have several whizz developers who know everything about WinCE and the .NET CF. There are also links to articles, useful utilities, etc.

    If you're interested in joining, click the link!!
    • Thanks for the link, I'll keep an eye on it.

      The microsoft mailing list is actually quite helpful I've found. You can google it here [google.com]

      OpenNETCF.org also has a great forum that has enough traffic that your questions usually get answered (which is something to say for Windows communities).
      It's here [opennetcf.org]
  • When you say CF a lot of people think of Macromedia's Cold Fusion. That can get confusing.
  • Has anyone used their Python book? I'm not real fond of most the texts I've come across for it, and I just ended up mainly using a textbook [berkeley.edu] for my reference.

    Incidentally, maybe it's just my browser (IE, I'm at work, I don't get a choice) but there's some creepy code breakage on the new releases [apress.com] page.

  • The book is just short of 1,000 pages including the index, tables of contents etc. It's composed of 22 chapters and 6 appendices.

    Subjects ranging from SQL CE, Embedded Visual Basic or XML, basically all the things that you want to embed only if the bed is very large.

    In short, the book is the image of what it purports to describe : big and heavy.
    • I don't believe it's called "Embedded Compact Framework".

      I do believe you are making an assumption though, and you know what that means...
    • In short, the book is the image of what it purports to describe : big and heavy.

      MS still don't seem to understand the fundamental problems faced with making embedded applications. You can't just "get rid of a bit of functionality" - you either should have started with slimness in mind, or you've got to redesign a lot of code. I've worked on many a platform where some piece of Microsoft code had to be integrated. Usually it ends up being the make-or-break of whether everything fits or not. Usually it's a t

    • Pointless blather. Strange how Microsoft is dominating PDA sales, if they're so horribly idiotic when it comes to "embedded" applications, isn't it?
    • I tend to agree; nevertheless, compact computing devices will continue to grow in capacity and speed. They will accomodate even the capacious appetites of Microsoft-engineered software. Developers learned to accept MS's engineering bloat on desktop/server operating systems, and it will be no different here.

      Already handheld devices are at the performance level of desktops of the early-to-mid 1990s, albeit without rotating mass storage. But SD-Flash is in the multi-gigabyte range, which is more storage th
      • I tend to agree; nevertheless, compact computing devices will continue to grow in capacity and speed. They will accomodate even the capacious appetites of Microsoft-engineered software. Developers learned to accept MS's engineering bloat on desktop/server operating systems, and it will be no different here.

        NO! One major factor in embedded systems is cost - memory and CPU are always sacrificed first. I suggest that MS should learn to accept that they cannot write bloated operating systems and expect embedd

        • The handheld systems of today may be not up to scale of MS's software, however eventually they will be.

          That, I believe, is why MS shoehorns in more requirement and code than needed or is reasonable -to get developers and users used to their presence, so that 5-10 years from now, when battery, storage and processing power are up to par, MS will be ready.

          It's a strategy that dooms today's users to slow applications with technology bound inappropriately to the local machine (rather than on the server), but t
    • all this carry on about large and unwieldy software for "embedded systems", Compact Framework isn't meant to run on a PIC like some tiny embedded OSs are, you're not going to run Linux on a basic stamp either, they're not designed with that in mind.

      Compact Framework is designed for WinCE devices, WinCE devices meet a few requirements, you have to meet those or you won't run it... this bashing is somewhat pointless.
  • Another good CF book (Score:2, Informative)

    by jra101 ( 95423 )
    http://www.paulyao.com/cfbook/index.asp

    Not finished yet but you can download all of the preview chapters of the book and send the authors feedback.
  • For the experienced CF developer, you know there is a lot to learn and its constantly evolving.

    How can you have a definitive guide to something that is constantly evolving? By the time the book prints, it will no longer be definitive...
    • Well, it's pretty simple. Software tends to come out in versions or builds. At any given time, you can have a definitive explanation of that build or version. Just because an OS for instance is always being developed, there can't be a definitive guide?
  • Rewarding, I doubt it.
  • According to www.addall.com, Overstock.com sells it for $34.49+1.40 shipping or $35.89, $6.10 cheaper than Amazon and a whopping $16.09 cheaper than Barnes & Noble.
  • So what is it? (Score:2, Insightful)

    by Anonymous Coward
    As usual, Slashdot reviews don't bother to write even a single introductory sentence about what the technology being discussed is about.

    I guess the quickest way to answer it is as usual: What Java technology did MS rip off and hype under a new name today?

    Compact... I'm guessing J2ME?

    - LarsW

    Ironically, Slashdot seems to currenntly render the preview page incorrectly for Firebird, so I had to start IE to post this...
  • Check out these gems:

    If you are new to the .NET Compact Framework, you are about to embark upon a challenging yet rewarding path by writing CF applications. For the experienced CF developer, you know there is a lot to learn and its constantly evolving.

    1,000 pages including the index, tables of contents etc. It's composed of 22 chapters and 6 appendices.

    if they covered everything to the level of detail this subject entails, the book would be 20,000 pages and take years to write.

    ...into Unm

    • by siphoncolder ( 533004 ) on Thursday November 20, 2003 @02:54PM (#7522665) Homepage

      Most of the time, the problems I need to solve are specific enough that the cookie-cutter approach won't work - the client always wants some special functionality that the framework's architecture can't provide.

      Well, good for you. Not trying to troll or anything, but really: good for you.

      Honestly, you think even a syntax isn't some kind of framework?

      A framework is every bit as useful as your standard libraries are, and usually they do the job quite nicely for the majority of people who have to care. Thankfully, you don't have to care anymore - but that's not some kind of grand liberation.

      But really, good for you.

      • Yes, I suppose syntax is some kind of framework when the denotative definition of the word is used. But to most programmers, the word "framework" means a collection of libraries which provide some nice functionality at the expense of being forced to do things in a certain way.

        And that's what I took issue with. There seems to be this mantra that "bigger is better", especially when it comes to the API. What inevitably happens is that 90% of the functionality provided by the framework could be implement

    • Frameworks and GOTOs - that's surely a stretch. Try writing a marginally useful Java application without using oh.. say ArrayList, HashMap, System, .. hell you can't even write a "Hello World" without System, and that's part of the framework ( java.lang.System ), not part of the language.
    • Why would I ever want to take the time to learn the 1,000-odd pages of this framework if I can roll my own in less time, and it will do what I want?

      Well take automatic cross-compiling for the entire PocketPC line to start with...

      Throw in that you can use the same skills and APIs as your other .NET experience has taught you and you're pretty good.

      Bottom line: if you're a linux coder and have never looked at .NET, Why in hell would you think that a book about writing .NET for mobile devices is for you?

      If
    • Yes, absolutely, why waste time learning a framework, when when you can write the entire thing in machine code from the ground up.
    • So, if I get this right, the Compact Framework isn't really that compact, and the authors encourage using unmanaged code to get around the unsupported things. And since it's constantly evolving, by the time I've mastered one version, the next will be out, and I'll have to learn that one too...

      It's Compact compared to the full framework. And yes, you do have to use PINvoke to get many things done - The CF just came out for God's sake. As far as the mastering issue, I guess that depends on how fast you l

  • Or does this review read as if it were written by the publisher?
    • Well, the publisher nor Microsoft had anything to do with it. I'm a PDA software developer and have been for a while - and I'm enthusiastic about any good CF related book. This book rocks.... Did you read it? Does every review of a book that's enthusiastic about it 'sound like it were written by the publisher?'
  • by truthsearch ( 249536 ) on Thursday November 20, 2003 @02:57PM (#7522692) Homepage Journal
    Microsoft's had UI design guidelines for about 20 years. They continually change as new ideas come to the interface (e.g. now tabbed documents are preferred over MDI). But Microsoft has never completely followed them. Their own apps go against their own guidelines. For example, they always said to never defy the user's color settings when making a menu, and then Office XP came out with a custom menu. They say your apps should have consistent file dialogs, yet every app they create has a different dialog, sometimes changing from version to version.

    They ask everyone to follow certain guidelines while they ignore them. I gave up on their suggestions years ago and instead follow general best practices depending on the situation.
    • by Anonymous Coward
      Microsoft's had UI design guidelines for about 20 years. They continually change as new ideas come to the interface (e.g. now tabbed documents are preferred over MDI). But Microsoft has never completely followed them. Their own apps go against their own guidelines.

      That's why they are called "guidelines", I guess.

    • I use their apps--the dialogs are the same, I don't know what you're talking about.

      Office XP and 2003 both adapt to your color scheme. They simply use custom graphics to display them.
      • Ok, try Office XP on Windows 2000. Choose File, Save As... in any of those apps. Now open notepad. Choose File, Save As... Now open Query Analyzer for SQL Server 2000. Choose File, Save As... None of them look the same. Their guidelines say to use the "standard" controls distributed with Windows. Yet create a VB app using the standard file dialog control and you'll see yet another dialog.
    • Microsoft actually does a pretty good job of following its own guidelines. Not perfect, but fair. File dialogs aren't perfectly consistent (I hate the ones in Office 2000), but they're usually similar.

      Apple is about the same in terms of overall compliance, but generally writes their guidelines to suit how they did it in their latest apps (PS: this is why their guidelines often seem senseless or arbitrary).

      The most important thing is interface standards within individual applications. It's also importan
      • It's a shame that Apple "corrects" its own guidelines like that. It wasn't always this way. Back in the day, Apple did the Right Thing, and even if they didn't follow the guidelines, at least they left them intact.
    • They ask everyone to follow certain guidelines while they ignore them.

      Obviously, this is just one more thing they copied from Apple...

  • A 1,000+ page book entitled The definitive guide to the Compact Framework? Sounds pretty ironic to me.
  • Shameless Plugs (Score:2, Insightful)

    by Ba3r ( 720309 )
    I am really gettting tired of shameless plugs for MS related books by people who have no trace in the slashdot community. The review was a play by play that gave me little depth as to the quality of the book, and little reference to other books on the topic. And of course the author of the review came from a Compact Framework specific site, so what would qualify him to write a review of a book that introduces the Compact Framework?

    And before you call me biased, know that I love c# and .NET, and use it ex
    • Are you kidding? The fact that the author (me) 'came from a Compact Frameword specific site' somehow discredits him? First, let me clear a few things up. I work on multiple web sites, devbuzz is just one of them. Morever DEVBUZZ is not a Compact Framework Specific Site. Check it out for yourself, we feature many different technologies, only one of which is the compact framework. Being that our site has been around 2 years longer than the CF, it's absurd to say it's a CF specific site. But, assuming i
      • I thought your review sounded like a chapter summary and marketing short, not an evaluation as to the quality of the book. Deal with it.
        • I have dealt with it, I was just pointing out how silly your comments sounded to me. And not surprisingly, you didn't repsond to as much as one of my points. I did with yours but oh well. As you say, Deal with it.
  • by RevAaron ( 125240 ) <revaaron@@@hotmail...com> on Thursday November 20, 2003 @03:55PM (#7523132) Homepage
    Ahoy- Anyone used the .NET CF on WinCE.NET 4.1? I have a device (Sigmarion III, 800x480 5" screen and a real keybard- mm mm good) which runs it. According to what I can find at msdn.microsoft.com

    How much of the regular .NET framework translates to the Compact Framework? I think .NET is way cool, but if one was just restricted to VB.NET/CF and C#/CF I don't think I'd be interested. For me, it really is about the many-language inter-op. I would love to have some interpretable language- Smalltalk, Lisp, Perl, Ruby or even Python that had a .NET CF version with which I could play with making CE apps with the .NET API.

    I already have a number of languages on the Zaurus C760 and Sigmarion III. The Zaurus isn't as good as CE as far as having a lot of options for developing "real" apps on the device itself. I could probably compile GNU Mono for the Z pretty easily, but without the ability to create "native" apps for Qtopia, it's no fun. :)

    I already do a lot of coding on WinCE (and Linux PDAs) in various languages, but using .NET would be even cooler... I bet portability to the desktop version would be pretty good too. I don't even have a Windows machine to doing the development, I do it all on the PDA or on my Linux file server. But then again, I'm an anamoly; the Sigmarion III is pretty much my primary computer.
    • If you're used to programming for CE, the differences between the regular and compact frameworks are pretty similar to full-blown MFC and what is available on the CE SDKs. Basically, a lot of stuff is missing, some of it pretty important, but since the full version has about 6 ways to do something there is usually at least one that is supported on CE.

      For some of the things that are missing (like COM interop) there are third party packages that give you the functionality back.

      My biggest gripe is with Windo
    • You can potentially use any language you want. Unfortunately right now you need to build a compiler for the bytecode.

      There are apparently numerous "top secret" languages being developed for the .NET Framework which will compile using VS.NET. Just how the average joe can utilize them, I do not know.

      Give it time, there will eventually be support for more languages.
      • What about support for coding on the unit itself? For me, my WinCE.NET 4.1 Sigmarion III is my main computer. Beats my Zaurus C760 for that any day of the week. I've no interest in buying a Windows PC to run VS.NET, so I sure hope a language or two (preferably a Smalltalk or Lisp-like language, perhaps something perl or pythonish) pops up where I can do the development for .NET CF on the WinCE device itself.
  • If you are new to the .NET .... turn around and run!
  • "If you are new to the .NET Compact Framework, you are about to embark upon a challenging yet rewarding path by writing CF applications."

    You can't just hack some software together nowadays, everything's a goddamned quest with trials and tribulations.

    At least now I know who does those fucking motivational posters.
  • have you ever met a developer that didn't think think he was a UI expert?

    Here I am!

    Pretty much everything I write either implements the server side of a protocol, or reads from an input stream and writes to an output stream (maybe looking at some command line parameters).

    (OK arguably the command line parameters constitute UI, but not in the spirit of the article)

    I know a bad UI when I see it (and I'm vocal in my criticism when I do) -- but there's no way I could design good UI myself. Leave that to the

The first sign of maturity is the discovery that the volume knob also turns to the left.

Working...