[Zope3-dev] Re: RFC: The browser:page compromise

dev at projekt01.ch dev at projekt01.ch
Thu Apr 20 21:01:31 EDT 2006


Hi Tonico 

> -----Original Message-----
> From: zope3-dev-bounces+dev=projekt01.ch at zope.org 
> [mailto:zope3-dev-bounces+dev=projekt01.ch at zope.org] On 
> Behalf Of Tonico Strasser
> Sent: Friday, April 21, 2006 2:10 AM
> To: zope3-dev at zope.org
> Subject: [Zope3-dev] Re: RFC: The browser:page compromise
> 
> Philipp von Weitershausen schrieb:
> > I also think it makes it hard to understand. In response to this 
> > proposal, several people have asked me "By the way, what's the 
> > difference between <browser:page /> and <browser:view /> 
> anyhoo?" That 
> > alone has proven my point that the current system makes it 
> absolutely 
> > incomprehensible of what's going on behind the scenes.
> 
> The name "browser" for a namespace sux IMHO ;)

The idea of a namspace called browser is the following:

We use the namespace browser for *presentations* (the earlier 
name for pages) which depends on the IBrowserRequest.
This is also reflected in the package structure like:

package
  browser

For other request types like FTPRequest, XMLRPC or JSON 
etc we use:

package
  ftp
  xmlrpc
  json

Perhaps this is to technical and will confuse people which don't
know the base concepts of request type interfaces. But since no
tehchnical peple have no chance to develope with z3 I think
this naming is OK.

> How is a browser defined in Zope 3 and how are these names 
> related to it?
> 
> addMenuItem
> addform
> containerViews
> defaultSkin
> defaultView
> editform
> form
> i18n-resource
> icon
> layer
> menu
> menuItem
> menuItems
> page
> pages
> resource
> resourceDirectory
> schemadisplay
> skin
> subMenuItem
> subeditform
> tool
> view
> viewlet
> viewletManager

All of this directive are based on the IBrowserRequest.
Other requests like FTPRequest don't have a menu layer etc.

The exception zope:view doesn't use a implicit request this
is the reason why the zope:view is also existent next to 
the browser:view. This means the zope:view directive can be 
used together with a different request then IBrowserRequest.

> What is a page? Is a dynamic stylesheet or a dynamic 
> javascript or an Atom feed a page? Does a page provide a 
> mime_type? Should a page do content negotiation?

More or less all of this is a adapter called on a 
context and request providing a interface and a optional 
name producing a response ;-) Remember page is a replacement
for the earlier name *presentation" which was a little bit 
a to long naming.

> Create a new clean namespace and call it user_interface (or ui)! :)

I think a name like ui doesn't reflect the request type and will
be a bad idea for register *presentations* for json which are registred
like <jsonrpc:view ... /> right now. 

But if you like to use <ui:page /> etc, you can do this by simply 
setting the namspace to:

xmlns:ui="http://namespaces.zope.org/browser"

And then use <ui:page .... />

btw, I whould like to use only one directive called 
*zope* for all directives. The directive *browser*
is not really needed except for let us use 
zope:view and browser:view ;-)

Regards
Roger Ineichen

> Tonico
> 
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub: 
> http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch
> 
> 



More information about the Zope3-dev mailing list