Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Happy hacking with Plone
Éric Bréhault - PloneConf 2015
We, Plone developers
invest time in Plone,
build something nice and attractive,
feel pround of it.
We, Plone developers
from "Les Vacances du Petit Nicolas" by Laurent Tirard
.fx: extra-large
The users play
from "Les Vacances du Petit Nicolas" by Laurent Tirard
The conflict
They loved it.
We are desperate.
We retaliate
Pharmakon
φάρμακον: medecine, drug, poison
Any medecine is also a poison.
My solution
Hackability is a feature
It is not a flaw.
It must be provided as a tool.
A hacking tool...
to change or add whatever we want in our Plone site
through a modern and pleasant web interface
... not ...
ZMI?
The Plone Theming editor!
Already a "hacking" tool:
non-Plone experts can change the entire theme.
Diazo theory
"We Write XSLT, So You Don't Have To"
Diazo reality
Guess what? I am writing tons of XSLT!!
What we need
Content-to-content
On-the-fly content changes with <before/>and <after/>.
< b e f o r e c s s : c o n t e n t = " # c o n ...
Content-to-content
On-the-fly content insertion.
< b e f o r e c s s : c o n t e n t - c h i l d r e n = " # m a i n " >
<...
Content-to-content
On-the-fly remote content insertion.
< b e f o r e c s s : c o n t e n t - c h i l d r e n = " # m a i ...
We want more
create our own chuncks of content
implement our own scripts
with basic knowledge of HTML and Python
Rapido
It lives in the theme
Editable through the Plone interface...
...or in the sources.
We use Diazo to inject it in Plone.
Dead simple
no ZCA stuff,
no ZPT (or any templating language),
no JBOT,
Just HTML and Python
Demo
What do we get in our
context?
context.app
context.request
context.portal
context.content
context.api(the Plone API!!)
Is it secure?
Python scripts are executed by
zope.security.untrustedpython.
All the regular security stack is applied, lik...
Battery included
Rapido comes with a complete REST API.
GET / POST / DELETE / PUT / PATCH
It is a ready-to-use JSON backen...
Demo
Battery included
Rapido provides a Plone Content Rules action.
We can hook our scripts to any Plone event.
Battery included
Rapido is Mosaic compliant.
(but it does not depend on it)
Demo
Thank you!
Happy hacking with Plone
Prochain SlideShare
Chargement dans…5
×

Happy hacking with Plone

2 085 vues

Publié le

Eric Bréhault's talk at Plone Conference 2015 in Bucharest

Publié dans : Logiciels
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Happy hacking with Plone

  1. 1. Happy hacking with Plone Éric Bréhault - PloneConf 2015
  2. 2. We, Plone developers invest time in Plone, build something nice and attractive, feel pround of it.
  3. 3. We, Plone developers from "Les Vacances du Petit Nicolas" by Laurent Tirard .fx: extra-large
  4. 4. The users play from "Les Vacances du Petit Nicolas" by Laurent Tirard
  5. 5. The conflict They loved it. We are desperate.
  6. 6. We retaliate
  7. 7. Pharmakon φάρμακον: medecine, drug, poison Any medecine is also a poison.
  8. 8. My solution
  9. 9. Hackability is a feature It is not a flaw. It must be provided as a tool.
  10. 10. A hacking tool... to change or add whatever we want in our Plone site through a modern and pleasant web interface ... not a hackable system
  11. 11. ZMI?
  12. 12. The Plone Theming editor! Already a "hacking" tool: non-Plone experts can change the entire theme.
  13. 13. Diazo theory "We Write XSLT, So You Don't Have To"
  14. 14. Diazo reality Guess what? I am writing tons of XSLT!!
  15. 15. What we need
  16. 16. Content-to-content On-the-fly content changes with <before/>and <after/>. < b e f o r e c s s : c o n t e n t = " # c o n t e n t - c o r e " > < a h r e f = " m a i l t o : c o n t a c t @ d i a z o . o r g " > A s k f o r h e l p < / a > < / b e f o r e >
  17. 17. Content-to-content On-the-fly content insertion. < b e f o r e c s s : c o n t e n t - c h i l d r e n = " # m a i n " > < i n c l u d e c s s : c o n t e n t = " # b r e a d c r u m b s " / > < / b e f o r e >
  18. 18. Content-to-content On-the-fly remote content insertion. < b e f o r e c s s : c o n t e n t - c h i l d r e n = " # m a i n " > < i n c l u d e h r e f = " / n e w s " c s s : c o n t e n t = " # b r e a d c r u m b s " / > < / b e f o r e >
  19. 19. We want more create our own chuncks of content implement our own scripts with basic knowledge of HTML and Python
  20. 20. Rapido
  21. 21. It lives in the theme Editable through the Plone interface... ...or in the sources. We use Diazo to inject it in Plone.
  22. 22. Dead simple no ZCA stuff, no ZPT (or any templating language), no JBOT, Just HTML and Python
  23. 23. Demo
  24. 24. What do we get in our context? context.app context.request context.portal context.content context.api(the Plone API!!)
  25. 25. Is it secure? Python scripts are executed by zope.security.untrustedpython. All the regular security stack is applied, like: current user privileges, CSRF policy (@PostOnlyfor instance).
  26. 26. Battery included Rapido comes with a complete REST API. GET / POST / DELETE / PUT / PATCH It is a ready-to-use JSON backend.
  27. 27. Demo
  28. 28. Battery included Rapido provides a Plone Content Rules action. We can hook our scripts to any Plone event.
  29. 29. Battery included Rapido is Mosaic compliant. (but it does not depend on it)
  30. 30. Demo
  31. 31. Thank you!

×