Chapter 9. Mapping Well-Known Patterns onto Symbian OS

In this chapter, we describe the following well-known design patterns and how they are applied and used on Symbian OS:

  • Model–View–Controller (see page 332) was first described in [Buschmann et al., 1996]. Symbian OS ensures every application uses this or a variant of this pattern so that they are easier to maintain, test and port between different mobile devices.

  • Singleton (see page 346) was first described in [Gamma et al., 1994]. This popular and sometimes controversial pattern (used to ensure an object is unique) is included because the standard mechanism of implementing it using writable static data hasn't always been available to Symbian OS developers. Whilst it is available in Symbian OS v9, alternative solutions are recommended for widely used DLLs due to the large impact it can have on memory usage.

  • Adapter (see page 372) was first described in [Gamma et al., 1994]. It is commonly used for at least the following three use cases: preserving compatibility by enabling an interface to continue to be provided that is re-implemented in terms of an upgraded interface; wrapping existing components to allow them to be ported to Symbian OS; and supporting a choice of components at run time by adapting them to a plug-in interface.

  • Handle–Body (see page 385) was perhaps first described in [Coplien, 1991]. This pattern introduces an additional layer of abstraction between the client of an interface and its implementation. This is ...

Get Common Design Patterns for Symbian OS: The Foundations of Smartphone Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.