Decoupling Content Management with Create.js and PHPCR Henri - - PowerPoint PPT Presentation

decoupling content management with create js and phpcr
SMART_READER_LITE
LIVE PREVIEW

Decoupling Content Management with Create.js and PHPCR Henri - - PowerPoint PPT Presentation

Aug 21st 2012 Decoupling Content Management with Create.js and PHPCR Henri Bergius Director of R&D Nemein Berlin @bergie bergie.iki.fi "The Midgard Project is born." Launching our first Open Source CMS effort bergie.iki.fi,


slide-1
SLIDE 1

Aug 21st 2012

Decoupling Content Management with Create.js and PHPCR

slide-2
SLIDE 2

Henri Bergius

Director of R&D Nemein Berlin @bergie bergie.iki.fi

slide-3
SLIDE 3

"The Midgard Project is born."

Launching our first Open Source CMS effort bergie.iki.fi, April 25th 1998

slide-4
SLIDE 4

Your CMS is a monolith

Content Management System

Database File System

slide-5
SLIDE 5

"We like the user interface, but our IT doesn't want to run PHP"

slide-6
SLIDE 6

"We wanted to have a .Net CMS, but our users hate the UI"

slide-7
SLIDE 7

"Marketing wants this CMS, but we can't develop our app on it"

slide-8
SLIDE 8

Decoupling Content Management

Content Management System Content Repository Database Web Framework Web Editing Tool Monolithic approach Decoupled approach File System

slide-9
SLIDE 9

Clean separation of concerns

Web Editing Tool

Tools that user needs to create, manipulate, and publish content

Web Framework

Rendering and serving content and handling business logic

Content Repository

Data storage and retrieval. Access controls, validations, full-text search

slide-10
SLIDE 10

Semantic CMS Community www.iks-project.eu

slide-11
SLIDE 11

Create.js

Create.js is a comprehensive web editing interface for Content Management Systems. It is designed to provide a modern, fully browser- based HTML5 environment for managing

  • content. Create can be adapted to work on

almost any content management backend.

slide-12
SLIDE 12

“Build a CMS, no forms allowed”

slide-13
SLIDE 13

http://hallojs.org & http://github.com/bergie/blogsiple

slide-14
SLIDE 14

http://aloha-editor.org

slide-15
SLIDE 15

Manage Collections

Content can be added to any collections

slide-16
SLIDE 16

Image handling

slide-17
SLIDE 17

Tagging and annotations

http://szabyg.github.com/annotate.js/

slide-18
SLIDE 18

Never lose content

slide-19
SLIDE 19

Symfony CMF

slide-20
SLIDE 20

OpenCms

slide-21
SLIDE 21

Web Framework Web Editing Tool HTML+RDFa JSON-LD over REST

Interfacing with Create.js

slide-22
SLIDE 22

RDFa: Your Content, Explained

slide-23
SLIDE 23

RDFa: Your Content, Explained

slide-24
SLIDE 24

Suddenly JavaScript can understand

slide-25
SLIDE 25

Bonus: SEO

slide-26
SLIDE 26

JSON-LD

slide-27
SLIDE 27

"Our recommendation at this time is to make JSON-LD our primary supported web services data format. It is quite flexible, and supports the self-discovery capabilities that we want to support."

Drupal WSCCI Web Services Format Sprint Report http://groups.drupal.org/node/237443

slide-28
SLIDE 28

Framework for Semantic Interaction - viejs.org

slide-29
SLIDE 29

Create.js and PHP

  • CreatePHP

Generate RDFa annotations from your content model https://github.com/flack/createphp

  • Drupal Create

Drupal 7 integration of Create.js http://drupal.org/project/create

  • LiipVieBundle

Symfony2 integration of Create.js

https://github.com/liip/LiipVieBundle

slide-30
SLIDE 30

PHPCR

The PHP Content Repository is an adaption of the Java Content Repository (JCR) standard, an open API specification defined in JSR-283. The API defines how to handle hierarchical semi-structured data in a consistent way.

slide-31
SLIDE 31

PHPCR is a collection of interfaces

slide-32
SLIDE 32

Same API, multiple repositories

  • Jackalope

– Apache Jackrabbit:

Java-based repository server, accessible through WebDAV

– Doctrine DBAL: pure-

PHP repository library

  • jackalope.github.com
  • Midgard2

– GObject-oriented

repository library accessible through PHP extension

– Python, JavaScript,

Java, ...

  • midgard-project.org/phpcr
slide-33
SLIDE 33

"Developers write against a single API Implementations can be chosen based

  • n deployment needs"
slide-34
SLIDE 34

Repository capabilities

  • Tree access
  • Access by UUID
  • Workspaces
  • Versioning
  • Multi-value properties
  • Queries: SQL2, QOM
  • XML import and

export

  • Permissions
  • Capability discovery
  • Observation
  • Locking &

Transactions

slide-35
SLIDE 35

“Simple stuff should be easy, but complex stuff should still be possible”

slide-36
SLIDE 36

PHPCR

slide-37
SLIDE 37

In PHPCR, all content is stored in a tree of nodes Nodes have a name, a type, and a set of properties Nodes can also have child nodes

slide-38
SLIDE 38

Connecting to a repository: Jackrabbit

  • Start Jackrabbit:

$ java -jar jackrabbit-standalone-2.4.1.jar

  • Connect to repository:
slide-39
SLIDE 39

This is the only repository-specific part

slide-40
SLIDE 40

Working with the tree

slide-41
SLIDE 41

About Node types

  • Node types determine what properties and what kind of

child nodes a node can have

  • Some built-in types: nt:file, nt:folder, nt:resource,

nt:unstructured

  • Node types can be amended with “mixin” types, like

mix:lastModified, mix:language

  • Most repositories allow you to define your own types
  • Recommendation:

Start with nt:unstructured, add more strict definitions when you know your data model

slide-42
SLIDE 42

Queries: SQL2

slide-43
SLIDE 43

Queries: Query Object Model

slide-44
SLIDE 44

Versioning: enable

slide-45
SLIDE 45

Versioning: commit

slide-46
SLIDE 46

Versioning: restore

slide-47
SLIDE 47

Export and import

slide-48
SLIDE 48

Export and import

slide-49
SLIDE 49

Your decoupled CMS

PHPCR Drupal Create.js

slide-50
SLIDE 50

Decoupling means collaboration

slide-51
SLIDE 51

Questions?

@bergie createjs.org hallojs.org viejs.org phpcr.github.com iks-project.eu