27
How not to develop with Plone Lennart Regebro, Colliberty Plone Conference 2010, Bristol

How not to develop with Plone

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

Page 1: How not to develop with Plone

How not to develop with Plone

Lennart Regebro, CollibertyPlone Conference 2010, Bristol

Page 2: How not to develop with Plone

How not to develop with Plone(A rant)

Lennart Regebro, CollibertyPlone Conference 2010, Bristol

Page 3: How not to develop with Plone

Don't do your own scaffolding!

Page 4: How not to develop with Plone

Use paster

Page 5: How not to develop with Plone

Paster

$ easy_install ZopeSkel$ paster create --list-templates$ paster create -t plone3_theme$ paster create -t archetype$ paster create -t basic_namespace

Page 6: How not to develop with Plone

Plone buildouts beware!● No Plone 4 support (yet)● But plone_hosting template has some utilities:

● ZEO Server + Client● zopepy● logrotate● supervisor

Page 7: How not to develop with Plone

Everything else beware!

The module name must have the correct number of dots!

ZopeSkel#basic_namespace: One dotZopeSkel#nested_namespace: Two dots

Page 8: How not to develop with Plone

Local commands

$ paster addcontent --list-all$ paster addcontent contenttype$ paster addcontent portlet$ paster addcontent view

Page 9: How not to develop with Plone

Clean up!

ExampleTypeSchema['title'].storage = atapi.AnnotationStorage()ExampleTypeSchema['description'].storage = atapi.AnnotationStorage()...class ExampleType(base.ATCTContent):... title = atapi.ATFieldProperty('title') description = atapi.ATFieldProperty('description')

Page 10: How not to develop with Plone

Don't use doctests

Page 11: How not to develop with Plone

Don't use doctests

Unless you are testing documentation

Page 12: How not to develop with Plone

Don't reinstall to make updates

Make upgrade steps

Page 13: How not to develop with Plone

Don't host the project yourself

Use the collective svn

Upload to the Cheese Shop

Page 14: How not to develop with Plone

Don't use trunk

Page 15: How not to develop with Plone

Don't assume so much

Page 16: How not to develop with Plone

Don't require so much

Page 17: How not to develop with Plone

Don't be so monolithic

Page 18: How not to develop with Plone

Don't overuse components

Page 19: How not to develop with Plone

Don't fight the framework

Page 20: How not to develop with Plone

Don't use content types

For things that are not content

Page 21: How not to develop with Plone

Don't use ZTK

when it conflicts with The Plone Way

Page 22: How not to develop with Plone

Don't use CMF

To do things you can do without it

Page 23: How not to develop with Plone

zope.event

subscribers = []

def notify(event): for subscriber in subscribers: subscriber(event)

Page 24: How not to develop with Plone

blog.star

Page 25: How not to develop with Plone

blog.star

collective.blog.view

collective.blog.feeds

collective.blog.portlets

collective.blog.star

Page 26: How not to develop with Plone

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

Page 27: How not to develop with Plone

Thank you

Lennart [email protected]

http://regebro.wordpress.com/