doc/book/en/20-01-intro.en.txt
author Nicolas Chauvat <nicolas.chauvat@logilab.fr>
Thu, 20 Nov 2008 15:04:33 +0100
changeset 109 10b63bb96e70
parent 108 60faaa480f02
child 111 7a06f06de32f
permissions -rw-r--r--
[doc] fix reference to GAE
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
74
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     1
.. -*- coding: utf-8 -*-
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     2
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     3
Introduction
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     4
============
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     5
108
60faaa480f02 [doc] another step towards dissolving LAX book into CubicWeb book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 74
diff changeset
     6
What is  `Google AppEngine` ?
60faaa480f02 [doc] another step towards dissolving LAX book into CubicWeb book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 74
diff changeset
     7
------------------------------
74
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     8
109
10b63bb96e70 [doc] fix reference to GAE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
     9
`Google AppEngine`_ is provided with a partial port of the `Django`
74
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    10
framework, but Google stated at Google IO 2008 that it would not
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    11
support a specific Python web framework and that all
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    12
community-supported frameworks would be more than welcome[1]_. 
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    13
108
60faaa480f02 [doc] another step towards dissolving LAX book into CubicWeb book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 74
diff changeset
    14
Therefore Logilab_ ported `CubicWeb` to run on top of `Google AppEngine`'s
60faaa480f02 [doc] another step towards dissolving LAX book into CubicWeb book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 74
diff changeset
    15
datastore.
74
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    16
109
10b63bb96e70 [doc] fix reference to GAE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    17
.. _`Google AppEngine`: http://code.google.com/appengine/docs/whatisgoogleappengine.html
74
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    18
.. _Logilab: http://www.logilab.fr/
109
10b63bb96e70 [doc] fix reference to GAE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    19
.. [1] for more on this matter, read our blog at http://www.logilab.org/blogentry/5216
74
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    20
108
60faaa480f02 [doc] another step towards dissolving LAX book into CubicWeb book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 74
diff changeset
    21
74
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    22
Essentials
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    23
----------
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    24
108
60faaa480f02 [doc] another step towards dissolving LAX book into CubicWeb book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 74
diff changeset
    25
XXXFIXME MERGE WITH 02-foundation.en.txt
60faaa480f02 [doc] another step towards dissolving LAX book into CubicWeb book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 74
diff changeset
    26
74
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    27
Schema
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    28
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    29
  The schema defines the data model of an application as entities and
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    30
  relationships. It is the core of an application.  Entities and
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    31
  relationships are modeled with a comprehensive language made of
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    32
  Python classes. 
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    33
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    34
Query language
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    35
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    36
  A full-blown query language named RQL is used to formulate 
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    37
  requests to the datastore.
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    38
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    39
Result set
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    40
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    41
  A resultset encapsulates the results of a request sent to
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    42
  the datastore and informations about this request.  
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    43
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    44
Views 
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    45
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    46
  A view is applied to a `result set` to present it as HTML, XML,
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    47
  JSON, CSV, etc. Views are implemented as Python classes. There is no
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    48
  templating language.
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    49
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    50
Generated user interface
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    51
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    52
  A user interface is generated on-the-fly from the schema definition:
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    53
  entities can be created, displayed, updated and deleted. As display
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    54
  views are not very fancy, it is usually necessary to develop your
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    55
  own. Any generated view can be overridden by defining a new one with
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    56
  the same identifier.
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    57
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    58
Components
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    59
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    60
  Pieces of schema and sets of views can be combined into
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    61
  components. Larger applications can be built faster by importing
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    62
  components, adding entities and relationships and overriding the
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    63
  views that need to display or edit informations not provided by
9a9fe515934d [doc] reuse the lax book
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    64
  components.