Slashdot Mirror


Server CE Database Development with .NET

William Ryan writes "SQL Server CE is Microsoft's preferred database backend for its Compact Framework initiative. Compact Framework is a cool technology, but it's still in its infancy. This book does a lot to help you get started using SQL Server CE." Read on for the rest of Ryan's review, or revisit his November review of a related book, The Definitive Guide to the Compact Framework . SQL Server CE Database Development with the .NET Compact Framework author Rob Tiffany pages 450 publisher Apress rating 10 reviewer William Ryan ISBN 1590591194 summary A start to finish discussion of using SQL Server with SQL Server CE on the Compact Framework

This book comprises 10 Chapters in just under 450 pages, including the indexes and usual book stuff. Since CE supports ASNI Sql, there are a few chapters that discuss using SQL to manipulate databases, which are probably not necessary for most database programmers. Chapters 4-8 are dedicated to DDL (data definition language), DML (data manipulation language), and taking advantage of metadata. It's a good discussion of these subjects, and I guess an author must include them to be thorough, but if you aren't that familiar with SQL, you probably have some learning to do before diving into data-driven PDA apps.

Enough about the background, though. The book really excels in two areas, one of which I think is probably useful to any developer, even if you don't use the Compact Framework or Microsoft Products. That area is security.

Far too many developers blow off security concerns, or claim to care but do little or nothing about actually increasing security. Let's face it: no matter how secure your OS is, no matter how killer your firewall is, today there are a lot of people trying to break your app and they aren't always outside of your company. Tiffany points to a GIGA Information Group article criticizing the industry for ignoring security on mobile devices.

A lot of what he says is focused on security issues that are 'common sense,' and yet ones that people ignore all the time. It's kind of a shame that a writer needs to explain the benefits of using 'Strong Passwords,' but let's face it, no matter how well you write your app, it won't be secure if you leave the front door open.

In no way am I saying that the author's discussion of security is limited to such elementary topics, but he does a great job of bringing many issues into focus and suggesting ways to deal with them.

The other area that this book really excels in is getting you through replication. This is not a fun topic if you don't know what you are doing and there isn't a lot of literature out there to help you get through PUSH/PULL subscriptions and the like. Pragmatically speaking, of the topics this book covers, Tiffany's coverage of replication is probably going to benefit people the most, because if you can't sync your PDA with your server, you are effectively out of gas. If you aren't a Sql CE user you won't appreciate the value of this chapter, but love MS or hate them, the newsgroups and forums are filled with folks with the same sorts of problems that the author works diligently to get you through.

It's hard to know what will and won't work yet on the Compact Framework and CE. It's quite helpful to have a list of common functions that are supported listed in depth -- another thing I liked about this book.

What else? Well, the text was well written, very similar to his last book on Pocket Access (Pocket PC Database Development with eMbedded Visual Basic) and easy to read. If you are a total newbie to CE, you can use this book and hit the ground running. Everything that you need to write professional apps is included, and I can't find anything that Tiffany omitted.

I really appreciate the fact that the author wrote an entire book on such a niche subject. Many areas, particularly the Compact Framework, don't have a lot of literature on them and if you are writing SQL Server CE, you are on your own...until now.

If you develop in CE, or plan to, this book is a Must Have.

You can purchase SQL Server CE Database Development with the .NET Compact Framework from bn.com. Slashdot welcomes readers' book reviews -- to submit a review for consideration, read the book review guidelines, then visit the submission page.

