The Definitive Guide to the Compact Framework
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.
For help with development on PocketPC some colleagues of mine and I have created a PocketPC-Development mailing list on yahoo groups:
.NET CF. There are also links to articles, useful utilities, etc.
PocketPC-Development
It is still in its infancy, but we have several whizz developers who know everything about WinCE and the
If you're interested in joining, click the link!!
When you say CF a lot of people think of Macromedia's Cold Fusion. That can get confusing.
SCO.com uses Linux
Froogle 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 and search on the isbn: 1590590953.
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.
I write code.
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.
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...
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.
i'm amazed that i survived - an airbag saved my life.
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.
Developers: We can use your help.
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?
.NET, and use it exclusivly everyday for development. But I want from slashdot real reviews, not MS marketing.. i have to sift through enough of that when i want details on upcoming technologies.
And before you call me biased, know that I love c# and
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
.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.
:)
.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.
How much of the regular
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
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
Yes, absolutely, why waste time learning a framework, when when you can write the entire thing in machine code from the ground up.
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 tight squeeze. Usually we need to ditch some of our functionality to fit it :)
Quite frankly Microsoft are stuck with the misfortune of designing only for x86 PC desktops. You end up assuming memory and CPU are infinite - both of which are in short supply in embedded systems. A laughably short supply in some cases: how about 64KB of RAM and 30MHz to fit an API into? How about not having a dynamic memory allocator? Yeah, no mallocs allowed! How about if your endian isn't little, your chars aren't signed, your shorts aren't short, and your ints won't work unaligned? Practically every piece of "portable" code I've used from a commercial entity completely ignored these problems.
The thing is - you can have your cake and eat it! It is entirely possibly to write compact APIs which don't lose anything when used on desktop system. They usually benefit from a thoughtful design. I hate to use Linux as an example (especially in the same context as Microsoft), but it really is a good example of thoughtful API design - especially in the sense that "x86 != world". It's not in the same ball-park as some embedded OS's, but it's compact enough to use in devices with around 1MB of RAM (with a bit of tweaking, granted). A much better example is Redhat eCos, which is great for anything from an MMU-less device with less than 100KB, to a full blown "desktop class" PC running a single application.
The thing which makes me laugh most from your post...
SQL CE, Embedded Visual Basic or XML
Yep - you couldn't even fit the parser for any of those in a large class of embedded systems, let alone the back end :)
It's no wonder Microsoft never managed to break into the mobile phone market... they were too busy integrating buzzwords.
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 than we had on desktops in those days.
Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma