Re: [Zope3-Users] Re: Zope 3 Developer's LiveBook

2006-02-17 Thread Chris Withers

Fred Drake wrote:

On 2/16/06, Chris Withers [EMAIL PROTECTED] wrote:

Indeed, but I'm guessing there's maybe a script that can be run to turn
OpenDocument into DocBook and vice versa?


The DocBook -- OpenDocument conversion is lossy, so there's no round trip.


:-(

Oh well, not too attached to DocBook then...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Squid/Apache Caching

2006-02-17 Thread Chris Withers

Andrew Sawyers wrote:

If you have needs for Apache, use Apache - but there is no need for it
just for rewriting urls.  


Agreed, Jens can fill you in on the rest of the details as to why we use 
 Apache ;-)


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: (distributed) Communication between components

2006-02-17 Thread Philipp von Weitershausen
Dear Reinhold,

zope3-dev is about the development *of* Zope 3 itself, not the
development *with* Zope 3. This is a question for zope3-users, I'm
therefore CCing zope3-users instead of zope3-dev.

 So, I would like to know the forms of communication between distributed
 components or distributed components and clients. As far as I know, Zope
 focusses on HTML communication, also allowing XML-RPC calls to
 components.

Zope 3 supports several network protocols, the most prominent being
HTTP. Out of the box it supports different flavours of HTTP, such as

* regular HTTP/WebDAV
* Browser pages (mostly HTML, but could be other stuff, too)
* XML-RPC
* SOAP

You can add support for other HTTP-based protocols easily these days
using the publisher / ZCML directive.

XML-RPC is covered in my book (http://worldcookery.com), including a
simple Python and Java demo client that accesses data and calls methods
in Zope remotely.

 But is this still the only possiblity? If yes, how could
 security be integrated in such communication?

That all depends on your requirements. One of Zope's strongholds is a
flexible and powerful security and authentication system.

 And if yes, I mean is that
 a disadvantage in comparision to J2EE where RMI enables communication to
 server still like local calls. If no, what other kinds of communication
 are possible?

I'm not sure what you mean by distributed components, but ZEO is
definitely a very transparent way of having distributed clients have
access to objects of a single remote source.

Philipp
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Zope 3 Developer's LiveBook

2006-02-17 Thread Fred Drake
On 2/17/06, Chris Withers [EMAIL PROTECTED] wrote:
 Oh well, not too attached to DocBook then...

Though I'm LaTeX-friendly, I'd certainly rather DocBook over
OpenDocument.  Not only are there better toold for working with it,
but the markup offered is more interesting for the subject domain.


  -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
There is no wealth but life. --John Ruskin
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] nextURL: add vs edit

2006-02-17 Thread Shaun Cutts








Is there a reason why zope.app.form.browser.add.AddView
defines:



 def nextURL(self):

 return self.context.nextURL()



but zope.app.form.browser.editview.EditView doesnt?



My redirection works for add but not edit, and this is the
reason. Is this a feature or a bug? If a bug, all that needs to happen is that nextURL get moved to EditView
from AddView, as EditView
is base for Add. 



But perhaps there is a reason for this I dont
understand?



- Shaun






___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


RE: [Zope3-Users] nextURL: add vs edit

2006-02-17 Thread Shaun Cutts
Ok,

In AddView.update,

self.request.response.redirect(self.nextURL())

is called, but this is not called in EditView... so change isn't as
simple as moving nextURL. However, if you put this line into
EditView.update as well as moving nextURL, then my redirect works fine.

But does this break anything else? Is there some reason why the editview
doesn't do redirect? 

I have gotten offlist feedback that I'm not the only one interested in
this

Thanks,
- Shaun

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Shaun Cutts
Sent: Friday, February 17, 2006 1:17 PM
To: Zope3-users@zope.org
Subject: [Zope3-Users] nextURL: add vs edit

Is there a reason why zope.app.form.browser.add.AddView defines:

def nextURL(self):
return self.context.nextURL()

but zope.app.form.browser.editview.EditView doesn't?

My redirection works for add but not edit, and this is the reason. Is
this a feature or a bug? If a bug, all that needs to happen is that
nextURL get moved to EditView from AddView, as EditView is base for Add.


But perhaps there is a reason for this I don't understand?

- Shaun


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] nextURL: add vs edit

2006-02-17 Thread Gary Poster


On Feb 17, 2006, at 1:42 PM, Shaun Cutts wrote:


Ok,

In AddView.update,

self.request.response.redirect(self.nextURL())

is called, but this is not called in EditView... so change isn't as
simple as moving nextURL. However, if you put this line into
EditView.update as well as moving nextURL, then my redirect works  
fine.


But does this break anything else? Is there some reason why the  
editview

doesn't do redirect?

I have gotten offlist feedback that I'm not the only one interested in
this

Thanks,
- Shaun


This behavior is by design.

add forms need the nextURL because it is advisory to the IAdding.

edit forms can just use the changed hook to call  
self.request.response.redirect('http://whereever.you.want/to/go')


Or use formlib, and be able to be fully in charge the way you'll  
eventually want to be.


Gary
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


RE: [Zope3-Users] nextURL: add vs edit

