%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%deffont "standard" xfont "helvetica-medium-r"
%deffont "thick" xfont "helvetica-bold-r"
%deffont "typewriter" xfont "courier-medium-r"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Default settings per each line numbers.
%%
%default 1 area 90 90, leftfill, size 2, fore "gray20", back "white", font "standard", hgap 0
%default 2 size 7, vgap 10, prefix " ", ccolor "blue"
%default 3 size 2, bar "gray70", vgap 10
%default 4 size 5, fore "gray20", vgap 30, prefix " ", font "standard"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Default settings that are applied to TAB-indented lines.
%%
%tab 1 size 5, vgap 40, prefix "  ", icon box "red" 50
%tab 2 size 4, vgap 40, prefix "      ", icon arc "yellow" 50
%tab 3 size 3, vgap 40, prefix "            ", icon delta3 "white" 40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page

Five - Zope 3 in Zope 2




%center
Martijn Faassen, Infrae
faassen@infrae.com
Five developer

%page

Five Misc Topics


	A number of as-yet uncategorized Five-related topics

%page

Resources


	Various kinds of resources available

	File, image, page template resource

	Accessible through ++resource++ namespace

%page

Resources, example


%size 4, fore "blue"
<browser:resource
  image="z3base.png"
  name="z3base.png"
  permission="zope2.ViewManagementScreens"
  />

%page

Resources


	Any Five traversable object now has can be used to get to resource

	url: path/to/object/++resource++z3base.png

	Jim says this is not exactly Zope 3 as it ruins caching

%page

ZCML


	ZCML can optionally be put in etc/site.zcml

	If not, Five will automatically use included zcml

	This zcml is in skel

%page

ZCML continued


	ZCML loads any configure.zcml in all products

	This is driven by five:loadProducts in site.zcml

	Overrides are possible in override.zcml

	This is driven by five:loadProductsOverrides in site.zcml

%page

Bridging interfaces


	"Bride of Frankenzope"

	Utility functions in bridge.py

	Can convert Zope 2 interface to Zope 3 interface

%page

Events


	Can instruct Zope 2 object to send Zope 3 style events using five:sendEvents

	These events sent upon copy/move/rename in Zope 2

	IObjectMovedEvent, IObjectAddedEvent, IObjectCopiedEvent, IObjectRemovedEvent

	Can set up functions to subscribe to these events

%page

Content directive and permissions


	Use content directive to declare Zope 2 permissions Zope 3 style

	Declare permissions from ZCML, no more declareProtected()

	Your classes look cleaner as a result

%page

Macros


	Zope 3 way to aggregate macros into single object

