The following image illustrates the components of the view architecture approach.
Figure: View architecture classes
Symbian platform applications that follow the view architecture require:
a UI controller derived from CAknViewAppUi
a view controller derived from CAknView
a view or views derived from CCoeControl
The view architecture only allows one view to be active in each application. If a new view is switched to within an application, the current view is immediately deactivated, so this architectural approach is not appropriate in the following cases:
Applications with any view that cannot cleanly handle unexpected activation of another view in that application.
Applications that provide views that can be nested over other applications, except where embedding is used.
Applications that provide controls that can be used inside other applications (for example, using a Web control inside an e-mail viewer to show an e‑mail with HTML content).
Typical responsibilities in this architecture are:
CAknViewAppUi
-derived class
acts as a UI
controller:
It creates one or more CAknView
-derived view controllers.
It handles events that are not handled by the view controllers.
To switch between views, it activates and deactivates views.
It handles menu commands passed to it by the view controllers.
It receives events such as layout and foreground notifications from the run-time environment.
CAknView-derived class acts as a view controller
It creates one of more CCoeControl
-derived views.
It handles registering controls for key event handling.
It handles menu commands.
CCoeControl
-derived view:
Shows application data and state on the screen.
For information on the CAknApplication and CAknDocument-derived classes, see Framework requirements for GUI applications.