On Sat, Jan 24, 2004 at 09:11:29PM -0500, Ryan Boder wrote:
On Sat, Jan 24, 2004 at 04:28:24PM +0100, Clemens Robbenhaar wrote:
Usually You should have some persistent object around by the Zope framework when handling request. If doing an XML-RPC call You are already talking to some persistent object given to You by the ZPublisher. I am not sure what is the appropriate equivalent of a session bean in J2EE if looking at Zope.
Not knowing much about Zope, I would assume that a session bean is similar to a non-persistent Zope product, while an entity bean is similar to a persistent Zope product.
I don't know beans about beans, but from the reading I have done, that sounds reasonable.
From what I have read about Zope, J2EE and Zope offer very similar services to developers. Straight from the Oreilly EJB book, EJB offers: concurrency, transactions, persistence,
yes, yes, and yes
distributed objects (RPC),
yes, in a couple of ways. ZEO allows the same zope app to run on multiple servers from a single persistence storage. Zope also supports XML-RPC.
naming,
i don't know what that means.
and role based security.
yes
From what I have read Zope offers these same services to products.
At first glance it seems like I should be able to just re-implement my EJBs as Zope products and it would work out quite well. Although the Zope developers have said otherwise so I'm not sure.
What did they say? So far you haven't said anything that makes me think Zope is not a good fit. But a quick translation from EJB to Zope may get you something that *works*, but it is likely to be poorly designed from a Zope point of view. Before I got my current job, the team "translated" a bunch of dynamic content and presentation from Weblogic to Zope. It is rather ugly and after 2 years we are still stuck with it due to time constraints. By comparison, another site which they built from scratch in Zope before I was hired, is much nicer to work with. So, you may want to learn a bit about zope and re-think your architecture before you come up with something maintainable.
Also I have noticed other similarities (keep in mind I am a Zope novice, so don't take this as fact): JSP == ZPT
aside from a totally different language design, yes, they serve more or less the same purposes.
Servlets == script (python) objects
hmm, I don't know enough about servlets to judge. Script (python) is poorly named. They're callable objects, kind of like functions, whose code is stored in the zodb and is editable through the web. There are many security restrictions on what Scripts can and cannot do: many modules cannot be imported, you cannot define a persistent class in a Script, etc. Treat them as context-sensitive functions, good for quickly implementing small bits of logic.
I can only see 2 BIG differences in Zope and J2EE...
1. Java vs Python (I like Python better)
yes, you are one of us :-)
My only real reservation is that Zope seems very stuck on making everything a web interface. Personally I don't like web interfaces for most things. I would like to write my programs so that they use the XML-RPC publishing and integrate my client programs with user programs such as eclipse and openoffice.org. For example, one thing I am working on is a requirements management system that stores the data in an application server (hopefully Zope) but the users write their requirements documents in openoffice and openoffice interacts with the app server to store the requirements. I want the main user interface to be openoffice for that, not the web.
You certainly *can* do that, either using XML-RPC or a "REST" style: http://webservices.xml.com/pub/a/ws/2002/02/06/rest.html -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's FLYING COMPLETELY UN-GAY GANGSTER! (random hero from isometric.spaceninja.com)