The term view refers to the MVC design (Model-View-Controller) component that has the following attributes:

  • displays the application state known by the application

  • receives user input

  • is owned by the UI controller

  • observes application state changes either directly or through the UI controller and updates the screen accordingly

In practice, views are collections of interface elements, such as controls, menus, command button areas (CBAs), key events, that make up one top-level window in an application. Applications may have one or more views. If an application has more than one view and if the status pane behavior is organized in this manner, then each view in an application can have its own tab. Applications can have only a single view active at any one time. The current view is the view that interacts with the user, receiving events and menu choices as if it were the only set of UI elements.

Multiple view architectures are widely used in application development on the Symbian platform. Multiple view architectures:

  • provide developers with an efficient way to build multiple views within an application and switch between them easily and simply.

  • allow applications to bundle their user interface requirements into a single element (a view). The view architecture then provides the capability to switch quickly between the views.

  • allow applications to take advantage of object orientation to encapsulate code, keeping it simple and clear.

  • provide the ability for one application to activate the view of another. This is particularly useful when you want to use an existing display or editing capability without going to the expense of integrating a component into your application.

  • allow applications to register views, with one view being active in each running application at any one time. It does not dictate what a view is; however, it does provide support for a view being a display page on the screen

Figure 1. Controller-view hierarchy in traditional and Symbian architectures

In practice, the view concept varies depending upon your chosen architecture approach:

Traditional architecture views

In a traditional architecture, the view is derived from CCoeControl, which typically constructs a top-level window-owning control that draws itself and contains other controls.

For more information on views in tradition architecture approaches, see Traditional Symbian UI application architecture.

Symbian architecture views

In Symbian view architecture, a view controller is added between the UI controller and the view that draws itself and contains other controls. For example, view controllers can be used to specify CBAs that are specific to specific views.

In a Symbian architecture, the view controller is derived from CAknView, which is derived directly from CBase and not from CCoeControl. This means the CAknView-derived views are not controls. CAknView-derived views need to contain CCoeControl-derived classes to provide visual representation on the display.

For more information on views in Symbian architecture approaches, see View architecture.

Dialog architecture views

In dialog architectures, views are implemented in modeless dialog boxes. Multiple views can be constructed using nested dialogs or a tabbed dialog pane.

For more information on views in dialog architecture approaches, see Dialog architecture.