Decoupling Content Management

1,552 views
1,345 views

Published on

Presentation from DrupalCon Munich 2012

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,552
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Decoupling Content Management

  1. 1. Au g 22 nd 20 12Decoupling Content Management with Create.js and PHPCR
  2. 2. Henri Bergius Director of R&D Nemein Berlin @bergie bergie.iki.fi
  3. 3. "The Midgard Project is born." Launching our first Open Source CMS effort bergie.iki.fi, April 25th 1998
  4. 4. Your CMS is a monolith Content Management System Database File System
  5. 5. "We like the user interface, but our  IT doesnt want to run PHP"
  6. 6. "We wanted to have a .Net CMS,  but our users hate the UI"
  7. 7. "Marketing wants this CMS, but  we cant develop our app on it"
  8. 8. Decoupling Content Management Monolithic approach Decoupled approach Web Editing Tool Content Management System Web FrameworkDatabase File System Content Repository
  9. 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
  10. 10. Semantic CMS Community www.iks-project.eu
  11. 11. decoupledcms.org
  12. 12. 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. 
  13. 13. “Build a CMS, no forms allowed”
  14. 14. http://hallojs.org & http://github.com/bergie/blogsiple
  15. 15. http://aloha-editor.org
  16. 16. Manage Collections Content can be added to any collections
  17. 17. Image handling
  18. 18. Tagging and annotations http://szabyg.github.com/annotate.js/
  19. 19. Never lose content
  20. 20. Symfony CMF
  21. 21. OpenCms
  22. 22. Drupal
  23. 23. Drupal
  24. 24. Drupal
  25. 25. Create.js for Drupaldrupal.org/project/create
  26. 26. Interfacing with Create.js Web Editing Tool HTML+RDFa JSON-LD over REST Web Framework
  27. 27. RDFa: Your Content, Explained
  28. 28. RDFa: Your Content, Explained
  29. 29. Suddenly JavaScript can understand
  30. 30. Bonus: SEO
  31. 31. JSON-LD
  32. 32. "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
  33. 33. Framework for Semantic Interaction - viejs.org
  34. 34. 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
  35. 35. 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. 
  36. 36. PHPCR is a collection of interfaces
  37. 37. PHPCR is a collection of tests
  38. 38. 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
  39. 39. "Developers write against a single APIImplementations can be chosen based  on deployment needs"
  40. 40. 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
  41. 41. “Simple stuff should be easy, but complex stuff should still be possible”
  42. 42. PHPCR
  43. 43. 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
  44. 44. Connecting to a repository: Jackrabbit● Start Jackrabbit: $ java -jar jackrabbit-standalone-2.4.1.jar● Connect to repository:
  45. 45. This is the only repository-specific part
  46. 46. Working with the tree
  47. 47. 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
  48. 48. Queries: SQL2
  49. 49. Queries: Query Object Model
  50. 50. Versioning: enable
  51. 51. Versioning: commit
  52. 52. Versioning: restore
  53. 53. Export and import
  54. 54. Export and import
  55. 55. Your decoupled CMS Create.js Drupal PHPCR
  56. 56. Decoupling means collaboration
  57. 57. Questions? @bergie createjs.org hallojs.org viejs.org phpcr.github.com iks-project.eu

×