Symbian3/SDK/Source/GUID-BDDDF68F-F7C3-43AF-8B6C-C77C701FD2A9.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-BDDDF68F-F7C3-43AF-8B6C-C77C701FD2A9.dita	Wed Mar 31 11:11:55 2010 +0100
@@ -0,0 +1,72 @@
+<?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_d0e41998_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 <parmname>CCoeControl</parmname> derived
+class or a <parmname>CAknView</parmname> 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="GUID-77329067-34D9-3698-B764-294535E660EB.dita"><apiname>CAknAppUi</apiname></xref>-derived
+class or a <xref href="GUID-2DBA2DA9-3DA7-381C-842C-9F6FEEDF973E.dita"><apiname>CAknViewAppUi</apiname></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="GUID-4F825D83-47A4-36C9-9A25-943A6D799F84.dita"><apiname>CAknApplication</apiname></xref> and <xref href="GUID-935C59EE-AD66-33FE-987B-BD97F5147CC1.dita"><apiname>CAknDocument</apiname></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-36BB14BD-34B3-4F5D-A670-707710E57585_d0e42116_href.png"/></fig>
+<p>The <xref href="GUID-4F825D83-47A4-36C9-9A25-943A6D799F84.dita"><apiname>CAknApplication</apiname></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="GUID-935C59EE-AD66-33FE-987B-BD97F5147CC1.dita"><apiname>CAknDocument</apiname></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="GUID-935C59EE-AD66-33FE-987B-BD97F5147CC1.dita"><apiname>CAknDocument</apiname></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>
\ No newline at end of file