Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 105 lines (69 sloc) 8.506 kb
a816370 @kaos doc: added glossary draft.
kaos authored
1 .. Zotonic Glossary
2 part of Documentation project 2012
3
82748f7 @kaos doc: updated glossary.
kaos authored
4 19-9-2012 Arjan Scherpenisse, First concept
a816370 @kaos doc: added glossary draft.
kaos authored
5
6
7 Glossary
8 ========
9
10 .. glossary::
11 :sorted:
12
13 Template
82748f7 @kaos doc: updated glossary.
kaos authored
14 A snippet of ErlyDTL code which is used to render a piece of content (usually HTML). Templates live under the templates/ folder of a module. The template is meant to express presentation logic.
15
16 Filter
17 A template mechanism which is used inside a template to transform data before it is output. For instance: the .lower. filter transforms its input to lowercase. Filters are implemented as Erlang modules, exporting a single filter function.
18
19 Action
20 An action is functionality that can be attached to a HTML element or event. Actions are wired to an element or event. Think of showing dialogs, posting forms, hiding elements etc.
21
48caba6 @kaos doc: more migrations.
kaos authored
22 See also the section on :ref:`manual-actions` in the templates manual.
23
82748f7 @kaos doc: updated glossary.
kaos authored
24 Tag
25 The template systems provides tags which function as simple programming constructs. For instance, the if tag can be used for boolean tests and the for tag allows looping. The zotonic templating system compiles the tags found in a template to Erlang byte code which will be called when the template is rendered. This is very efficient.
26
27 Scomp
f5c12db @kaos doc: updated glossary.
kaos authored
28 A scomp (from .Screen COMPonent.) is a custom template tag, implemented by an Erlang module named after the scomp name, prefixed with `scomp_`. Scomps usually generate HTML. Zotonic modules can implement their own scomp in the module.s scomps/ folder.
82748f7 @kaos doc: updated glossary.
kaos authored
29
30 Wire
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
31 Connects actions and events to a HTML element. The wire scomp is the basis for most Ajax interaction on web pages. It allows to connected actions to HTML elements. Examples of actions are showing/hiding elements or postbacks to the server.
32 ..todo:: hmm. It is scomp - it is also a often used function in the Erlang code z_render:wire/2
82748f7 @kaos doc: updated glossary.
kaos authored
33
34 Postback
35 An AJAX or Websocket request from the browser to the server. It is handled on the server by event/2 Erlang functions. A postback is normally sent to the controller that generated the page, but can be changed by specifying a delegate, which must be the name of an Erlang module.
36
37 Model
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
38 An Erlang module which is the main accessor for retrieving data. The Erlang modules are prefixed with `m_`; in the templates they are accessible using .m... For instance, the model to access :term:`resources <resource>` is called ``m_rsc.erl``; in the template this model lets you access resources by id as ``{{ m.rsc[id] }}``.
82748f7 @kaos doc: updated glossary.
kaos authored
39
40 Service
41 Provides a generalized way to create API calls. These calls automatically use the authentication mechanism (session id or OAuth) to perform access checks.
42
43 Validator
44 A validator is used to check input fields in a HTML form. A validator has two parts: the client side javascript and a server side check. You add validators to a form with the {% validate %} template tag. A validated query argument can be accessed on the server using z_context:get_q_validated/2.
a816370 @kaos doc: added glossary draft.
kaos authored
45
46 Dispatch rule
82748f7 @kaos doc: updated glossary.
kaos authored
47 A dispatch rule maps URL patterns to controllers. Dispatch rules are defined in files in the .dispatch. folder of a Zotonic module. The dispatch rule definitions are also used to generate the urls for resources and other pages.
a816370 @kaos doc: added glossary draft.
kaos authored
48
49 Controller
f5c12db @kaos doc: updated glossary.
kaos authored
50 A controller is the main entry point where a request is handled. Controllers are referenced from a dispatch rule. Commonly used controller is controller_template, which serves a template on the URL for which the controller configured.
a816370 @kaos doc: added glossary draft.
kaos authored
51
52 Context
f5c12db @kaos doc: updated glossary.
kaos authored
53 The context is the current request context. It contains all the request data, the current site, the handle to the database and the results (scripts or templates) you will be sending back. The context is commonly passed along in Zotonic as the last argument of a function.
a816370 @kaos doc: added glossary draft.
kaos authored
54
55 Session
82748f7 @kaos doc: updated glossary.
kaos authored
56 The session is an Erlang process. It is connected to the session cookie id on the browser. The session contains the id of the current user and more key/value pairs, called session variables. The session is also linked to page processes. For every open page on the browser we have a process on the server. This page process is used for the communication between the server and the user-agent (browser).
a816370 @kaos doc: added glossary draft.
kaos authored
57
58 Category
f5c12db @kaos doc: updated glossary.
kaos authored
59 The data model has a hierarchical tree for the categorization of resources. Every resource is part of one category. The categorization is used amongst others to decide which template to show when displaying a resource. A category is a resource of the category .category..
a816370 @kaos doc: added glossary draft.
kaos authored
60
61 Page
f5c12db @kaos doc: updated glossary.
kaos authored
62 Another word for .resource.; used in the admin.
a816370 @kaos doc: added glossary draft.
kaos authored
63
82748f7 @kaos doc: updated glossary.
kaos authored
64 Media
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
65 Media are files, embed codes etc. They are attached to a resource. Every resource can hold a single medium. The resource is usually within the category `media`. See: :ref:`manual-media`.
82748f7 @kaos doc: updated glossary.
kaos authored
66
a816370 @kaos doc: added glossary draft.
kaos authored
67 Page connection
f5c12db @kaos doc: updated glossary.
kaos authored
68 Another word for .edge.; used in the admin.
a816370 @kaos doc: added glossary draft.
kaos authored
69
70 Edge
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
71 A :term:`resource` can connecto to other resources. These connections are called edges. Edges contain no information other than where they are linked to and from, and what their predicate is. Edges have a single direction, from the subject to the object.
82748f7 @kaos doc: updated glossary.
kaos authored
72
73 Predicate
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
74 Each edge has a `label` attached to it to determine what the meaning of the edge is. For instance, when an article is linked to a person, the predicate (label) might read `author`, to indicate that that person is the author of the article. A predicate is a :term:`resource` of the category `predicate`.
82748f7 @kaos doc: updated glossary.
kaos authored
75
76 Property
77 A field in a resource. Examples are title and summary. Properties are dynamically defined. Although some property names are reserved, you can set any other property, which will be stored in the resource.
78
79 Data model
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
80 :ref:`Zotonic's generic data model <manual-datamodel>` of (categorized) resources which connect to other resources using labelled edges. This data model is loosely based on the principles of the semantic web.
a816370 @kaos doc: added glossary draft.
kaos authored
81
47d7313 @arjan doc: datamodel manual
arjan authored
82 Domain model
83 A particular configuration of resource categories and predicates, which dictate how resources of certain categories relate to each other. For example, a blog-type site might need `person`, `article` and `keyword` categories, where persons and articles are connected using the `author` predicate to indicate article authorship, and articles might be connected to keywords with `has_keyword` predicates. See :ref:`manual-datamodel`.
84
a816370 @kaos doc: added glossary draft.
kaos authored
85 Resource
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
86 The main building block of the :ref:`data model <manual-datamodel>`. For simplicity of communication, a resource is often referred to as a page. Every resource usually has its own page on the web site.
82748f7 @kaos doc: updated glossary.
kaos authored
87
88 Translation
89 There are two kinds of translations. Texts in the templates and Erlang modules; and translations of resources. Templates and Erlang modules are translated using gettext. Resources are translated in the admin, any resource can have an arbitrary number of translations. Zotonic selects the shown language based on the preferred language of the visitor and the available languages of a resource.
a816370 @kaos doc: added glossary draft.
kaos authored
90
91 Zotonic module
f5c12db @kaos doc: updated glossary.
kaos authored
92 A zotonic module (just .module., for short) is a collection of related functionality like scomps, filters, dispatch rules, controllers, templates, etc. Zotonic modules are located in folders under the modules/ directory and, by convention, are prefixed with `mod_`.
82748f7 @kaos doc: updated glossary.
kaos authored
93
94 Zotonic site
95 A zotonic site is a collection of scomps, filters, dispatch rules for one website. It is a special kind of zotonic module with has its own config file which allows one to set the hostname, admin password, database connection parameters. It often has a set of site specific modules. The config file contains site wide settings. Zotonic uses the settings to start the site on the right port and connect it to the right database. A zotonic system can run multiple sites.
a816370 @kaos doc: added glossary draft.
kaos authored
96
97 Erlang module
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
98 Not to be confused with a Zotonic module, an Erlang module is a single .erl file which contains Erlang functions.
82748f7 @kaos doc: updated glossary.
kaos authored
99
100 Non Informational URI
f5c12db @kaos doc: updated glossary.
kaos authored
101 The non informational uri is the base url of a resource. It always redirects to a representation of the resource. Think of a HTML page, image or JSON download. The chosen representation depends on the .Accept. HTTP request header. The non informational uri of a resource is always like http://example.com/id/1234
102
5a6ad47 @arjan doc: Fix misc warnings.
arjan authored
103 Comet
104 Comet is a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it (source: `Wikipedia <http://en.wikipedia.org/wiki/Comet_(programming)>`_).
Something went wrong with that request. Please try again.