Deliverance and Diazo - Easy Theming For Everyone

3,339 views
3,248 views

Published on

A talk about Deliverance and Diazo makes theming easier for Plone, and everybody else.

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

No Downloads
Views
Total views
3,339
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
11
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Deliverance and Diazo - Easy Theming For Everyone

  1. 1. Deliverance and Diazo Easy Theming for Everyone (not just Plonistas) Roché Compaan • [email_address] • http://twitter.com/rochecompaan Upfront Systems • http://upfrontsystems.co.za
  2. 2. In the beginning theming Plone was hard!
  3. 3. And led to various disorders
  4. 6. Theming Plone Disorders <ul><li>Portlet Depression
  5. 7. Viewlet Mania
  6. 8. Layer Delirium
  7. 9. Skin-o-rexia
  8. 10. Resource Disassociation
  9. 11. Battered Buildout Syndrome
  10. 12. All disorders installable with the DSM Generic Setup Profile </li></ul>
  11. 13. Today, theming Plone is as easy as pie. &quot;Easy as Pie&quot; is a song by country singer Billy &quot;Crash&quot; Craddock. It was released on the 1976 album Easy as Pie. The song became a #1 hit on the country charts and was also a crossover hit. A live version was also released on 1977's Live! and 2009's Live -N- Kickin'. en.wikipedia.org/wiki/Easy_as_Pie_(song) PS: I've never listened to this song, I hope it's not too corny ...
  12. 14. Why is it easier? Embed content inside theme without touching the theme or content
  13. 16. What is Deliverance? <ul><li>Theming proxy
  14. 17. Uses simple rules and CSS selectors to embed content from your CMS into HTML theme
  15. 18. Keeps presentation separate from content
  16. 19. Extended in Python
  17. 20. Read more at: http://packages.python.org/Deliverance/ </li></ul>
  18. 21. What is Diazo? <ul><li>Same philosophy as Deliverance (originally a Deliverance fork)
  19. 22. Compiles simple rules to XSLT
  20. 23. Can be extended using inline XSL
  21. 24. Read more at: http://diazo.org </li></ul>
  22. 25. Deliverance Pros & Cons <ul><li>Pros </li><ul><li>Browser-based debugging console
  23. 26. Through the web editing of files (HTML, CSS, rules.xml)
  24. 27. Can be extended in Python </li></ul><li>Cons </li><ul><li>Project lacks momentum and support </li></ul></ul>
  25. 28. Diazo Pros & Cons <ul><li>Pros </li><ul><li>Formally adopted as theming technology for Plone
  26. 29. More deployment options </li><ul><li>No need to run separate server when using collective.xdv </li></ul><li>Very easy to transform HTML snippets with inline XSL </li></ul><li>Cons </li><ul><li>Still no debugging help
  27. 30. Need to learn XSL and XPATH for advanced use
  28. 31. Need to understand WSGI Pipeline for extension in Python </li></ul></ul>
  29. 32. Case Study: Mobile frontend for Connexions (mobile.cnx.org)
  30. 33. What is Connexions? <ul><li>Major Repository for Open Educational Resources (OER)
  31. 34. Serves almost 2 million visitors a month
  32. 35. 18440 reasuable modules woven into 1131 collections
  33. 36. Hosts all Siyavula content covering Grade R to 12 (http://cnx.org/lenses/siyavula)
  34. 37. Powered by Plone </li></ul>
  35. 38. Why a mobile front end?
  36. 39. 10% Percentage of population with fixed-line internet access in South Africa
  37. 40. 84% Mobile penetration in South Africa
  38. 41. The “Kindle” of Africa
  39. 42. What is the Connexions mobile frontend? <ul><li>Stripped down version of http://cnx.org
  40. 43. Very conservative subset of XHTML tags
  41. 44. Transformed tables to lists were possible
  42. 45. Convert MathML to images
  43. 46. Resize images for mobile screen size
  44. 47. Custom transform for Mxit </li></ul>
  45. 49. First implementation was in Diazo
  46. 50. Diazo feedback <ul><li>Inline XSL is very cool – makes it very easy to change the markup eg table to list
  47. 51. Debugging is very painful – difficult to debug why rules don't work
  48. 52. No easy way to do more complex transforms like the conversion of MathML to images
  49. 53. Code available at: https://software.cnx.rice.edu/svn/devsets/mobile-frontend/buildout/xdv </li></ul>
  50. 54. Coolest Diazo feature: Inline XSL
  51. 55. Next we tried Deliverance
  52. 56. Deliverance Feedback <ul><li>Easy to find broken rules with debugging console
  53. 57. Advanced transforms possible using pure Python and pyref syntax
  54. 58. Code available at: https://software.cnx.rice.edu/svn/devsets/mobile-frontend/buildout/deliverance </li></ul>
  55. 59. With Deliverance you can have your Python <ul><li>Invoke with: <response pyref=&quot;cnxmobile:transform&quot; />
  56. 60. Transform table to list in Python using lxml : </li></ul>
  57. 61. Demo
  58. 62. Questions?
  59. 63. Attribution <ul><li>http://www.flickr.com/photos/twopinkpossums/3652883147
  60. 64. http://www.flickr.com/photos/sully_aka__wstera2/1407282637
  61. 65. http://www.slideshare.net/stevevosloo/open-innov-africa-summit-sv-notes
  62. 66. http://www.slideshare.net/Jazkarta/deliverance-talk-at-plone-meetup </li></ul>

×