PreCom – building robust applications for Windows CE

This week I went with two colleagues to get certified in using the PreCom framework, which is developed by Pocket Mobile. So we spent two days at Vertica office in Ballerup, learning about the API and how to install and configure a PDA to run PreCom.

What is PreCom?

The PreCom framework consists of 5 building blocks on top of the Compact Framework. In decending order of importance they are: communication, storage, updates , logging  and hardware.

The communication part enables offline communication, making modules for PreCom robust to working environments where the connection is unstable, or you are simply not in range to stay conncted all the time. The PreCom platform uses Microsoft Message Queue as a servicebus just like you might know it from NServiceBus or Biztalk.

Storage in PreCom is based on a local SQL CE 3.5 database, so the framework has some wrappers to encapsulate how the connections and commands are handled. Besides that its very straight forward to work with like most SQL databases.

Updates are one of the nice PreCom handles very nicely. It is quite simple to make a module and deploy it to the devices connected to the server. Just build a module, deploy it under IIS and register it in the PreCom database. At startup, the clients will download the module and restart the application completing the update.

There is not much to say about the logging and hardware parts, but of course it would not be much of a platform without them. Besides the 5 main features PreCom contains some classes for creating modules, and it helps make it a little easier to build graphical interfaces that work well on a PDA.

Certification or whatchamacallit

The certification for PreCom not certification in the common sence of the word, since there are no exams or tests. It is mostly an introduction to using the platform, and then you get some time to do tasks, and ask questions about the framework and platform.

The first day we started out installing Windows Mobile 6 Professional SDK and SQL CE 3.5 – which make up the platform for PreCom. After that we configured the PreCom application, and went through basic deployment and debug scenarios. While doing this we wrote the obligatory Hello world appication before moving on to another old friend  – the Ecco service. This way we got to see how to build a PreCom module, and we got a couple of controls from the framework into play. With the Ecco service we also made use of the Message Queue, and could see the messages flow through the SQL CE database.

On day two we wrote a login module and did some tasks demonstrating how to use storage, logging and listening to events from the devices on the server. We also talked a little about how to structure modules, and that one of the things they admit is missing is a web interface for doing stuff like configuration. Writing a simple webapp for the things you need to configure in a given module is pretty easy though. So it would probably be a good idea in order to avoid making changes to configurationfiles and in the database manually.

To sum up it’s been a fun couple of days – getting to learn a new framework and play with gadgets is always enjoyable. So now it will be interesting to see what we get to build for use in the real world…

Christian Holm Nielsen
Vertica A/S

Kategorier: Mobil, Udvikling

Tagged as: , , ,

Skriv et svar

Udfyld dine oplysninger nedenfor eller klik på et ikon for at logge ind: Logo

Du kommenterer med din konto. Log Out / Skift )

Twitter picture

Du kommenterer med din Twitter konto. Log Out / Skift )

Facebook photo

Du kommenterer med din Facebook konto. Log Out / Skift )

Google+ photo

Du kommenterer med din Google+ konto. Log Out / Skift )

Connecting to %s