~xrg/openobject-doc/trunk-xrg

« back to all changes in this revision

Viewing changes to i18n/uk/source/developer/1_2_module_development/1_server_module.rst

  • Committer: TruongSinh Tran
  • Date: 2009-07-17 18:59:45 UTC
  • Revision ID: truongsinh@vipescoserver-20090717185945-ajjp3zso6xh5jddm
[FIX]private issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. i18n: OpenObject Server and Modules
 
3
.. i18n: =============================
 
4
 
 
5
OpenObject Server and Modules
 
6
=============================
 
7
 
 
8
.. i18n: * **OpenERP** is a `Client/Server <http://en.wikipedia.org/wiki/Client_server>`_ system that works over a IP Network.
 
9
.. i18n: * **OpenERP** programming language is Python.
 
10
.. i18n: * **OpenERP** uses Object-Oriented technologies.
 
11
.. i18n: * **OpenERP** records its data with a PostgreSQL relational database.
 
12
.. i18n: * **OpenERP** business objects are modeled with an Object Relational Mapping (ORM) system.
 
13
.. i18n: * **OpenERP** offers three Human Machine Interfaces (HMI) a GTK client, a QT client and a web client (eTiny).
 
14
.. i18n: * **OpenERP** uses ReportLab for report generation in (PDF).
 
15
.. i18n: * **OpenERP** uses XML for several purpose: describing data, view, reports, data transport (XML-RPC) 
 
16
 
 
17
* **OpenERP** is a `Client/Server <http://en.wikipedia.org/wiki/Client_server>`_ system that works over a IP Network.
 
18
* **OpenERP** programming language is Python.
 
19
* **OpenERP** uses Object-Oriented technologies.
 
20
* **OpenERP** records its data with a PostgreSQL relational database.
 
21
* **OpenERP** business objects are modeled with an Object Relational Mapping (ORM) system.
 
22
* **OpenERP** offers three Human Machine Interfaces (HMI) a GTK client, a QT client and a web client (eTiny).
 
23
* **OpenERP** uses ReportLab for report generation in (PDF).
 
24
* **OpenERP** uses XML for several purpose: describing data, view, reports, data transport (XML-RPC) 
 
25
 
 
26
.. i18n: Technical Architecture
 
27
.. i18n: ----------------------
 
28
 
 
29
Technical Architecture
 
30
----------------------
 
31
 
 
32
.. i18n: Server/client, XML-RPC
 
33
.. i18n: ++++++++++++++++++++++
 
34
 
 
35
Server/client, XML-RPC
 
36
++++++++++++++++++++++
 
37
 
 
38
.. i18n: Open ERP is a based on a client/server architecture. The server and the client communicate using the XML-RPC protocol. XML-RPC is a very simple protocol which allows the client to do remote procedure calls. The function called, its arguments, and the result are sent HTTP and encoded using XML.
 
39
 
 
40
Open ERP is a based on a client/server architecture. The server and the client communicate using the XML-RPC protocol. XML-RPC is a very simple protocol which allows the client to do remote procedure calls. The function called, its arguments, and the result are sent HTTP and encoded using XML.
 
41
 
 
42
.. i18n: For more information on XML-RPC, please see: http://www.xml-rpc.com/
 
43
 
 
44
For more information on XML-RPC, please see: http://www.xml-rpc.com/
 
45
 
 
46
.. i18n: Since version 4.2, there is a new protocol between client/server that have been called net-rpc. It is based on the python cPickle function, it is faster than the xml-rpc.
 
47
 
 
48
Since version 4.2, there is a new protocol between client/server that have been called net-rpc. It is based on the python cPickle function, it is faster than the xml-rpc.
 
49
 
 
50
.. i18n: Client
 
51
.. i18n: ++++++
 
52
 
 
53
Client
 
54
++++++
 
55
 
 
56
.. i18n: The logic of Open ERP is entirely on the server side. The client is very simple; his work is to ask data (forms, lists, trees) from the server and to send them back. With this approach, nearly all developments are made on the server side. This makes Open ERP easier to develop and to maintain.
 
57
 
 
58
The logic of Open ERP is entirely on the server side. The client is very simple; his work is to ask data (forms, lists, trees) from the server and to send them back. With this approach, nearly all developments are made on the server side. This makes Open ERP easier to develop and to maintain.
 
59
 
 
60
.. i18n: The client doesn't understand what it posts. Even actions like 'Click on the print icon' are sent to the server to ask how to react.
 
61
 
 
62
The client doesn't understand what it posts. Even actions like 'Click on the print icon' are sent to the server to ask how to react.
 
63
 
 
64
.. i18n: The client operation is very simple; when a user makes an action (save a form, open a menu, print, ...) it sends this action to the server. The server then sends the new action to execute to the client.
 
