week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-BDDDF68F-F7C3-43AF-8B6C-C77C701FD2A9" xml:lang="en"><title>Framework
requirements for GUI applications</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>Applications developed for the Symbian platform can use a number of
different architecture solutions to meet their requirements. One example of
a common approach includes the Model - View - Controller (MVC) pattern used
in GUI-based applications. In this approach, the application is split into
three separate logical parts. Each part contains a different aspect of the
entire application, and has a specific role.</p>
<fig id="GUID-5E3A844B-CCF3-4F2A-82A9-DA7A5B65A572"><title>Logical dependencies in the MVC pattern</title><image href="GUID-A5E152B2-F15C-4809-A52A-BCDDBCD93255_d0e63339_href.png"/></fig>
<p>In this approach, the model:</p>
<ul>
<li><p>contains and manipulates the data in the application</p>
</li>
<li><p>is owned by the controller</p></li>
<li><p>is typically implemented in its own class or classes</p>
</li>
</ul>
<p>the <xref href="GUID-DAC32BB9-C0EB-42FF-A596-C2F1A90A4BD7.dita">view</xref> :</p>
<ul>
<li><p>displays the application state known by the model</p>
</li>
<li><p>receives user input</p></li>
<li><p>notifies the controller of relevant events</p></li>
<li><p>is implemented either with a <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeControlClass.html" format="application/java-archive"><parmname>CCoeControl</parmname></xref> derived
class or a <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknView.html" format="application/java-archive"><parmname>CAknView</parmname></xref> derived
class</p><p>For more information on these options, see <xref href="GUID-B5DE1C86-2B16-4B22-887F-7079E54A8ED6.dita">Traditional
Symbian UI application architecture</xref> and <xref href="GUID-68B999C2-0993-4804-9624-42C3D88BE5C7.dita">View
architecture</xref>.</p></li>
</ul>
<p>the <xref href="GUID-FD2CDEB8-0784-4BE5-A775-170F57D71BBC.dita">controller</xref> :</p>
<ul>
<li><p>handles application-wide events</p></li>
<li><p>commands the model, typically based on user input</p>
</li>
<li><p>selects the view to be displayed</p></li>
<li><p>is implemented either with a <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknAppUi.html" format="application/java-archive"><parmname>CAknAppUi</parmname></xref>-derived
class or a <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknViewAppUi_1_1CViewActivationItem.html" format="application/java-archive"><parmname>CAknViewAppUi</parmname></xref> derived class.</p><p>For more information on these options,
see <xref href="GUID-B5DE1C86-2B16-4B22-887F-7079E54A8ED6.dita">Traditional
Symbian UI application architecture</xref> and <xref href="GUID-68B999C2-0993-4804-9624-42C3D88BE5C7.dita">View
architecture</xref>.</p></li>
<li><p>requires the implementation of <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknApplication.html" format="application/java-archive"><parmname>CAknApplication</parmname></xref> and <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknDocument.html" format="application/java-archive"><parmname>CAknDocument</parmname></xref> derived
classes.</p></li>
</ul>
<p>The pattern is implemented with the following classes.</p>
<fig id="GUID-B4508A88-B688-4BB7-B42A-31BFF41CD4FA"><title>Relationship between the classes that make up a typical Symbian application</title><image href="GUID-DD6CB072-E152-4683-83B3-DB4BBFD6C4B6_d0e63459_href.png"/></fig>
<p>The <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknApplication.html" format="application/java-archive"><parmname>CAknApplication</parmname></xref>-derived class:</p>
<ul>
<li><p>provides the application object expected by the application
framework when the application is launched</p></li>
<li><p>defines the application properties</p></li>
<li><p>creates the <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknDocument.html" format="application/java-archive"><parmname>CAknDocument</parmname></xref> derived
class if it does not exist yet</p></li>
<li><p>if an instance of the application is already running, switches
to that instance and exits</p></li>
</ul>
<p>The <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknDocument.html" format="application/java-archive"><parmname>CAknDocument</parmname></xref>-derived class:</p>
<ul>
<li><p>creates the controller class</p></li>
<li><p>is the base class for application documents</p></li>
</ul>
</conbody></concept>