Upload
lennart-regebro
View
2.264
Download
0
Tags:
Embed Size (px)
DESCRIPTION
A talk about common mistakes in Plone development. Video is available on blip.tv as well. http://ploneconference2010.blip.tv/file/4304533/
Citation preview
How not to develop with Plone
Lennart Regebro, CollibertyPlone Conference 2010, Bristol
How not to develop with Plone(A rant)
Lennart Regebro, CollibertyPlone Conference 2010, Bristol
Don't do your own scaffolding!
Use paster
Paster
$ easy_install ZopeSkel$ paster create --list-templates$ paster create -t plone3_theme$ paster create -t archetype$ paster create -t basic_namespace
Plone buildouts beware!● No Plone 4 support (yet)● But plone_hosting template has some utilities:
● ZEO Server + Client● zopepy● logrotate● supervisor
Everything else beware!
The module name must have the correct number of dots!
ZopeSkel#basic_namespace: One dotZopeSkel#nested_namespace: Two dots
Local commands
$ paster addcontent --list-all$ paster addcontent contenttype$ paster addcontent portlet$ paster addcontent view
Clean up!
ExampleTypeSchema['title'].storage = atapi.AnnotationStorage()ExampleTypeSchema['description'].storage = atapi.AnnotationStorage()...class ExampleType(base.ATCTContent):... title = atapi.ATFieldProperty('title') description = atapi.ATFieldProperty('description')
Don't use doctests
Don't use doctests
Unless you are testing documentation
Don't reinstall to make updates
Make upgrade steps
Don't host the project yourself
Use the collective svn
Upload to the Cheese Shop
Don't use trunk
Don't assume so much
Don't require so much
Don't be so monolithic
Don't overuse components
Don't fight the framework
Don't use content types
For things that are not content
Don't use ZTK
when it conflicts with The Plone Way
Don't use CMF
To do things you can do without it
zope.event
subscribers = []
def notify(event): for subscriber in subscribers: subscriber(event)
blog.star
blog.star
collective.blog.view
collective.blog.feeds
collective.blog.portlets
collective.blog.star
Photo credits
Half scaffolding - istolethetvToothmato paste - Scott Feldstein
Eye Tests - State Records New South WalesUnloved Wicker Trunk – Fredo AlvarezThinking... Please wait - Karola Riegler
Ass Required - vhhammerEffort - Kris Bradley
MeccanoStyrofoam – Conor Lawless155/365 Infinite Regression (fractal) - Stuart Pilbrow
underneath a star – Jeremy Villasis