~openerp-community/openobject-doc/ksa-openobject-doc-6.0

« back to all changes in this revision

Viewing changes to i18n/ru/source/developer/1_3_oo_architecture/mvc.rst

  • Committer: Don Kirkby
  • Date: 2011-02-21 20:46:11 UTC
  • mfrom: (433.1.53 openobject-doc)
  • Revision ID: donkirkby+launpd@gmail.com-20110221204611-1ykt6dmg4k3gh5dh
[MERGE] revisions 477 to 486 from the 5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. i18n: MVC - Model, View, Controller 
 
3
.. i18n: =============================
 
4
..
 
5
 
 
6
MVC - Model, View, Controller 
 
7
=============================
 
8
 
 
9
.. i18n: According to `Wikipedia <http://en.wikipedia.org/wiki/Model-view-controller>`_, "a Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present lots of data to the user, one often wishes to separate data (model) and user interface (view) concerns, so that changes to the user interface do not impact the data handling, and that the data can be reorganized without changing the user interface. The model-view-controller solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller."
 
10
..
 
11
 
 
12
According to `Wikipedia <http://en.wikipedia.org/wiki/Model-view-controller>`_, "a Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present lots of data to the user, one often wishes to separate data (model) and user interface (view) concerns, so that changes to the user interface do not impact the data handling, and that the data can be reorganized without changing the user interface. The model-view-controller solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller."
 
13
 
 
14
.. i18n: .. figure::  images/MVCDiagram.png
 
15
.. i18n:    :scale: 100
 
16
.. i18n:    :align: center
 
17
..
 
18
 
 
19
.. figure::  images/MVCDiagram.png
 
20
   :scale: 100
 
21
   :align: center
 
22
 
 
23
.. i18n: For example, in the diagram above, the solid lines for the arrows starting from the controller and going to both the view and the model mean that the controller has a complete access to both the view and the model. The dashed line for the arrow going from the view to the controller means that the view has a limited access to the controller. The reasons of this design are :
 
24
..
 
25
 
 
26
For example, in the diagram above, the solid lines for the arrows starting from the controller and going to both the view and the model mean that the controller has a complete access to both the view and the model. The dashed line for the arrow going from the view to the controller means that the view has a limited access to the controller. The reasons of this design are :
 
27
 
 
28
.. i18n:     * From **View** to **Model** : the model sends notification to the view when its data has been modified in order the view to redraw its content. The model doesn't need to know the inner workings of the view to perform this operation. However, the view needs to access the internal parts of the model.
 
29
.. i18n:     * From **View** to **Controller** : the reason why the view has limited access to the controller is because the dependencies from the view to the controller need to be minimal: the controller can be replaced at any moment. 
 
30
..
 
31
 
 
32
    * From **View** to **Model** : the model sends notification to the view when its data has been modified in order the view to redraw its content. The model doesn't need to know the inner workings of the view to perform this operation. However, the view needs to access the internal parts of the model.
 
33
    * From **View** to **Controller** : the reason why the view has limited access to the controller is because the dependencies from the view to the controller need to be minimal: the controller can be replaced at any moment. 
 
34
 
 
35
.. i18n: MVC Model in OpenERP
 
36
.. i18n: --------------------
 
37
.. i18n: In OpenERP, we can apply this model-view-controller semantic with
 
38
..
 
39
 
 
40
MVC Model in OpenERP
 
41
--------------------
 
42
In OpenERP, we can apply this model-view-controller semantic with
 
43
 
 
44
.. i18n:     * model : The PostgreSQL tables.
 
45
.. i18n:     * view : views are defined in XML files in OpenERP.
 
46
.. i18n:     * controller : The objects of OpenERP. 
 
47
..
 
48
 
 
49
    * model : The PostgreSQL tables.
 
50
    * view : views are defined in XML files in OpenERP.
 
51
    * controller : The objects of OpenERP.