SlideShare uma empresa Scribd logo
1 de 42
A Winning combination: Plone and your favorite web framework
Why?
Plone is the best CMS that is NOT written in PHP
Plone has lots of great features ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Python
but...
Plone is complex
Plone can be slow
Caching is not always the answer to traffic
Plone is NOT a general web development framework ,[object Object],[object Object],[object Object],[object Object]
Frankenplone
It doesn't have to be like this. You can work with your favorite tools.
Content Mirror by   Kapil Thangavelu
Content Mirror serializes Plone content into a relational database ,[object Object],[object Object],[object Object],[object Object],[object Object]
It's simple
Now we can: ,[object Object],[object Object],[object Object],[object Object],[object Object]
And we can serve Plone content fast!
How does it work? ,[object Object],[object Object],[object Object],[object Object]
 
Installation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Configure the database with ZCML <configure xmlns=&quot;http://namespaces.zope.org/zope&quot; xmlns:db=&quot;http://namespaces.objectrealms.net/rdb&quot; xmlns:ore=&quot;http://namespaces.objectrealms.net/mirror&quot;> <!-- setup a database connection --> <db:engine url=&quot;postgres://localhost/plone&quot; name=&quot;mirror-db&quot; echo=&quot;True&quot;/> <!-- associate the database connection to mirror db structures --> <db:bind engine=&quot;mirror-db&quot; metadata=&quot;ore.contentmirror.schema.metadata&quot; /> </configure>
Configure custom content types For each custom content type installed on the site: <ore:mirror content= &quot;Products.ATContentTypes.content.document.ATDocument&quot; />
Generate tables and upload content dropdb plone createdb plone --encoding=UTF-8 # generate table definitions and create tables bin/instance run parts/productdistros/ContentMirror/ddl.py postgres > mirror.sql psql plone < /home/andy/plone/zinstance/mirror.sql # optionally, load existing content bin/instance run parts/productdistros/ContentMirror/bulk.py Plone
That's it. We're ready to rock & roll
The changes are sent synchronously to the database plone# select content_id, id, title from content where id = 'front-page'; content_id |  id  |  title ------------+------------+---------------- 8 | front-page | Content Mirror sent this (1 row)
What kind of sites can take advantage of this strategy? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Repoze.BFG front end class WebSite(UserDict): implements(IWebSite,ILocation) __acl__ = [ (Allow, Everyone, 'view') ] def __init__(self, website_id): UserDict.__init__(self) self.__name__ = None self.__parent__ = None self.website_id = website_id session = Session() website =  session.query( PloneContent ).with_polymorphic(  PloneWebSite ).filter( PloneContent.id==website_id ).first() self.title = website.title
Plango, by Andy McKay from django.db import models from django.contrib.contenttypes.models import ContentType from utils import normalize_name class Content(models.Model): class Meta: db_table = u'content' content_id = models.IntegerField(primary_key=True, editable=False) id = models.CharField(max_length=256, editable=False) uid = models.CharField(unique=True, max_length=36, editable=False) portal_type = models.CharField(max_length=64, editable=False) status = models.CharField(max_length=64, editable=False, null=False) type = models.CharField(max_length=64, editable=False) container = models.ForeignKey('self', related_name=&quot;parent&quot;, editable=False)
Anyone? ,[object Object],[object Object],[object Object],[object Object]
Content Mirror is easily extended ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
By the way, don't worry about the Component Architecture. We have studied the Zope CA so you don't have to.
A Google App Engine frontend ,[object Object],[object Object],[object Object],[object Object],[object Object]
GAE front end application import os import wsgiref.handlers from google.appengine.ext import webapp from google.appengine.ext.webapp import template from google.appengine.ext import db from google.appengine.ext.db import polymodel from google.appengine.api import users class PloneContent(polymodel.PolyModel): id = db.StringProperty() uid = db.StringProperty() portal_type = db.StringProperty() status = db.StringProperty() type = db.StringProperty()
Plone content in GAE
All discussed front ends will be made available during the sprints. Keep an eye on: http://contentmirror.googlecode.com/
Case study The Library of Congress in Chile
Create multiple sites in one instance
Select content from a shared store
Define a unique site layout and style
Deploy sites using repoze.bfg
Let Plone be a part of the Python universe
Thank you! Carlos de la Guardia email:  [email_address] twitter: cguardia blog: http://blog.delaguardia.com.mx

Mais conteúdo relacionado

Mais procurados

Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
Brandon Keepers
 
