App design fundamentals

The BlackBerry 10 Native SDK provides a solid environment for you to develop apps. Before you get started, you should familiarize yourself with app development concepts.

Each app has a basic structure. Apps run as executables on the BlackBerry 10 OS, which is the operating system on BlackBerry 10 devices. In general, an app includes code that:
  • initializes resources, such as memory, data, and graphics
  • registers with services to receive events, such as screen changes, gestures made by a user and so on
  • executes a main loop that handles events from the OS, handles input from the user, updates data and state information, renders graphics, and plays sounds
  • frees resources and performs clean-up activities

Each app has a life cycle. It is important that you understand that your app won't be the only app running on a device. Multiple apps can run at the same time and they may impact your app from the perspective of memory usage and activity. Hence, it is necessary to understand how to save your state, respond to deactivation and activation events, handle low memory conditions, and handle system-wide scenarios, such as when the device goes into standby mode.

When you design your app, you should consider:
  • using existing libraries that are available
  • assigning only the permissions required
  • changing the appearance of icons and images
  • including assets and data required
  • deciding on the services required
  • optimizing the amount of memory required
  • optimizing the number of processes and threads required

To build a good understanding of managing memory, processes, and threads, refer to the QNX Neutrino Programmer's Guide.

Last modified: 2013-12-21

comments powered by Disqus