Sponsored By Aspose - File Format APIs for .NET

Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!

Building tablet applications, the book

The only real developers book for Tablet PC’s I know is “Building Tablet PC applications” by Rob Jarrett and Philip Su (MS press). A couple of reviews nominate that book as the printed form of the Tablet SDK help files. That’s pretty unjust.

A tablet PC is a machine running XP pro with extra’s. Besides applications designed for the tablet you can run any existing Windows app on a Tablet. A tablet app will run on “normal” Windows as well, provided you include the right dll’s in the setup. But over there it will not provide all Tablet functionality; a mouse can be used as a substitute for the pen but the text recognition just does not work. So it does make sense to add tablet functionality to an existing application as that will not make the application dependent on a tablet.

The tablet SDK does comes with a lot of documentation. The nice thing about the tablet API is that is provides multiple program interfaces. Of course there are the managed API’s but almost all functionality can also be addressed via good old COM. Besides a full reference of the classes in the API the SDK contains samples. These samples are written in a variety of languages and technologies, from C# to C++, from NET to COM. The SDK does not  make a choice which audience to target. The tablets COM api interface is the way to add tablet functionality to an existing C++ or VB6 application.

Rob and Philips’s book does make a choice: the managed API is the way to go, when you need the COM api you have to find the corresponding interfaces yourself. As both API’s have the same structure that is not too difficult. When it comes to samples included the book really shines. A very well structured set of C# code samples clearly demonstrate the architecture of the Tablet API and how to build on that.

The tablet PC is defined in the appendix, which lists the logo requirements:

  • A digitizer with pen meeting specific quality requirements.

  • Power management. The battery should last long enough and the machine should resume fast enough

  • Changing view mode (from portrait to landscape) without rebooting

  • Support surprise docking. That is: the user can pick up her tablet and walk away. The machine should handle the (for instance) bluetooth keyboard left behind without the need of user intervention.

  • Legacy free

  • Have a ctr-alt-del button

Some of these points are broader than just the tablet. Take the surprise-undock requirement. This means that your apps cannot keep connections to databases or files open. When the resources are on a network whose connection is dependent on the docking state of the tablet you are in deep trouble when the user does walk away. But when you think of your tablet app as a disconnected web-client you are in the (hopefully) familiar asp.net world again.

The book focuses on pen-input. The main part follows the API’s architecture which is layered

  • Pen gestures and strokes

  • Collecting ink

  • Rendering ink

  • Serializing and persisting ink

  • Recognize ink as handwriting

Pen input consists of gestures and strokes. In a separate layer these strokes are transferred to actions or ink, drawn on the screen, transformed or persisted. In another layer the strokes can be recognized as handwriting. The samples will guide you step by step, the illustrations make clear how the parts of the API stick together and how it fits into Windows.

These main chapters are wrapped in an introduction to the history of the tablet and an investigation of the two ink enabled controls which come with the SDK. Having finished the book you will have a clear comprehension of building tablet apps. Keep it close at hand (an e-book version is included on the accompanying disk), scribble away and see you at Windows Anywhere


This entry was posted in Tablet+PC. Bookmark the permalink. Follow any comments here with the RSS feed for this post.