Resources | Resources |



Applications and extensions

A Brew MP application is a self-contained software package that exposes at least one applet class (implements IApplet interface) that can be loaded and executed in the BREW Shell (or thread).

A Brew MP extension is a self-contained software package that exposes one or more non-applet classes with interfaces that can be accessed by any number of Brew MP applications for extended functionality. Extensions are similar in concept to a software plugin for a PC application. See Classes for more information.

Relationship between an application and extension

The main difference between Brew MP extensions and applications is that classes in an extension must expose their virtual function tables to the other external classes. Classes in extensions can be written without a UI, since the UI of the calling application can be used.

An application can create an instance of a class in the extension by calling IShell_CreateInstance() or IEnv_CreateInstance(). Then, each function of the class is accessible though the macros defined in the header file.

Applications are hosted inside specialized application processes and are controlled by an application dispatcher mechanism that governs the application life cycle, which includes the following:

  • Startup
  • Event & notification processing
  • Suspend/resume
  • Shutdown

Extensions are defined as software packages or modules that contain non-applet classes, which means that those classes can be in-process classes or service classes. Both in-process and service classes expose public APIs (interfaces). An in-process class can be thought of as code extension of the caller; a service class can be thought of as a background system process providing access to unique functionality.

Brew MP exposes most of its own functionality via system services, where a service can be thought of as a background system process providing access to unique functionality. Leveraging the stubs and skeletons transport model, service classes can be invoked remotely by the caller.

Applications are controlled by an app dispatcher mechanism. The app dispatcher governs the application lifecycle, including startup, event and notification processing, suspend/resume and shutdown.

For more information on services, in-process classes, and service classes, see Classes.