65
 
 
66
The client operation is very simple; when a user makes an action (save a form, open a menu, print, ...) it sends this action to the server. The server then sends the new action to execute to the client.
 
67
 
 
68
.. i18n: There are three types of action;
 
69
 
 
70
There are three types of action;
 
71
 
 
72
.. i18n: * Open a window (form or tree)
 
73
.. i18n: * Print a document
 
74
.. i18n: * Execute a wizard 
 
75
 
 
76
* Open a window (form or tree)
 
77
* Print a document
 
78
* Execute a wizard 
 
79
 
 
80
.. i18n: Architecture
 
81
 
 
82
Architecture
 
83
 
 
84
.. i18n: .. figure::  images/client_server.png
 
85
.. i18n:    :scale: 85
 
86
.. i18n:    :align: center
 
87
 
 
88
.. figure::  images/client_server.png
 
89
   :scale: 85
 
90
   :align: center
 
91
 
 
92
.. i18n: Explanation of modules
 
93
.. i18n: Server - Base distribution
 
94
 
 
95
Explanation of modules
 
96
Server - Base distribution
 
97
 
 
98
.. i18n: We use a distributed communication mechanism inside the Open ERP server. Our engine support most commonly distributed patterns: request/reply, publish/subscribe, monitoring, triggers/callback, ...
 
99
 
 
100
We use a distributed communication mechanism inside the Open ERP server. Our engine support most commonly distributed patterns: request/reply, publish/subscribe, monitoring, triggers/callback, ...
 
101
 
 
102
.. i18n: Different business objects can be in different computers or the same objects can be on multiple computers to perform load-balancing on multiple computers.
 
103
.. i18n: Server - Object Relational Mapping (ORM)
 
104
 
 
105
Different business objects can be in different computers or the same objects can be on multiple computers to perform load-balancing on multiple computers.
 
106
Server - Object Relational Mapping (ORM)
 
107
 
 
108
.. i18n: This layer provides additional object functionality on top of postgresql:
 
109
 
 
110
This layer provides additional object functionality on top of postgresql:
 
111
 
 
112
.. i18n:     * Consistency: powerful validity checks,
 
113
.. i18n:     * Work with objects (methods, references, ...)
 
114
.. i18n:     * Row-level security (per user/group/role)
 
115
.. i18n:     * Complex actions on a group of resources
 
116
.. i18n:     * Inheritance 
 
117
 
 
118
    * Consistency: powerful validity checks,
 
119
    * Work with objects (methods, references, ...)
 
120
    * Row-level security (per user/group/role)
 
121
    * Complex actions on a group of resources
 
122
    * Inheritance 
 
123
 
 
124
.. i18n: Server - Web-Services
 
125
 
 
126
Server - Web-Services
 
127
 
 
128
.. i18n: The web-service module offer a common interface for all web-services
 
129
 
 
130
The web-service module offer a common interface for all web-services
 
131
 
 
132
.. i18n:     * SOAP
 
133
.. i18n:     * XML-RPC
 
134
.. i18n:     * NET-RPC 
 
135
 
 
136
    * SOAP
 
137
    * XML-RPC
 
138
    * NET-RPC 
 
139
 
 
140
.. i18n: Business objects can also be accessed via the distributed object mechanism. They can all be modified via the client interface with contextual views.
 
141
.. i18n: Server - Workflow Engine
 
142
 
 
143
Business objects can also be accessed via the distributed object mechanism. They can all be modified via the client interface with contextual views.
 
144
Server - Workflow Engine
 
145
 
 
146
.. i18n: Workflows are graphs represented by business objects that describe the dynamics of the company. Workflows are also used to track processes that evolve over time.
 
147
 
 
148
Workflows are graphs represented by business objects that describe the dynamics of the company. Workflows are also used to track processes that evolve over time.
 
149
 
 
150
.. i18n: An example of workflow used in Open ERP:
 
151
 
 
152
An example of workflow used in Open ERP:
 
153
 
 
154
.. i18n: A sales order generates an invoice and a shipping order
 
155
.. i18n: Server - Report Engine
 
156
 
 
157
A sales order generates an invoice and a shipping order
 
158
Server - Report Engine
 
159
 
 
160
.. i18n: Reports in Open ERP can be rendered in different ways:
 
161
 
 
162
Reports in Open ERP can be rendered in different ways:
 
163
 
 
164
.. i18n:     * Custom reports: those reports can be directly created via the client interface, no programming required. Those reports are represented by business objects (ir.report.custom)
 
165
.. i18n:     * High quality personalized reports using openreport: no programming required but you have to write 2 small XML files:
 
166
.. i18n:           - a template which indicates the data you plan to report
 
167
.. i18n:           - an XSL:RML stylesheet 
 
