-
Current Best Practices
last modified July 8 by pigeonflight
A single list of every technology you need to learn to develop with plone3, why you need it and how to learn it. Just whats current best practice.
Maintaining older code then see Obsolete Practices.
Feeling brave? see
Upcoming
Practices.
Confused? Read
How to use the cheatsheet
.
Warning: This document isn't complete. If you know plone then join and edit this page. Let's make plone dev simple.
Deployment and Developer Environment
Buildout
For: Best way to install and configure zope and plone
How:
Load Balancing: Pound + ZEO + Squid
For: high traffic sites. large numbers of simultaneous logins. processor intensive sites.
How: Cross-Training for Your Plone Deployment
Reverse Proxy: cachefu + squid + buildout
For: Optimise cache settings for performance. Create a production environment.
How: plone.recipe.squid Cross-Training for Your Plone Deployment
Egg
For: To add new python modules into plone.
How: easy_install
Paster + Zopeskel
For: Quick boilderplate eggs for themes, buildouts etc
How: Readme
generic_setup profiles
For: To configure your plone instance when installing your egg
How:
Unit Testing
For: To test your code without starting zope
How:
PDB
For: Best practice when you need find out exactly how the your code, plone code or 3rd party code is running.
How: PDB and plone
Basics of understand Python, Zope, Zope3 and Plone
Python
For: pretty much everything
How: QuickRef BeginnersGuide Python List Comprehension. Python Lambda. Python decorators. Python dir(). Python help(). Debugging with PDB.
Interfaces
For: To attach behaviour
How:
configuration using zcml
For:
How:
Zope3 Adaptors
For: adapters mediate between abstract APIs and concrete objects
How: Five Tutorial: step 5 Slides
ZODB and pickling
For: Building utilities, content types or other kinds of persistance. Understanding differences to RDBMs architecture
How: ZODB/ZEO Programming Guide
portal_catalog
For: Creating custom searches of content. Indexing addition fields
How:
Zope Security
For: security checking, creating new permissions
How: Zope Book: Users and security
Object Publishing + Acquisition
For: Url traversal, request marshaling. How urls connect to your code
How: Object Traversal reference Martin on MVC in Zope/Plone
BrowserView Class
For: Where your controller code goes. In MVC terms, View = template (normally zpt), Controller is the BrowserView class, which gets linked to urls via zcml. So typical call would be: URL traversal -> BrowserView -> template -> BrowserView -> Model (AT class or sql or whatever).
Replaces: FormController (.cpy), python scripts, controller methods in AT classes, controller methods in templates.
How: Tutortial
Customisation
Zope Page Templates (ZPT)
For: Customize viewlets, forms, portlets
How: Reference
CSS
For: To theme a plone site
How: Elemental reference
PyPI and PSC
For: where to get add ons for plone
How:
plone.browserlayer
For: Lets views be specific just to the installed product
How:
archetypes.schemaextender
For: Add fields or metadata to existing content types
How:
Viewlets
For: Include html on every page. To customise certain areas of a plone page such as the page header.
How:
actions (and the actions tool)
For: Add links that appear on most pages
How: Use genericsetup profile
@@manage-viewlets + GS export + paster plone3_theme + skins + css
For: best current solution for a plone theming process. Skins should be used for js, css and images.
How:Tutorial best practices for OOTB themeingPloneFormGen
For: Create a dynamic Standalone Form . ie Fields can be changed TTW.
How:
Remember + Membrane
For: Create users than can be managed using workflows, make it easy to customize the registration form, improve "searchability" of members
Application/Add-on Development
Archetypes + paster create -t archetype
For: Creating
new content type
. Creating forms with values that persist like a database.
How: archetypes quickref | archetypes using paster | Zopeskel contenttypes
HTML Forms + Argument Marshaling
For: Creating either a very simple or highly customised
Standalone Form
How: Object Publising reference
zc.formlib
For: Create a Standalone Form with auto generated widgets
How: Readme
Upcoming: z3c.form but not used enough yetZope3 Utilities + local utilities + componentregistry.xml
For: Holding singleton/global persistent data o global methods. replaces portal_properties and plone tools.
How: martins book has the only decent local utility tuturial I can find. mrtopf:zope3-utilities
Configlets
For: Forms that go in site setup
How:
Portlets and Portlet Managers
For: Creating your own portlet type or extending an existing one.
How:
Portal status message
For: displaying feedback on actions to the user
How: PLIP