Skip to content
Newer
Older
100644 52 lines (35 sloc) 2.04 KB
9073af7 @dbu first batch of documentation
dbu authored
1 Architecture
2 ============
3
4 The architecture of the PHPCR-ODM is similar to that of Doctrine 2 ORM. Please read
5 the ORM architecture chapter (TODO: link) to get a basic understanding of the Doctrine
6 architecture. We will focus on some notable differences here.
7
8 Doctrine PHPCR-ODM Packages
9 ---------------------------
10
11 PHPCR-ODM is built on top of Doctrine Common. However, it does not need a custom database
12 abstraction layer (DBAL). The PHPCR standard already is an implementation independent.
13 PHPCR-ODM does not rely on implementation specific features of the content repository but
14 fully operate through the standard API.
15
16 The stack thus looks like this
17
18 - PHPCR (and an implementation like Jackalope or Midgard2 - like you need pdo_mysql or
19 similar with DBAL)
20 - Common
21 - PHPCR-ODM
22
23 This manual mainly covers the PHPCR-ODM package, sometimes touching parts
24 of the underlying PHPCR and Common packages.
25
26
27 Content tree, not tables
28 ~~~~~~~~~~~~~~~~~~~~~~~~
29
30 The main difference between a relational database and the PHP content repository is
31 that in PHPCR, content is stored in one tree, not split over tables. You can think of
32 this like a file system, or of an XML document with elements and attributes.
33
34 As long as you do not use special node types, documents can be put anywhere into the tree,
35 regardless of the document class, like in a NoSQL database. The difference is that the
36 tree must be complete, meaning you always need a parent to add child documents to. This
37 is bootstrapped by adding documents to the root document.
38
39 If you are not yet familiar with PHPCR, you can just go on with PHPCR-ODM, but you will
40 get better understanding when you also take a look at the `PHPCR documentation <http://phpcr.github.com>`_.
41
42
43 Additional core features
44 ~~~~~~~~~~~~~~~~~~~~~~~~
45
878e26d @dbu some cleanup
dbu authored
46 As PHPCR provides native support for versioning, PHPCR-ODM also exposes this feature.
47 See the advanced chapter :doc:`Versioning <versioning>` for information about this.
9073af7 @dbu first batch of documentation
dbu authored
48
878e26d @dbu some cleanup
dbu authored
49 Additionally, we implemented :doc:`Multilanguage <multilang>` support into PHPCR-ODM.
9073af7 @dbu first batch of documentation
dbu authored
50
51
878e26d @dbu some cleanup
dbu authored
52 TODO: any other differences compared to ORM?
Something went wrong with that request. Please try again.