Symbian3/SDK/Source/GUID-BDDDF68F-F7C3-43AF-8B6C-C77C701FD2A9.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-BDDDF68F-F7C3-43AF-8B6C-C77C701FD2A9" xml:lang="en"><title>Framework
       
    13 requirements for GUI applications</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>Applications developed for the Symbian platform can use a number of
       
    15 different architecture solutions to meet their requirements. One example of
       
    16 a common approach includes the Model - View - Controller (MVC) pattern used
       
    17 in GUI-based applications. In this approach, the application is split into
       
    18 three separate logical parts. Each part contains a different aspect of the
       
    19 entire application, and has a specific role.</p>
       
    20 <fig id="GUID-5E3A844B-CCF3-4F2A-82A9-DA7A5B65A572"><title>Logical dependencies in the MVC pattern</title><image href="GUID-A5E152B2-F15C-4809-A52A-BCDDBCD93255_d0e38364_href.png"/></fig>
       
    21 <p>In this approach, the model:</p>
       
    22 <ul>
       
    23 <li><p>contains and manipulates the data in the application</p>
       
    24 </li>
       
    25 <li><p>is owned by the controller</p></li>
       
    26 <li><p>is typically implemented in its own class or classes</p>
       
    27 </li>
       
    28 </ul>
       
    29 <p>the <xref href="GUID-DAC32BB9-C0EB-42FF-A596-C2F1A90A4BD7.dita">view</xref> :</p>
       
    30 <ul>
       
    31 <li><p>displays the application state known by the model</p>
       
    32 </li>
       
    33 <li><p>receives user input</p></li>
       
    34 <li><p>notifies the controller of relevant events</p></li>
       
    35 <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
       
    36 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
       
    37 class</p><p>For more information on these options, see <xref href="GUID-B5DE1C86-2B16-4B22-887F-7079E54A8ED6.dita">Traditional
       
    38 Symbian UI application architecture</xref> and <xref href="GUID-68B999C2-0993-4804-9624-42C3D88BE5C7.dita">View
       
    39 architecture</xref>.</p></li>
       
    40 </ul>
       
    41 <p>the <xref href="GUID-FD2CDEB8-0784-4BE5-A775-170F57D71BBC.dita">controller</xref> :</p>
       
    42 <ul>
       
    43 <li><p>handles application-wide events</p></li>
       
    44 <li><p>commands the model, typically based on user input</p>
       
    45 </li>
       
    46 <li><p>selects the view to be displayed</p></li>
       
    47 <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
       
    48 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,
       
    49 see <xref href="GUID-B5DE1C86-2B16-4B22-887F-7079E54A8ED6.dita">Traditional
       
    50 Symbian UI application architecture</xref> and <xref href="GUID-68B999C2-0993-4804-9624-42C3D88BE5C7.dita">View
       
    51 architecture</xref>.</p></li>
       
    52 <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
       
    53 classes.</p></li>
       
    54 </ul>
       
    55 <p>The pattern is implemented with the following classes.</p>
       
    56 <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_d0e38484_href.png"/></fig>
       
    57 <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>
       
    58 <ul>
       
    59 <li><p>provides the application object expected by the application
       
    60 framework when the application is launched</p></li>
       
    61 <li><p>defines the application properties</p></li>
       
    62 <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
       
    63 class if it does not exist yet</p></li>
       
    64 <li><p>if an instance of the application is already running, switches
       
    65 to that instance and exits</p></li>
       
    66 </ul>
       
    67 <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>
       
    68 <ul>
       
    69 <li><p>creates the controller class</p></li>
       
    70 <li><p>is the base class for application documents</p></li>
       
    71 </ul>
       
    72 </conbody></concept>