[Zope] RE: Java vs Zope

Sam Stainsby sam at stainsby.id.au
Tue Jan 3 23:49:12 EST 2006


On Tue, 03 Jan 2006 21:12:06 -0600, David Johnson wrote:

> David - I am new to Zope, but I feel your assessment is correct.  We have
> developed and deployed very large applications using PHP/C++, and are now
> looking to Zope to take us into the next stage.  Python seems excellent at
> object orientation and neatness with minimal effort by the developer.   
> 
> Asab - Do you know any types of large applications that are in Java?  I have
> seen only a few, and they are particularly bad, such as the Oracle
> installer, Star Office, and Eclipse. All are excessively large, slow, and
> buggy.  We have one competitor using J2EE, and it requires them 10 times the
> resources (both financial and labor), as it does us using PHP, and their
> application is poor and difficult to modify for customer needs.  Only highly
> trained engineers can understand and use Java, making maintenance expensive
> and challenging.  Our initial efforts in Zope lead us to believe we can be
> even faster and better using Zope and Python than we were able with PHP (we
> use PHP with classes).  Have you not found this to be case?  I'm not trying
> to be difficult, but I have so much trouble understanding the appeal of
> Java.  Thank you.


I've worked with Java for 10+ years (yes, ever since you could first get
hold of it!) and the last couple of years with Zope/Plone/python. There is
no doubt that both are great environments to develop in! I agree that
python is great for putting an application together very simply and
rapidly. However, in general programming, there are some things I really
miss from the Java world, and I will run through below. I'm not saying one
is better than the other, but simply that you have to weight up the pros
and cons when deciding which to use ...

One thing is static type checking: developers detecting type errors at
compile time, rather than some hapless user running into it at run time
(i.e. after release to the public). I see many of those types of errors
in Zope and Plone products, particularly as the API of one product
changes and another product tries to use it. With Java, such
problems are likely to be detected at compile time. Runtime errors produce a negative public
perception of software products, as well as being dangerous in critical
systems. Pervasive use of unit testing will help avoid such problems, but
that level of discipline is hard to find in Zope/Plone projects (but well
done those who do it!). On the downside, static type checking makes Java
less flexible, and requires more programming effort, and of course there
is that tedious compilation step. 

Java also tends to lead to cleaner and more understandable software
architectures than python because of its fundamental and neat/easy use of
interfaces, classes, packages and even threads (not that concurrent
programming is ever that easy). Mainly good & easy abstract interfaces,
and their widespread use in APIs, is what I miss.

As to whether J2EE is better than Zope/Plone for web applications, I'm
undecided. Before I started with Plone, I would have used Java if I could
find a suitable FOSS platform that did all the things that Zope & Plone do
- but there were none available. It looks like that is changing now
though with all the FOSS J2EE environments, workflows, etc. coming
along, so I may sway back to Java sometime in the future.

I would generally say that, for the *same* amount of testing, Java is
much safer (in terms of less defects) than python. I'm not sure if it is
true that an equivalent python application using similar APIs is quicker
to write. 

I suspect it is also true that Java is available in more environments that
python, and perhaps is has more consistent feature sets (APIs)
on each platform, leading to greater portability of applications. For web
apps perhaps this is not such a problem.

I have also used PHP quite a bit, but I am disappointed by its abysmal
lack of decent OO, exception and name spaces. For those that don't care
about OO, probably this doesn't bother them. For me, I find it hard to go
back and use PHP after experiencing python.

Finally, while I don't think execution speed is much of a issue these
days, the horrendous use of memory resources by Java can be a
problem.



More information about the Zope mailing list