168
.. i18n:     * Hard coded reports
 
169
.. i18n:     * OpenOffice Writer templates 
 
170
 
 
171
    * Custom reports: those reports can be directly created via the client interface, no programming required. Those reports are represented by business objects (ir.report.custom)
 
172
    * High quality personalized reports using openreport: no programming required but you have to write 2 small XML files:
 
173
          - a template which indicates the data you plan to report
 
174
          - an XSL:RML stylesheet 
 
175
    * Hard coded reports
 
176
    * OpenOffice Writer templates 
 
177
 
 
178
.. i18n: Nearly all reports are produced in PDF.
 
179
.. i18n: Server - Business Objects
 
180
 
 
181
Nearly all reports are produced in PDF.
 
182
Server - Business Objects
 
183
 
 
184
.. i18n: Almost everything is a business object in Open ERP, they described all data of the program (workflows, invoices, users, customized reports, ...). Business objects are described using the ORM module. They are persistent and can have multiple views (described by the user or automatically calculated).
 
185
 
 
186
Almost everything is a business object in Open ERP, they described all data of the program (workflows, invoices, users, customized reports, ...). Business objects are described using the ORM module. They are persistent and can have multiple views (described by the user or automatically calculated).
 
187
 
 
188
.. i18n: Business objects are structured in the /module directory.
 
189
.. i18n: Client - Wizards
 
190
 
 
191
Business objects are structured in the /module directory.
 
192
Client - Wizards
 
193
 
 
194
.. i18n: Wizards are graphs of actions/windows that the user can perform during a session.
 
195
.. i18n: Client - Widgets
 
196
 
 
197
Wizards are graphs of actions/windows that the user can perform during a session.
 
198
Client - Widgets
 
199
 
 
200
.. i18n: Widgets are probably, although the origin of the term seems to be very difficult to trace, "WIndow gaDGETS" in the IT world, which mean they are gadgets before anything, which implement elementary features through a portable visual tool.
 
201
 
 
202
Widgets are probably, although the origin of the term seems to be very difficult to trace, "WIndow gaDGETS" in the IT world, which mean they are gadgets before anything, which implement elementary features through a portable visual tool.
 
203
 
 
204
.. i18n: All common widgets are supported:
 
205
 
 
206
All common widgets are supported:
 
207
 
 
208
.. i18n:     * entries
 
209
.. i18n:     * textboxes
 
210
.. i18n:     * floating point numbers
 
211
.. i18n:     * dates (with calendar)
 
212
.. i18n:     * checkboxes
 
213
.. i18n:     * ... 
 
214
 
 
215
    * entries
 
216
    * textboxes
 
217
    * floating point numbers
 
218
    * dates (with calendar)
 
219
    * checkboxes
 
220
    * ... 
 
221
 
 
222
.. i18n: And also all special widgets:
 
223
 
 
224
And also all special widgets:
 
225
 
 
226
.. i18n:     * buttons that call actions
 
227
.. i18n:     * references widgets
 
228
.. i18n:           - one2one
 
229
.. i18n: 
 
230
.. i18n:           - many2one
 
231
.. i18n: 
 
232
.. i18n:           - many2many
 
233
.. i18n: 
 
234
.. i18n:           - one2many in list
 
235
.. i18n: 
 
236
.. i18n:           - ... 
 
237
 
 
238
    * buttons that call actions
 
239
    * references widgets
 
240
          - one2one
 
241
 
 
242
          - many2one
 
243
 
 
244
          - many2many
 
245
 
 
246
          - one2many in list
 
247
 
 
248
          - ... 
 
249
 
 
250
.. i18n: Widget have different appearances in different views. For example, the date widget in the search dialog represents two normal dates for a range of date (from...to...).
 
251
 
 
252
Widget have different appearances in different views. For example, the date widget in the search dialog represents two normal dates for a range of date (from...to...).
 
253
 
 
254
.. i18n: Some widgets may have different representations depending on the context. For example, the one2many widget can be represented as a form with multiple pages or a multi-columns list.
 
255
 
 
256
Some widgets may have different representations depending on the context. For example, the one2many widget can be represented as a form with multiple pages or a multi-columns list.
 
257
 
 
258
.. i18n: Events on the widgets module are processed with a callback mechanism. A callback mechanism is a process whereby an element defines the type of events he can handle and which methods should be called when this event is triggered. Once the event is triggered, the system knows that the event is bound to a specific method, and calls that method back. Hence callback. 
 
259
 
 
260
Events on the widgets module are processed with a callback mechanism. A callback mechanism is a process whereby an element defines the type of events he can handle and which methods should be called when this event is triggered. Once the event is triggered, the system knows that the event is bound to a specific method, and calls that method back. Hence callback.