7 of 162 comments (clear)

  1. Somebody please port MySql :) by Mean_Nishka · · Score: 3, Interesting
    I'm so desperate to see a Mysql port to Windows CE.. I've been running this along with PHP/Apache on my Sharp Zaurus and that platform proves it's possible to do this stuff with open source software and 206mhz Strongarms.

    While I haven't been interested in shelling out the $$$ for Microsoft's server product (getting data back to the desktop database is important to me) I can say that I haven't found any database solution that operates as quickly as MySql on a PDA.

    My Zaurus is running as a full fledged server and its rock solid. Even the desktop ODBC connector is able to pull data into my windows apps at a surprisingly fast rate of speed. In a word it's simply awesome. I just wish my PHP skills were better.

    For the mortals Microsoft offers an Access compatible format (pocketAccess) that's horribly limited and slow. There are some great PocketPC database apps that are crippled by this horrific database solution that could be killer apps with a free backend.

  2. Re:Sql Server CE? by Anonymous Coward · · Score: 1, Interesting

    The name was chosen by the branding bozos, not by the product development team.

    SQL Server CE is called "SQL Lite" internally at Microsoft. Different team, different thing than SQL Server.

  3. free and high quality alternative by e4liberty · · Score: 4, Interesting

    The very high quality embeddable SQLite database has several ports to .NET -- see the web site.

  4. pipe dreams by Anonymous Coward · · Score: 1, Interesting
    Anyone that works with wireless apps will tell you, dream on. Not because it's not feasible to sync with a remote server, hardware limitations of devices or that .NET is good/bad. The reason is wireless service sucks and transferring large amounts of data blows. By blows I mean data more than 2-4kilobytes won't transmit fully and will most likely get corrupted.

    There are already wireless devices for field force applications, which have a database on the device. And guess what, they don't use Sql server. All of the ones I know of are custom database written with assembly to make sure the thing is fast, efficient and takes the least amount of memory. Until wireless service becomes dramatically more reliable, real-time sync between a server and a wireless device is a pipe dream.

  5. Why? by BaronAaron · · Score: 2, Interesting

    Build your application as a web app using ASP.NET/PHP or whatever. Use whatever SQL backend you want and have it run on a REAL server that is meant to do that work.

    On the PDA, throw a 802.11b card in when at the office and some sort of cellular card for when you are out and about. The only software you need on the PDA is a good web browser. Bandwidth is much less of a issue because all you are transfering back and forth is simple HTML.

  6. This just seems ridiculous to me... by AmazingRuss · · Score: 3, Interesting

    ...why separate the database engine from the development tool on a palmtop, where efficiency is paramount? Do they expect people to use a palmtop as a db server or something?

    Something like Foxpro or Access, with integrated database support, would make a helluva lot more sense. The latest version of Foxpro for the PC has a smaller runtime than what they are cramming on there for SQL CE for chrissakes! It's fuggin silly. What gets IN to those people?

    10 years ago, I was putting the entire foxpro for dos development environment on 1 meg HP xxLX palmtops, and it worked really well. Full portability between desktop and palmtop, good performance, and good stability. Why have we taken such a giant step backwards that despite the hardware being 100 times better, we can no longer build decent software to run on it?

    Everything MS does anymore should be accompanied by clown music.

    I am truly starting to believe that MS is going to be a niche player like Apple in 10 years...an idea I would have laughed at a few years back. I don't LIKE this idea...it means I have to spend a lot of time retraining...but the writing is on the wall.

  7. Re:Why is this a bad thing? by RevAaron · · Score: 2, Interesting

    Because people are pigheaded. Ignorant. etc.

    A PDA should be using a database as it's central store as it is. CE already includes a database system, though the SQL CE has more features. The NewtonOS and PalmOS both do very well by having a database at their core. I don't care if it's a sql-based relational or object database, it just makes more sense.

    The PDA is a chance to start over. With different OSes and CPU archs, compatibility isn't a big deal as it is on the desktop, where it has held back development for years. A chance to do it from the start again, and do it right.

    Something seems off in the world when MS is pushing relatively innovative ideas (database file system, .NET) and the OSS world is what is stuck in some sad desire for psychological backwards compatibility. After years of making fun of MS for doing it, so many Zaurus and Linux PDA developers are content to be guilty of the same crime. That said, at least OpenZaurus has the balls to be going with sqllite for data storage, though they've made no huge push toward it.

    Flat files are so 1950s.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad