SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler offline
C³: Mixing Plone
   and Django
for explosive results!
The requirements

●   a modern e-commerce
    platform
●   with a good contents
    story
●   and advanced
    community features
Plone alone... will get it done?

a good web CMS like Plone has no clue of:
●   e-commerce needs
●   advanced community features
no known Plone extension could convince
us and...
we didn't want to start any new Plone
project with this needs
The quest for a good solution

The Graal should:
●   be python based
    (we ♥ python!)
●   not reinvent the wheel
●   be open source
●   have a community
    behind
    (we ♥ happy customers)
Attack of the ponies

We looked at Django:
●   good and stable since
    years
●   with a strong and
    passionate community
●   had a proven
    ecommerce solution
    and a proven
    community solution
The evil plan
Satchmo, the e-commerce

http://www.satchmoproject.com/
●   feature rich
●   flexible as we needed
●   with a group of people really
    using and improving it
Pinax, the community

http://pinaxproject.com/
●   a suite of modules for community
    purposes
●   reuse what's already there
●   good working example projects included
Why Plone then?

talking about web CMSs:
●   python based
    (we ♥ python!)
●   not reinvent the wheel
●   open source
●   with a community behind
    (we ♥ happy customers)
●   "nothing compares to you"
It's a long way to the top

●   integration, integration, integration
●   choices, choices, choices
looking for sustainable and elegant
solutions
The Plone and Django dance

a coreographer's job
●   Don't stomp on each
    other's feet
●   Don't do the same
    things twice
The dance steps

●   common theming via Diazo
●   don't store the same data
    twice
●   let one see what the other
    does
Ballet's preview
What about the users?

●   CMS users are content
    editors
    ●   they do not mix with the
        common people
●   Users are common
    across Django apps
    ●   but not across Plone
I'm sure I had it somewhere

●   Plone needs to read from
    the database
●   sqlalchemy? Duplication
    of code
To import or not to import
             django.db.models?
It is nobler in the code to suffer:
●   The thousand errors of
    circular dependencies
●   Or to take arms against
    settings.py, and by fixing that
    end them
Hamlet did it wrong
Syncronizing the dancers

●   Django handles the
    transaction trasparently
    via middleware
●   Hook up the right
    methods to Zope's
    transaction machinery
I've got a fever, and the only cure is...
               less code!
●   Sharing the same logic
    between Django and
    Plone views
●   Using django templates
    in Plone
●   That's the python, baby
    (and you just have to
    enjoy it)
Murphy's impedance

Some things we didn't quite
consider
●   Internationalization and language
    selection syncing
●   Linking content between systems
●   Paster vs nginx
Building the launch ramps

●   Single buildout
●   Paster+SQLite for
    development
    ●   Quick, pain-free setup
●   PostgreSQL+nginx+uwsgi for
    deployment
    ●   More robust but also more
        convoluted
Traps and dark pits

●   The Content-Length
    problem
    ●   Aka “Hello nginx, I have
        some bytes for you”
●   Where's that cookie coming
    from?
    ●   An i18n tale of horrors
The duct-taped parts

●   Static files and media files
●   The slow agony of
    settings.py
And in the end... they all lived on
                  github
●   djc.recipe
●   ~collective/collective.django
Towards the infinite, and beyond

●   Integrating users
    (PAS+repoze.who)
●   Making
    development
    faster
●   Managing themes
    and files easily

Mais conteúdo relacionado

Mais procurados

Migrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoMigrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoWeng Wei
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP PerspectiveBarry Jones
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in ClojureTroy Miles
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and AbstractionsMetosin Oy
 
How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web APIAurimas Niekis
 
Craft Beer & Clojure
Craft Beer & ClojureCraft Beer & Clojure
Craft Beer & ClojureMetosin Oy
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHPAurimas Niekis
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginnersAdam Englander
 
Python to go
Python to goPython to go
Python to goWeng Wei
 
ES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern JavascriptES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern JavascriptWojciech Dzikowski
 
Using Telegram to interact with an LED Matrix
Using Telegram to interact with an LED MatrixUsing Telegram to interact with an LED Matrix
Using Telegram to interact with an LED Matrixxorduna
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Rubykaigi 2017-nishimotz-v6
Rubykaigi 2017-nishimotz-v6Rubykaigi 2017-nishimotz-v6
Rubykaigi 2017-nishimotz-v6Takuya Nishimoto
 
Maven - Taming the Beast
Maven - Taming the BeastMaven - Taming the Beast
Maven - Taming the BeastRoberto Cortez
 
Ruby in office time reboot
Ruby in office time rebootRuby in office time reboot
Ruby in office time rebootKentaro Goto
 

Mais procurados (20)

Migrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoMigrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to Go
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP Perspective
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and Abstractions
 
How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web API
 
Craft Beer & Clojure
Craft Beer & ClojureCraft Beer & Clojure
Craft Beer & Clojure
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHP
 
Elixir intro
Elixir introElixir intro
Elixir intro
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 
CPAN Curation
CPAN CurationCPAN Curation
CPAN Curation
 
Python to go
Python to goPython to go
Python to go
 
ES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern JavascriptES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern Javascript
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
Using Telegram to interact with an LED Matrix
Using Telegram to interact with an LED MatrixUsing Telegram to interact with an LED Matrix
Using Telegram to interact with an LED Matrix
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Rubykaigi 2017-nishimotz-v6
Rubykaigi 2017-nishimotz-v6Rubykaigi 2017-nishimotz-v6
Rubykaigi 2017-nishimotz-v6
 
Maven - Taming the Beast
Maven - Taming the BeastMaven - Taming the Beast
Maven - Taming the Beast
 
Ruby in office time reboot
Ruby in office time rebootRuby in office time reboot
Ruby in office time reboot
 
Lokalise
LokaliseLokalise
Lokalise
 

Semelhante a C3: Mixing Plone and Django for explosive e-commerce and community results

Python in Industry
Python in IndustryPython in Industry
Python in IndustryDharmit Shah
 
Python Django Intro V0.1
Python Django Intro V0.1Python Django Intro V0.1
Python Django Intro V0.1Udi Bauman
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLoveOSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLoveNETWAYS
 
Python Django Basics
Python Django BasicsPython Django Basics
Python Django BasicsRahilMemon5
 
OpenNebulaConf2018 - Our Journey to OpenNebula - Germán Gutierrez - Booking.com
OpenNebulaConf2018 - Our Journey to OpenNebula - Germán Gutierrez - Booking.comOpenNebulaConf2018 - Our Journey to OpenNebula - Germán Gutierrez - Booking.com
OpenNebulaConf2018 - Our Journey to OpenNebula - Germán Gutierrez - Booking.comOpenNebula Project
 
Prototype4Production Presented at FOSSASIA2015 at Singapore
Prototype4Production Presented at FOSSASIA2015 at SingaporePrototype4Production Presented at FOSSASIA2015 at Singapore
Prototype4Production Presented at FOSSASIA2015 at SingaporeDhruv Gohil
 
Super lazy side projects - Hamik Mukelyan
Super lazy side projects - Hamik MukelyanSuper lazy side projects - Hamik Mukelyan
Super lazy side projects - Hamik MukelyanDrew Malone
 
Devops Devops Devops, at Froscon
Devops Devops Devops, at FrosconDevops Devops Devops, at Froscon
Devops Devops Devops, at FrosconKris Buytaert
 
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...Prasid Pathak
 
Drupal and Devops , the Survey Results
Drupal and Devops , the Survey ResultsDrupal and Devops , the Survey Results
Drupal and Devops , the Survey ResultsKris Buytaert
 
DevOps, Performance Optimization and the Green Life with Magento
DevOps, Performance Optimization and the Green Life with MagentoDevOps, Performance Optimization and the Green Life with Magento
DevOps, Performance Optimization and the Green Life with MagentoLuis Tineo
 
Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.Kris Buytaert
 
Deep Learning Applications (dadada2017)
Deep Learning Applications (dadada2017)Deep Learning Applications (dadada2017)
Deep Learning Applications (dadada2017)Abhishek Thakur
 
Plomino plone conf2010
Plomino plone conf2010Plomino plone conf2010
Plomino plone conf2010ebrehault
 
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)Dhilipsiva DS
 

Semelhante a C3: Mixing Plone and Django for explosive e-commerce and community results (20)

Python in Industry
Python in IndustryPython in Industry
Python in Industry
 
Python Django Intro V0.1
Python Django Intro V0.1Python Django Intro V0.1
Python Django Intro V0.1
 
Ploneide
PloneidePloneide
Ploneide
 
Pentester++
Pentester++Pentester++
Pentester++
 
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLoveOSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
 
Python Django Basics
Python Django BasicsPython Django Basics
Python Django Basics
 
OpenNebulaConf2018 - Our Journey to OpenNebula - Germán Gutierrez - Booking.com
OpenNebulaConf2018 - Our Journey to OpenNebula - Germán Gutierrez - Booking.comOpenNebulaConf2018 - Our Journey to OpenNebula - Germán Gutierrez - Booking.com
OpenNebulaConf2018 - Our Journey to OpenNebula - Germán Gutierrez - Booking.com
 
Introduce Python
Introduce PythonIntroduce Python
Introduce Python
 
