Tree-like structures are omnipresent throughout the web. Whether in the plain URL of a website, as navigation-menu or for board- or chatlogs. Even XML represents a tree-like structure. So why not store data in such a construct? In the Java-World there is the JCR named ContentRepository which stores data in a tree-like structure. The JCR has been ported to PHP as PHPCR. Using the Doctrine-Wrapper PHPCR-ODM it can be integrated into applications without hassle.
This talk will show how to effectively persist semi-structured content, dynamic routing or other hierarchically structured data.
32. OPERATIONS
create a node (Folder, File)
Update Properties - i.e. the content
move a node
delete a node
get a node
33. CONSTRAINTS
a node has a name
a node has a path
a node has properties - i.e. content
a node can have children
34. UNIVERSAL INTERFACE
JCR - CONTENT REPOSITORY FOR JAVA WORLD
Describes De nition of Workspace, Session, Node and
Properties
Current Spec: 283
Persisting content as in XML
35. CONTENT REPOSITORY
Database for digital content
Management to search/query, add, move, delete content
hierarchical structure
Import/Export
Versioning
Locking
37. PHPCR
Porting of JCR into PHP
Interface
Implementations:
Jackrabit
Doctrine-DBAL
38. WORKSPACE
CR consists of one or more workspaces
Each Workspace contains an acyclic graph (tree) of items
Edges de ne parent child relation
39. SESSION
Connection by a user through credentials to a speci c
workspace
Possibility for Access Control for that user
Contains a complete Representation of the workspace