FAQ - Zope2 to Zope3
Return to FAQ index
- 1 What happened to the Zope2 TALES root variable?
- 2 Will Zope 3 be compatible with Zope 2 products?
- 3 What's this Five thing I've heard of?
- 4 Will I have to rewrite my Zope 2 Product?
- 5 What will be the roadmap for RDBMS support? Will it be similar to Zope2.x?
- 6 What changes will be done to the PropertyManager?
- 7 Will the class 'Folder' store the content in BTrees?
- 8 Which changes will be done to ZCatalog?
- 9 Will the UserManagement be changed so that a role can include another role?
- 10 Will the request and response be written with capital letters?
- 11 What about ZSQL Methods? Can't it support standard SQL like other scripting languages?
- 12 Will Zope 3 support DTML?
- 13 Will Zope 3 support Python scripts?
- 14 Will Zope 3 be compatible with CMF?
- 15 Is my good friend Acquisition going away?
- 16 Can I still whip up a presentation template TTW and view my content object with it?
- 17 Can I allow for the possibility of somebody overriding my filesystem based product's presentation templates TTW?
- 18 Can I change the default lookup order for methods/attributes/whatever?
- 19 Do I still define a method as public using doc string? (I find this cumbersome.)
- 20 Will methods and attributes with underscores be reachable TTW in Zope 3?
1 What happened to the Zope2 TALES root variable?
Q. In a tales expression, where has the "root" context variable gone? In zope2, we could use "path:root/path/to/object" or "path:/path/to/object", but it doesn't work with Zope 3. How can we access some object with an absolute path?
Right, there is no root namespace by default. I actually have never needed this feature. However, you can write your own TALES namespace adapter, so that you can say: mynamespace:root. We sometimes write our own namespace adapters to do this sort of thing.
2 Will Zope 3 be compatible with Zope 2 products?
No, but since Zope 2.8.0, all Zope 2 releases contain most of Zope 3, so you can start using its benefits today. Zope 2 products can be written more and more like Zope 3 packages (which is to say, like regular Python packages).
At some point, Zope 2 may be nothing more than a particular configuration of Zope 3.
3 What's this Five thing I've heard of?
Five is the project that integrated Zope 3 into Zope 2. It is part of Zope 2 since Zope 2.8.0.
The name is a bit of a joke: Zope 2 + Zope 3 = Five.
More information can be found at the Five project website
Through Five, almost all functionalities of Zope 3 are available in Zope 2.
4 Will I have to rewrite my Zope 2 Product?
You will not need to rewrite your product, just refactor it a bit (and throw out a lot of boilerplate in the process).
5 What will be the roadmap for RDBMS support? Will it be similar to Zope2.x?
RDBMS systems are already fully supported and are very similar to the RDB support in Zope 2. For connection objects however you now have a standardized connection URI, so you do not need to remember how to connect with every different database adapter.
The following database adapters have been implemented already: MySQLdbDA?, psycopgda (PostGreSQL?), pypgsqlda (PostGreSQL?), db2DA, informixDA, odbcDA, oracleDA, sapdbDA, sqliteDA, and sybaseDA. To write your own database adapter, see the NewREDBAdapter? recipe.
6 What changes will be done to the PropertyManager?
The concept of the PropertyManager? is replaced by Annotations. If an object is annotatable, then one can add any sort of data to the object and the AnnotationAdapter? knows how to store it.
I could imagine that someone will implement something similar to the PropertyManager?'s functionality on top of the basic Annotation support.
7 Will the class 'Folder' store the content in BTrees?
Yes, Folders already use BTrees? to store their subobjects.
8 Which changes will be done to ZCatalog?
There will be a new and shiny version of the catalog. But it makes use of a new utility called Integer Id, which can assign an integer to any object. Some interesting Indices have been implemented as well.
9 Will the UserManagement be changed so that a role can include another role?
Zope 3 has a much more flexible security model. Zope 3's security model knows only about Principals and does not care whether these principles are users, groups or even security certificates.
10 Will the request and response be written with capital letters?
No, in Zope 3 'request' and 'response' will be all lower case. There are now a couple of other interesting objects around, such as view and locale.
11 What about ZSQL Methods? Can't it support standard SQL like other scripting languages?
ZSQL methods have almost been ported one to one from Zope 2.
ZSQL Methods are not responsible for the SQL they contain, they merely forward the rendered SQL to the server. BTW, SQL Methods still support DTML for dynamic content.
12 Will Zope 3 support DTML?
Yes, there is a new version available in Zope 3. See DocumentTemplateMarkupLanguage2.
FIXME: what is the current status ? (October 16 2006)
13 Will Zope 3 support Python scripts?
Probably, although as of 2006-02-15 it hasn't been implemented yet. According to Jim:
They may be a little different than Zope 2 Python scripts...(they will be) used like Python functions, as you will generally want them to return things. The thinking is that Python scripts will be used for creating simple dynamic content. In addition ... there will *also* be (persistent TTW) Python modules used for creating software components. The details still need to be fleshed out and are open for debate.
14 Will Zope 3 be compatible with CMF?
No, but there will be many conversion scripts available to ensure a smooth transition. Also a lot of the CMF ideas will be folded directly into Zope 3.
dgeorgieff points out: You'll not need CMF in Z3 because all the core CMF features will be part of Z3.
15 Is my good friend Acquisition going away?
I expect implicit acquisition to fade from usage. Acquisition will still be important, but will be more explicit, more predictable, and ultimately, more useful.
16 Can I still whip up a presentation template TTW and view my content object with it?
Yes, the preferred model will be very similar to that used for CMF skins today. You'll be able to create presentation components TTW and register them for object interface (kinds of object) and associate them with skins.
You will also have the option of creating templates in the content space if you want, although, if the content you use doesn't do implicit acquisition, then the templates will only be usable in the folders that contain them.
17 Can I allow for the possibility of somebody overriding my filesystem based product's presentation templates TTW?
Absolutely, there will be TTW presentation services and you'll be able to override file-system-based view components with TTW components. There will also be services for managing components through the web. When you lookup a component, the lookup will be done in a "place-full" way, where place is expressed via an access context that is effectively the same as an acquisition context.
18 Can I change the default lookup order for methods/attributes/whatever?
Yes, there are components that are responsible for URL traversal. Simply find or write a component that implements the policy you want and register it in the configuration file or TTW. You can also use the z3c.traverser package to customize your traversal.
19 Do I still define a method as public using doc string? (I find this cumbersome.)
No, the presence or length of doc strings won't be meaningful either, unless someone writes a component that makes them meaningful for an application.
20 Will methods and attributes with underscores be reachable TTW in Zope 3?
In Zope 3, the standard Zope security policy probably won't look at names. So, for example, names with underscores aren't treated any differently than names without. In contrast to Zope 2, where names with leading underscores have security restrictions (they can't be called through the web, and they can't be called in Python Scripts).