6 introduction-php-mvc-cakephp-m6-views-slides
6 introduction-php-mvc-cakephp-m6-views-slides6 introduction-php-mvc-cakephp-m6-views-slides
6 introduction-php-mvc-cakephp-m6-views-slides
MasterCode.vn
 
4 introduction-php-mvc-cakephp-m4-controllers-slides
4 introduction-php-mvc-cakephp-m4-controllers-slides4 introduction-php-mvc-cakephp-m4-controllers-slides
4 introduction-php-mvc-cakephp-m4-controllers-slides
MasterCode.vn
 

Mais procurados (20)

Django Interview Questions and Answers
Django Interview Questions and AnswersDjango Interview Questions and Answers
Django Interview Questions and Answers
 
The Django Web Application Framework
The Django Web Application FrameworkThe Django Web Application Framework
The Django Web Application Framework
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flask
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Flask
FlaskFlask
Flask
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /Capybara
 
How to create a joomla component from scratch
How to create a joomla component from scratchHow to create a joomla component from scratch
How to create a joomla component from scratch
 
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
6 introduction-php-mvc-cakephp-m6-views-slides
6 introduction-php-mvc-cakephp-m6-views-slides6 introduction-php-mvc-cakephp-m6-views-slides
6 introduction-php-mvc-cakephp-m6-views-slides
 
Html5
Html5Html5
Html5
 
Build and deploy Python Django project
Build and deploy Python Django projectBuild and deploy Python Django project
Build and deploy Python Django project
 
4 introduction-php-mvc-cakephp-m4-controllers-slides
4 introduction-php-mvc-cakephp-m4-controllers-slides4 introduction-php-mvc-cakephp-m4-controllers-slides
4 introduction-php-mvc-cakephp-m4-controllers-slides
 
BDD, Behat & Drupal
BDD, Behat & DrupalBDD, Behat & Drupal
BDD, Behat & Drupal
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014
 
CakePHP - Admin Acl Controlled
CakePHP - Admin Acl ControlledCakePHP - Admin Acl Controlled
CakePHP - Admin Acl Controlled
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
 

Destaque

Destaque (7)

Plone-driven Plone development (PD2)
Plone-driven Plone development (PD2)Plone-driven Plone development (PD2)
Plone-driven Plone development (PD2)
 
Boosting productivity with "Plone-driven Plone development"
Boosting productivity with "Plone-driven Plone development"Boosting productivity with "Plone-driven Plone development"
Boosting productivity with "Plone-driven Plone development"
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 
Prototyping is an attitude
Prototyping is an attitudePrototyping is an attitude
Prototyping is an attitude
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 
10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer Experience10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer Experience
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media Plan
 

Semelhante a A winning combination: Plone as CMS and your favorite Python web framework as front end

0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf
radhianiedjan1
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
Tony Frame
 

Semelhante a A winning combination: Plone as CMS and your favorite Python web framework as front end (20)

JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
 
django
djangodjango
django
 
Build Python CMS The Plone Way
Build Python CMS The Plone WayBuild Python CMS The Plone Way
Build Python CMS The Plone Way
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
 
FLossEd-BK Tequila Framework3.2.1
FLossEd-BK Tequila Framework3.2.1FLossEd-BK Tequila Framework3.2.1
FLossEd-BK Tequila Framework3.2.1
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's How
 
Content delivery Plone Symposium East 2010
Content delivery Plone Symposium East 2010Content delivery Plone Symposium East 2010
Content delivery Plone Symposium East 2010
 
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf
 
Django - basics
Django - basicsDjango - basics
Django - basics
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
 
Pinax Long Tutorial Slides
Pinax Long Tutorial SlidesPinax Long Tutorial Slides
Pinax Long Tutorial Slides
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
DIPLOMA IN DESIGNING AND WEBSITE DEVELOPMENT
DIPLOMA IN DESIGNING AND WEBSITE DEVELOPMENT DIPLOMA IN DESIGNING AND WEBSITE DEVELOPMENT
DIPLOMA IN DESIGNING AND WEBSITE DEVELOPMENT
 

Mais de Carlos de la Guardia (10)

Introduction to the transaction package
Introduction to the transaction packageIntroduction to the transaction package
Introduction to the transaction package
 
Pyramid as a base for higher level frameworks
Pyramid as a base for higher level frameworksPyramid as a base for higher level frameworks
Pyramid as a base for higher level frameworks
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
 
Pyramid tutorial
Pyramid tutorialPyramid tutorial
Pyramid tutorial
 
Pyramid faq
Pyramid faqPyramid faq
Pyramid faq
 
ZODB Tips and Tricks
ZODB Tips and TricksZODB Tips and Tricks
ZODB Tips and Tricks
 
