b-org: Creating content types the Plone 2.5 way
This Tutorial applies to:
Plone 2.5.x
This Tutorial is intended for:
Developers
optilude
All content on one page (useful for printing, presentation mode etc.)
- Introduction What is b-org, and what will you learn here?
- A whirlwind tour of Zope 3 Zope 3 is still fairly new. After reading this tutorial, it should hopefully start to feel a bit more familiar. In this section, we will give a brief overview of what is different in Zope 3 and how it fits into Plone.
- Overview of b-org The big picture
- To Archetype or not to Archetype Archetypes is still the most complete framework for building content types quickly. With the advent of Zope 3, there is an alternative in Zope 3 schemas. Here's why b-org doesn't use them.
- The extension story One of the main drivers behind the componentisation of b-org is that it should be easy to extend and customise for third party developers. We'll take a look at how such customisations may look, before considering how we made it possible.
- Filesystem organisation b-org attempts to adhere to modern ideal about how code should be laid out on the filesystem.
- Interfaces In Zope 3, everything is connected to an interface in some way. Sure enough, b-org has a slew of them. Getting the interface design right is often more than half the battle, so pay attention to this part.
- Test-driven development Testing should come first, not last, when doing development.
- Setup using GenericSetup b-org uses GenericSetup to impose itself on your Plone instance. Here's how it works.
- Using membrane to provide membership behaviour How b-org uses membrane to let employees be users and departments be groups
- Writing a custom PAS plug-in Projects require that members are given particular local roles within a project space. This is achieved using a custom PAS plug-in.
- Placeful workflow b-org uses CMFPlacefulWorkflow, which ships with Plone 2.5, to manage the workflow of content objects inside a project.
- Sending and handling events Events is undoubtedly one of the most useful things that Zope 3 brings to the Zope 2 world. Here's how b-org uses them.
- Annotations Annotations are an elegant solution to the "where do I store this?" problem, and are used in many Zope 3 applications.
- Zope 3 Views One of the nicest things that Zope 3 brough us is a way to manage view logic.
Wonderful Tutorial
The section on schema extension still confuses me. If you wanted to have a CharityEmployee and a CharityContributor (both able to log in) would you subclass EmployeeContent and then extend each of the schemas? Would you need to subclass Employee as well or just create two classes that implement IEmployee and adapt either ICharityEmployee or ICharityContributor or am I completely out to lunch?
Annotations
Fixed
is to add <include package="zope.app.annotation" /> to the configure.zcml
Woah
This must have been the most comprehensive tutorial about Zope 3/upcoming features. I was rolling my eyes all the time I read through it. Very nice that you have been able to pull together so much useful information.