[Zope] Re: [Zope-dev] help me convert from j2ee to zope

Ryan Boder icanoop at bitwiser.org
Thu Jan 22 16:06:43 EST 2004


On Thu, Jan 22, 2004 at 10:22:59AM +0000, Chris Withers wrote:
> The zope-dev list for the development OF zope, not WITH it, so I'm replying 
> to the more appropriate zope at zope.org list...

Oops. Sorry. I was thinking that products were considered zope-dev. I
switched my subscription to zope.


> >the equivalent of a local interface in J2EE. In JBoss I would use a session
> >bean as the remote user interface and it would manage entity beans. So in
> >Zope if I have a non-persistent object as the XML-RPC published user
> >interface, how can I have it access persistent objects within Zope?
> 
> This made no sense to me as a Zope developer, and it's YEARS since I did 
> anything EJB'ish. I suggest you try and present the problem you're trying 
> to solve, rather than trying to bash square JBoss concepts into a round 
> Zope hole...

Ok. An example problem I have is that my zope addon will manage tasks in a
schedule. There would be a Task object and each time the user wants to add a
new task, a new Task object needs to be created in the ZODB.

I like to have a seperate object that is not persistent that acts as a
client interface (client programs can make XML-RPC calls to it). So the
client program would make an RPC call such as createTask() and the client
interface object would then do the work of creating a new persistent Task
object in the ZODB. The client interface object is published via XML-RPC,
but the Task objects are not (they are implementation, not interface).

So I guess the following code would do that in the createTask() method...

afolder = myobject.restrictedTraverse('/path/to/folder/that/contains/Task/objects')
manage_addMyThing(afolder,'new_id',...any other needed parameters...)

Is this a sane design in Zope or am I thinking in J2EE?


> >I've read all the documentation I can find on the web site,
> 
> I doubt that ;-)
> 
> Zope Book?
> Zope Developers Guide?
> ALL the How-To's and examples?
> 
> The website is difficult to navigate, and I apologise for that, but the 
> stuff is on there...

Yes, yes, and quite a few.


-- 
Ryan Boder
http://www.bitwiser.org/icanoop



More information about the Zope mailing list