Zope is Dead,
Long Live Zope!

    Lennart Regebro
    Krakow, June 2011
“Zope Is Python's Killer App”
      Jon Udell – BYTE, February 2000
Pop Quiz!
Google trends: “Zope”
A brief history of Zope
Year: 1996
●   Duke Nukem 3D
●   Altavista
●   Web development is CGI and Perl
●   Maybe php, if you are lucky
●   Spice Girls
●   Presentations had bullet lists
Location: An airplane
●   Jim Fulton creates Bobo
    ●   Object publishing
    ●   Traversal
    ●   Open Source
Year: 1997 (maybe)
●   BoboPOS: A persistent object storage
●   DTML: Innovative HTML templating
●   Principia: A web framework
    ●   Uses Bobo and BoboPOS and DTML
Year: 1998




Principia becomes open source
     and is renamed Zope
Year: 2001




The warts of Zope starts being a problem

          A rewrite is started
Year: 2004




The rewrite is released as Zope 3
Year: 2009




Zope 3 is renamed BlueBream
Year: 2011
Zope?
Zope!
Object Publishing
●   You use the URL it to find an object
●   The object is then asked to render itself
●   No stdout is used
●   No loading of the whole program every
    request
●   Your application is not a collection of
    separate scripts on the disk
Traversal
●   Example path: /calendar/2011/06/17/google
●   / returns a root object
●   You ask the root object for the 'calendar'
    subobject
●   You ask calendar for the '2011' object
●   Etc until you reach the 'google' object
●   Which you ask to render itself
●   No more /calendar.php?item=84735
Many other nice things
●   Fine grained access control
●   User management
●   Internationalization
●   Reusable extension products
●   Zope Page Templates
●   Through-the-web Development
Digression: Database Fashions
●   1990's: Object-Oriented Databases
●   Early 2000's: In-memory databases
●   Mid 2000's: Transparent persistence
●   Now: Schemaless / NoSQL databases and
    sharding
ZODB
●   ZODB is an object-oriented,
●   In-memory transactional,
●   Transparently persistent,
●   Schemaless database.
●   It's hierarchical and logging as well.
The facepalms of Zope
Through-the-web Development
●   Code in the database
●   No version control
●   Restricted Python for security reasons
●   You can't use normal development tools
Development dead-ends
●   The TTW development was not OOP
    ●   You end up with a pile of scripts
●   Solution: ZClasses
    ●   Actually was even worse
    ●   Required re-write
●   Disk-based products
    ●   The right solution
    ●   But: Required rewrite. Again.
The Zope Ghetto
●   Zope had to invent everything
●   Later others reinvented it
●   Zope ended up with its own solution
Monolithic
Magic attributes and methods
●   __bobo_traverse__()
    ●   Special traverse logic
●   __before_publishing_traverse__()
    ●   Also special traverse logic
●   __call__()
    ●   Is what renders the object.
    ●   Unless is has an index_html attribute
        –   Unless there is a default view component
             ●   Unless there is a __browser_default__()
Acquisition
●   Like inheritance but completely different
●   All objects “acquire” the attributes of objects
    above them in the object hierarchy
●   The complete opposite of namespaces
Backwards compatibility forever
Bad karma
●   Bad documentation
●   No ability to hype
●   Ugly web page
Bad learning curve

                         Just gets worse




Starts easy
Zope 3!
Fixed all the problems
●   Not TTW
●   An awesome aspect-inspirect component
    architecture!
●   Everything pluggable
●   Acquisition only when you ask for it
●   Super-mega-enterprisey!
Nicer learning curve
But...
●   Not backwards compatible
●   Death by abstraction:
    ●   Everything is an adapter or a utility
●   All files called the same:
    ●   configure.zcml, interfaces.py, browser.py, adapters.py,
        configure.zcml again.
    ●   “A conspiracy on the hard-disk”
         –   Jörgen Modin
●   Still installed as a monolith
●   Confusing name
Five




Zope 3's awesome component architecture

             But in Zope 2
Mmmmmyeah...
The King is Dead?
State of Zope 2011
Plone
●   Fantastic Content Management System
●   Loads of users
●   Great community
●   Best conferences
Buildout!
●   Deployment tool
●   For development and production
●   Extensible with recipes
●   Even used by prominent Django-people!
Repoze
●   A re-imagining of the Zope publisher
●   A WSGI pipeline of middleware
    ●   Transactions
    ●   Security
    ●   Indexing
●   Quickly picked up by Pylons/TG crowd
Cooperation!




Pylons ♥ BFG = True
Pyramid
●   Routing or Traversal
●   Persistance agnostic (can even use ZODB)
●   Fast and extensible
●   Best T-shirt of Pycon 2011
Deliverance / Diazo
●   A whole new way to theme sites
●   Rules to map items from content to theme
●   Skin sites in hours
●   Make several apps look the same
Hot or Not?




✗             ✓
Cool Zope Things
●   Object publishing
●   ZODB
●   Zope Component Architecture
●   Buildout
●   Repoze
●   Pyramid
●   Deliverance / Diazo
Questions?