2006-02-17 Thread Garanin Michael
Difference beetween AddView and EndView
1) for AddView: 'self.context' is view (name '+')
2) for EditView : 'self.context' is content-object

I think this is 'standart' behavior. Use 'zope.formlib' for advanced
customization your forms. 

В Птн, 17/02/2006 в 13:42 -0500, Shaun Cutts пишет:
 Ok,
 
 In AddView.update,
 
 self.request.response.redirect(self.nextURL())
 
 is called, but this is not called in EditView... so change isn't as
 simple as moving nextURL. However, if you put this line into
 EditView.update as well as moving nextURL, then my redirect works fine.
 
 But does this break anything else? Is there some reason why the editview
 doesn't do redirect? 
 
 I have gotten offlist feedback that I'm not the only one interested in
 this
 
 Thanks,
 - Shaun
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Shaun Cutts
 Sent: Friday, February 17, 2006 1:17 PM
 To: Zope3-users@zope.org
 Subject: [Zope3-Users] nextURL: add vs edit
 
 Is there a reason why zope.app.form.browser.add.AddView defines:
 
 def nextURL(self):
 return self.context.nextURL()
 
 but zope.app.form.browser.editview.EditView doesn't?
 
 My redirection works for add but not edit, and this is the reason. Is
 this a feature or a bug? If a bug, all that needs to happen is that
 nextURL get moved to EditView from AddView, as EditView is base for Add.
 
 
 But perhaps there is a reason for this I don't understand?
 
 - Shaun
 
 
 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] (Beginner's) Questions concerning ZopeX3 Component Communication

2006-02-17 Thread Lennart Regebro
On 2/17/06, Reinhold Strobl [EMAIL PROTECTED] wrote:
 I am new to ZopeX3 and currently working with components. I would like to 
 build
 a client/server application. The client (no browser) should be able to invoke
 methods of the component in the ZopeX3 Server. I have seen examples based on
 XML-RPC, but are there no other possiblities, which enables remote calls in 
 an
 integrated way,
 I mean, is something like following is possible:

 Server (Zope):
 ===
 Interface IReceipeInfo
 Implementation of that interface:
 class ReceipeInfo(object):
 implements(IReceipeInfo)
 ...
 def getTimeToCook(self):
 return ...



 Client (Python)
 ==
 rec = ReceipeInfo()

 rec.getTimeToCook()


 
 I mean, is a remote call in that kind possible?

No. The client and server are two different computers. For that reason
you must use some kind of network protocol to communicate between
them.
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] (Beginner's) Questions concerning ZopeX3 Component Communication

2006-02-17 Thread Gary Poster


On Feb 17, 2006, at 4:24 PM, Lennart Regebro wrote:


On 2/17/06, Reinhold Strobl [EMAIL PROTECTED] wrote:


I mean, is a remote call in that kind possible?


No. The client and server are two different computers. For that reason
you must use some kind of network protocol to communicate between
them.


Well, some people are doing stuff a bit like that with direct ZEO  
connection (which has a protocol itself, yes), but there's no  
inherent security over the ZEO connection, so you have to be really  
careful (or excessively carefree), I'd think.


Gary
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


RE: [Zope3-Users] nextURL: add vs edit

2006-02-17 Thread Shaun Cutts
Ok -- 

Thanks Gary and Michael.

I've defined changed in my mixin, and it works:

def changed( self ):
self.request.response.redirect(self.nextURL())

And I can still use the same mixin to do redirect for both edit and add
forms, so I can't grumble about that.

I'm curious how this works, however, since EditView.changed() doesn't
call self.context.changed(). Who calls it?

Thanks again,
- Shaun

PS I will indeed use formlib eventually, but I want to get just the
workflow down for the prototype I'm writing at the moment.


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


RE: [Zope3-Users] nextURL: add vs edit

2006-02-17 Thread Shaun Cutts


 On Behalf Of Garanin Michael
 What is mixin? Is it content-object or view?

Well, I think in the wider python context mixin is something that you
can use as a base class to extend the functionality of your class,
assuming you provide some standard interface. (e.g. UserDict.DictMixin.)

I'm not sure whether zope uses mixin exactly like this, or whether it
extends mixin for something that you don't have to have in the class
hierarchy, but acts as if it were because of traversal (so perhaps: An
instance is give a special base class of its own that defines
__getattr__ and uses it to search for missing methods in the wider
context? I don't know but I'm a bit wary of the traversals without more
study. They seem to be playing with normal python resolution in a way
that isn't clear to me.)

In this case, I got the term from the ++apidoc++ for the zcml
editform.class attribute:

 A class to provide custom widget definitions or methods to be used by
a
 custom template.

 This class is used as a mix-in class. As a result, it needn't subclass
any
 special classes, such as BrowserView.

And so, my mixin is indeed a view... or at least, it acts like a view.
But I'm a bit hazy on how it is actually constructed and where it is
wrt the EditView object. Is the factory (the class I pass in
editform.class) passed in bases to SimpleViewClass(... ) in
zope.app.forms.browser.editview.EditViewFactory? Then the EditView and
my mixin are both bases of a specially constructed BrowserView
derivative?

That's my best guess without more study of the code.

- Shaun


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users