Python intro for Plone users
Python intro for Plone usersPython intro for Plone users
Python intro for Plone users
 
Pyramid deployment
Pyramid deploymentPyramid deployment
Pyramid deployment
 
World Plone Day 2008 Mexico
World Plone Day 2008 MexicoWorld Plone Day 2008 Mexico
World Plone Day 2008 Mexico
 
Turning Plone into a dynamic site factory
Turning Plone into a dynamic site factoryTurning Plone into a dynamic site factory
Turning Plone into a dynamic site factory
 

Último

Último (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

A winning combination: Plone as CMS and your favorite Python web framework as front end

  • 1. A Winning combination: Plone and your favorite web framework
  • 3. Plone is the best CMS that is NOT written in PHP
  • 4.
  • 9. Caching is not always the answer to traffic
  • 10.
  • 12. It doesn't have to be like this. You can work with your favorite tools.
  • 13. Content Mirror by Kapil Thangavelu
  • 14.
  • 16.
  • 17. And we can serve Plone content fast!
  • 18.
  • 19.  
  • 20.
  • 21. Configure the database with ZCML <configure xmlns=&quot;http://namespaces.zope.org/zope&quot; xmlns:db=&quot;http://namespaces.objectrealms.net/rdb&quot; xmlns:ore=&quot;http://namespaces.objectrealms.net/mirror&quot;> <!-- setup a database connection --> <db:engine url=&quot;postgres://localhost/plone&quot; name=&quot;mirror-db&quot; echo=&quot;True&quot;/> <!-- associate the database connection to mirror db structures --> <db:bind engine=&quot;mirror-db&quot; metadata=&quot;ore.contentmirror.schema.metadata&quot; /> </configure>
  • 22. Configure custom content types For each custom content type installed on the site: <ore:mirror content= &quot;Products.ATContentTypes.content.document.ATDocument&quot; />
  • 23. Generate tables and upload content dropdb plone createdb plone --encoding=UTF-8 # generate table definitions and create tables bin/instance run parts/productdistros/ContentMirror/ddl.py postgres > mirror.sql psql plone < /home/andy/plone/zinstance/mirror.sql # optionally, load existing content bin/instance run parts/productdistros/ContentMirror/bulk.py Plone
  • 24. That's it. We're ready to rock & roll
  • 25. The changes are sent synchronously to the database plone# select content_id, id, title from content where id = 'front-page'; content_id | id | title ------------+------------+---------------- 8 | front-page | Content Mirror sent this (1 row)
  • 26.
  • 27. Repoze.BFG front end class WebSite(UserDict): implements(IWebSite,ILocation) __acl__ = [ (Allow, Everyone, 'view') ] def __init__(self, website_id): UserDict.__init__(self) self.__name__ = None self.__parent__ = None self.website_id = website_id session = Session() website = session.query( PloneContent ).with_polymorphic( PloneWebSite ).filter( PloneContent.id==website_id ).first() self.title = website.title
  • 28. Plango, by Andy McKay from django.db import models from django.contrib.contenttypes.models import ContentType from utils import normalize_name class Content(models.Model): class Meta: db_table = u'content' content_id = models.IntegerField(primary_key=True, editable=False) id = models.CharField(max_length=256, editable=False) uid = models.CharField(unique=True, max_length=36, editable=False) portal_type = models.CharField(max_length=64, editable=False) status = models.CharField(max_length=64, editable=False, null=False) type = models.CharField(max_length=64, editable=False) container = models.ForeignKey('self', related_name=&quot;parent&quot;, editable=False)
  • 29.
  • 30.
  • 31. By the way, don't worry about the Component Architecture. We have studied the Zope CA so you don't have to.
  • 32.
  • 33. GAE front end application import os import wsgiref.handlers from google.appengine.ext import webapp from google.appengine.ext.webapp import template from google.appengine.ext import db from google.appengine.ext.db import polymodel from google.appengine.api import users class PloneContent(polymodel.PolyModel): id = db.StringProperty() uid = db.StringProperty() portal_type = db.StringProperty() status = db.StringProperty() type = db.StringProperty()
  • 35. All discussed front ends will be made available during the sprints. Keep an eye on: http://contentmirror.googlecode.com/
  • 36. Case study The Library of Congress in Chile
  • 37. Create multiple sites in one instance
  • 38. Select content from a shared store
  • 39. Define a unique site layout and style
  • 40. Deploy sites using repoze.bfg
  • 41. Let Plone be a part of the Python universe
  • 42. Thank you! Carlos de la Guardia email: [email_address] twitter: cguardia blog: http://blog.delaguardia.com.mx