regebro@gmail.com

Zope is dead - Long live Zope

  • 1.
    Zope is Dead, LongLive Zope! Lennart Regebro Krakow, June 2011
  • 2.
    “Zope Is Python'sKiller App” Jon Udell – BYTE, February 2000
  • 3.
  • 4.
  • 5.
  • 6.
    Year: 1996 ● Duke Nukem 3D ● Altavista ● Web development is CGI and Perl ● Maybe php, if you are lucky ● Spice Girls ● Presentations had bullet lists
  • 7.
    Location: An airplane ● Jim Fulton creates Bobo ● Object publishing ● Traversal ● Open Source
  • 8.
    Year: 1997 (maybe) ● BoboPOS: A persistent object storage ● DTML: Innovative HTML templating ● Principia: A web framework ● Uses Bobo and BoboPOS and DTML
  • 9.
    Year: 1998 Principia becomesopen source and is renamed Zope
  • 10.
    Year: 2001 The wartsof Zope starts being a problem A rewrite is started
  • 11.
    Year: 2004 The rewriteis released as Zope 3
  • 12.
    Year: 2009 Zope 3is renamed BlueBream
  • 13.
  • 14.
  • 15.
  • 16.
    Object Publishing ● You use the URL it to find an object ● The object is then asked to render itself ● No stdout is used ● No loading of the whole program every request ● Your application is not a collection of separate scripts on the disk
  • 17.
    Traversal ● Example path: /calendar/2011/06/17/google ● / returns a root object ● You ask the root object for the 'calendar' subobject ● You ask calendar for the '2011' object ● Etc until you reach the 'google' object ● Which you ask to render itself ● No more /calendar.php?item=84735
  • 18.
    Many other nicethings ● Fine grained access control ● User management ● Internationalization ● Reusable extension products ● Zope Page Templates ● Through-the-web Development
  • 19.
    Digression: Database Fashions ● 1990's: Object-Oriented Databases ● Early 2000's: In-memory databases ● Mid 2000's: Transparent persistence ● Now: Schemaless / NoSQL databases and sharding
  • 20.
    ZODB ● ZODB is an object-oriented, ● In-memory transactional, ● Transparently persistent, ● Schemaless database. ● It's hierarchical and logging as well.
  • 21.
  • 22.
    Through-the-web Development ● Code in the database ● No version control ● Restricted Python for security reasons ● You can't use normal development tools
  • 23.
    Development dead-ends ● The TTW development was not OOP ● You end up with a pile of scripts ● Solution: ZClasses ● Actually was even worse ● Required re-write ● Disk-based products ● The right solution ● But: Required rewrite. Again.
  • 24.
    The Zope Ghetto ● Zope had to invent everything ● Later others reinvented it ● Zope ended up with its own solution
  • 25.
  • 26.
    Magic attributes andmethods ● __bobo_traverse__() ● Special traverse logic ● __before_publishing_traverse__() ● Also special traverse logic ● __call__() ● Is what renders the object. ● Unless is has an index_html attribute – Unless there is a default view component ● Unless there is a __browser_default__()
  • 27.
    Acquisition ● Like inheritance but completely different ● All objects “acquire” the attributes of objects above them in the object hierarchy ● The complete opposite of namespaces
  • 28.
  • 29.
    Bad karma ● Bad documentation ● No ability to hype ● Ugly web page
  • 30.
    Bad learning curve Just gets worse Starts easy
  • 31.
  • 32.
    Fixed all theproblems ● Not TTW ● An awesome aspect-inspirect component architecture! ● Everything pluggable ● Acquisition only when you ask for it ● Super-mega-enterprisey!
  • 33.
  • 34.
    But... ● Not backwards compatible ● Death by abstraction: ● Everything is an adapter or a utility ● All files called the same: ● configure.zcml, interfaces.py, browser.py, adapters.py, configure.zcml again. ● “A conspiracy on the hard-disk” – Jörgen Modin ● Still installed as a monolith ● Confusing name
  • 35.
    Five Zope 3's awesomecomponent architecture But in Zope 2
  • 36.
  • 37.
  • 38.
  • 39.
    Plone ● Fantastic Content Management System ● Loads of users ● Great community ● Best conferences
  • 41.
    Buildout! ● Deployment tool ● For development and production ● Extensible with recipes ● Even used by prominent Django-people!
  • 42.
    Repoze ● A re-imagining of the Zope publisher ● A WSGI pipeline of middleware ● Transactions ● Security ● Indexing ● Quickly picked up by Pylons/TG crowd
  • 44.
  • 45.
    Pyramid ● Routing or Traversal ● Persistance agnostic (can even use ZODB) ● Fast and extensible ● Best T-shirt of Pycon 2011
  • 47.
    Deliverance / Diazo ● A whole new way to theme sites ● Rules to map items from content to theme ● Skin sites in hours ● Make several apps look the same
  • 50.
  • 51.
    Cool Zope Things ● Object publishing ● ZODB ● Zope Component Architecture ● Buildout ● Repoze ● Pyramid ● Deliverance / Diazo
  • 53.