Search Pocket PC Life's 126 Pocket PC-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Understanding the Auto PC's Running Application Model (continued)

Consumer appliances typically do not burden the user with much of this. Yes, a consumer must know things like how much video tape is left before recording a program with their VCR, but it doesn't go much beyond that. Obviously, the PC experience has been maturing over the last 20+ years. Computers are much easier to use than they were even five years ago. However, with all the advancement in programming practices, increased memory, storage, and CPU power, the user is still left to manage the system resources. Leaders in the PC industry,such as Microsoft, have come to realize that it is time to fold this responsibility into the software. The Auto PC is one of the first products that attempts to take responsibility for its resource management. A cornerstone of that effort is the Running Application Model.

Guidelines for implementing the Running Application Model
On any computer, a running application knows when the user is interacting with it. The Running Application Model requires each application to take that knowledge and make use of it in managing its resource usage. For instance, if the application is not in the foreground (i.e., it doesn't currently own the display, keypad, Speech Recognition), then it should free up as many resources as it can until the user needs it again. For some applications, this can mean simply exiting when the user switches away and restarting when the user switches back. For others, this might mean freeing up memory used for caching information and providing fast user feedback when the application is in the foreground. Still, others might not be able to free up any memory but can drastically reduce their CPU usage. The following guidelines can be used to help an Auto PC software developer make his or her software a good citizen by participating in the Running Application Model.

Exit strategy
Generally speaking, applications should always try to exit when the user switches away from them, either immediately or after some period of idle time, if at all possible. Obviously, applications that do background processing like the CD Player or Navigation can't do this until they are no longer doing their background processing.

Implement Fast App Start
When an application is launched on the Auto PC, it has about 1.5 seconds to call RegisterStartedApplication before it gets put on the Auto PC's suspicious behavior list. After 20 seconds, if the application has not registered, the Auto PC will terminate the application. The goal here is that all applications give the user either a visual or auditory response before 1.5 seconds expires. This can mean that your main application initialization doesn't happen for some time after the 1.5 seconds, but getting the splash screen up is important. Fast application startup is especially important if your application exits each time a user switches away from it.

Fully implement WM_CLOSE support
When your main application message loop gets a WM_CLOSE message, it's from the Auto PC requesting that your application save its state and shut down immediately. If your application is requested to close but cannot because it's busy, at least have it go into some form of WM_HIBERNATE until the application is activated again. It's important to keep in mind that an application that chooses not to close down or does not close down in three seconds may simply be terminated by the Auto PC. This forced termination usually happens when the user is installing an upgrade to your application.


« Previous  ·  1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Gear > Car tech (19 articles)
   Moving beyond the battery
   Manage your car's mileage with AutoFile
   Gas misers just wanna have fun
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
DominoPower: Application development, William Shatner, and the origin of the universe
OutlookPower: More about disappearing text
-- Advertisement --

ONLINE GROUP CALENDAR - FOR UP TO 100 OF YOUR CLOSEST FRIENDS
Stay organized and in control with 24/7 access to all of your important events, projects and files --whether you're at work, at home or on the road.

You can share your calendar, projects and files so everyone in your office is up to date. Plus, search your entire group to find times when everyone is available to meet, manage company resources and much more.

Organize your entire team for as low as $9.95 per year (and yes, that's where the decimal place is supposed to be!)

Tap here to get started right away.

-- Advertisement --

SECURE YOUR SITE WITH AN IRONCLAD SSL CERTIFICATE
An IronClad SSL Certificate helps you build an impenetrable fortress around your customer's credit card information. IronClad SSL Certificates are:

  • Fully validated
  • Up to 256-bit encryption
  • Up to 10 years validity
  • Stringent authentication
  • Around-the-clock customer support

Build trust. Protect your customers. Grow your online business.

Tap here now and be IronClad with SSL tonight.

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1999-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login