Decoupling Content Management with Create.js and PHPCR

  • 2,595 views
Uploaded on

Talk from Symfony Live 2012

Talk from Symfony Live 2012

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,595
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
42
Comments
0
Likes
7

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Decoupling Content Management with Create.js and PHPCR
  • 2. Henri Bergius Director of R&D Nemein Berlin @bergie bergie.iki.fi
  • 3. github.com/bergie/noflogithub.com/bergie/phpflo
  • 4. Your CMS is a monolith Content Management System Database Database
  • 5. "We like the user interface, but our  IT doesnt want to run PHP"
  • 6. "We wanted to have a .Net CMS,  but our users hate the UI"
  • 7. Decoupling Content Management Monolithic approach Decoupled approach Web Editing Tool Content Management System Web FrameworkDatabase File system Content Repository
  • 8. 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
  • 9. Symfony2 is a reusable set of standalone, decoupled, and cohesive PHP components that solve common  web development problems. http://fabien.potencier.org/article/49/what-is-symfony2
  • 10. 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. 
  • 11. “Build a CMS, no forms allowed”
  • 12. http://hallojs.org & http://github.com/bergie/blogsiple
  • 13. http://aloha-editor.org
  • 14. Manage Collections Content can be added to any collections
  • 15. Image handling
  • 16. Tagging and annotations http://szabyg.github.com/annotate.js/
  • 17. Never lose content
  • 18. CMF Front-end Editor
  • 19. OpenCms
  • 20. Interfacing with Create.js Web Editing Tool HTML+RDFa JSON-LD over REST Web Framework
  • 21. RDFa: Your Content, Explained
  • 22. RDFa: Your Content, Explained
  • 23. Suddenly JavaScript can understand
  • 24. Bonus: SEO
  • 25. Framework for Semantic Interaction - viejs.org
  • 26. Create.js and PHP● LiipVieBundle Handle Creates RESTful JSON-LD communications with Doctrine ODM https://github.com/liip/LiipVieBundle● CreatePHP Generate RDFa annotations from your content model https://github.com/flack/createphp
  • 27. Symfony CMF The Symfony CMF project makes it easier for  developers to add CMS functionality to  applications built with the Symfony2 PHP framework. Key development principles for the  provided set of bundles are scalability,  usability, documentation and testing. 
  • 28. Symfony CMF Friday 15:00, Track A Lukas Kahwe SmithBuild your decoupled CMS with Symfony2
  • 29. PHPCRThe 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. 
  • 30. PHPCR is a collection of interfaces
  • 31. Same API, multiple repositories● Jackalope ● Midgard2 – Apache Jackrabbit: – GObject-oriented Java-based repository repository library server, accessible accessible through through WebDAV PHP extension – Doctrine DBAL: pure- – Python, JavaScript, PHP repository library Java, ...● jackalope.github.com ● midgard-project.org/phpcr
  • 32. "Developers write against a single APIImplementations can be chosen based  on deployment needs"
  • 33. Repository capabilities● Tree access ● XML import and● Access by UUID export● Workspaces ● Permissions● Versioning ● Capability discovery● Multi-value properties ● Observation● Queries: SQL2, QOM ● Locking & Transactions
  • 34. “Simple stuff should be easy, but complex stuff should still be possible”
  • 35. PHPCR
  • 36. 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
  • 37. Connecting to a repository: Jackrabbit● Start Jackrabbit: $ java -jar jackrabbit-standalone-2.4.1.jar● Connect to repository:
  • 38. This is the only repository-specific part
  • 39. Working with the tree
  • 40. 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
  • 41. Queries: SQL2
  • 42. Queries: Query Object Model
  • 43. Versioning: enable
  • 44. Versioning: commit
  • 45. Versioning: restore
  • 46. Export and import
  • 47. Export and import
  • 48. Your decoupled CMS Create.js Symfony CMF PHPCR
  • 49. Decoupling means collaboration
  • 50. Questions? @bergie createjs.org hallojs.org viejs.org phpcr.github.com cmf.symfony.com