Friday, April 04, 2008

S60 View based UI application architecture

The S60 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.

S60 platform applications that follow the S60 view architecture require:

1. A UI controller derived from CAknViewAppUi
Responsibilities are
a) It creates one or more CAknView-derived view controllers.
b) It handles events that are not handled by the view controllers.
c) To switch between views, it activates and deactivates views.
d) It handles menu commands passed to it by the view controllers.
e) It receives events such as layout and foreground notifications from the run-time environment.

2. A view controller derived from CAknView
Responsibilities are
a) It creates one of more CCoeControl-derived views.
b) It handles registering controls for key event handling.
c) It handles menu commands.

3. 1 or more views derived from CCoeControl
Responsibilities are
a) Shows application data and state on the screen.

As this architecture allows one view to be active in each application, so it is not appropriate in the following cases:

1. Applications with any view that cannot cleanly handle unexpected activation of another view in that application.
2. Applications that provide views that can be nested over other applications, [except where embedding is used.]
3. 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).

No comments:

stats counter