Prototype4Production Presented at FOSSASIA2015 at Singapore
Prototype4Production Presented at FOSSASIA2015 at SingaporePrototype4Production Presented at FOSSASIA2015 at Singapore
Prototype4Production Presented at FOSSASIA2015 at Singapore
 
Devops For Drupal
Devops  For DrupalDevops  For Drupal
Devops For Drupal
 
Presentasi jlp
Presentasi jlpPresentasi jlp
Presentasi jlp
 
Super lazy side projects - Hamik Mukelyan
Super lazy side projects - Hamik MukelyanSuper lazy side projects - Hamik Mukelyan
Super lazy side projects - Hamik Mukelyan
 
Devops Devops Devops, at Froscon
Devops Devops Devops, at FrosconDevops Devops Devops, at Froscon
Devops Devops Devops, at Froscon
 
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
 
Drupal and Devops , the Survey Results
Drupal and Devops , the Survey ResultsDrupal and Devops , the Survey Results
Drupal and Devops , the Survey Results
 
DevOps, Performance Optimization and the Green Life with Magento
DevOps, Performance Optimization and the Green Life with MagentoDevOps, Performance Optimization and the Green Life with Magento
DevOps, Performance Optimization and the Green Life with Magento
 
Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.
 
Deep Learning Applications (dadada2017)
Deep Learning Applications (dadada2017)Deep Learning Applications (dadada2017)
Deep Learning Applications (dadada2017)
 
Plomino plone conf2010
Plomino plone conf2010Plomino plone conf2010
Plomino plone conf2010
 
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
 

C3: Mixing Plone and Django for explosive e-commerce and community results

  • 1. C³: Mixing Plone and Django for explosive results!
  • 2. The requirements ● a modern e-commerce platform ● with a good contents story ● and advanced community features
  • 3. Plone alone... will get it done? a good web CMS like Plone has no clue of: ● e-commerce needs ● advanced community features no known Plone extension could convince us and... we didn't want to start any new Plone project with this needs
  • 4. The quest for a good solution The Graal should: ● be python based (we ♥ python!) ● not reinvent the wheel ● be open source ● have a community behind (we ♥ happy customers)
  • 5. Attack of the ponies We looked at Django: ● good and stable since years ● with a strong and passionate community ● had a proven ecommerce solution and a proven community solution
  • 7. Satchmo, the e-commerce http://www.satchmoproject.com/ ● feature rich ● flexible as we needed ● with a group of people really using and improving it
  • 8. Pinax, the community http://pinaxproject.com/ ● a suite of modules for community purposes ● reuse what's already there ● good working example projects included
  • 9. Why Plone then? talking about web CMSs: ● python based (we ♥ python!) ● not reinvent the wheel ● open source ● with a community behind (we ♥ happy customers) ● "nothing compares to you"
  • 10. It's a long way to the top ● integration, integration, integration ● choices, choices, choices looking for sustainable and elegant solutions
  • 11. The Plone and Django dance a coreographer's job ● Don't stomp on each other's feet ● Don't do the same things twice
  • 12. The dance steps ● common theming via Diazo ● don't store the same data twice ● let one see what the other does
  • 14. What about the users? ● CMS users are content editors ● they do not mix with the common people ● Users are common across Django apps ● but not across Plone
  • 15. I'm sure I had it somewhere ● Plone needs to read from the database ● sqlalchemy? Duplication of code
  • 16. To import or not to import django.db.models? It is nobler in the code to suffer: ● The thousand errors of circular dependencies ● Or to take arms against settings.py, and by fixing that end them Hamlet did it wrong
  • 17. Syncronizing the dancers ● Django handles the transaction trasparently via middleware ● Hook up the right methods to Zope's transaction machinery
  • 18. I've got a fever, and the only cure is... less code! ● Sharing the same logic between Django and Plone views ● Using django templates in Plone ● That's the python, baby (and you just have to enjoy it)
  • 19. Murphy's impedance Some things we didn't quite consider ● Internationalization and language selection syncing ● Linking content between systems ● Paster vs nginx
  • 20. Building the launch ramps ● Single buildout ● Paster+SQLite for development ● Quick, pain-free setup ● PostgreSQL+nginx+uwsgi for deployment ● More robust but also more convoluted
  • 21. Traps and dark pits ● The Content-Length problem ● Aka “Hello nginx, I have some bytes for you” ● Where's that cookie coming from? ● An i18n tale of horrors
  • 22. The duct-taped parts ● Static files and media files ● The slow agony of settings.py
  • 23. And in the end... they all lived on github ● djc.recipe ● ~collective/collective.django
  • 24. Towards the infinite, and beyond ● Integrating users (PAS+repoze.who) ● Making development faster ● Managing themes and files easily