[Calendula-devel] Architecture Thoughts: J2EE vs Python
Matthew Patton
pattonm@dm.org
Fri, 2 Apr 2004 16:05:44 -0500 (EST)
Thank you for your excellent insights, Tom. It is good to hear from
someone who has real experience with J2EE. Your pointers and
clarifications were a big help.
I think one of the things that was most helpful was your
clarification about the debate itself: we are not debating whether Java is
better than Python, but rather we are trying to figure out which tool
would be best for the job at hand.
Bill has stated his preference:
> To me this debate is partly about whether we should use a woolly mammoth
> to crack a walnut. It seems to me that there are numerous issues to
> explore, and that we should do that work in the simplest possible
> setting.
>
> Which is probably neither Zope nor J2EE.
And yet, I think that I agree more with what you were saying, Tom:
> The point of frameworks is to keep code maintainable and simple.
> Whether you subscribe to an exsiting framework or build your own, once
> the project is large enough, ultimately you are going to use one...The
> same applies in Java: Struts takes the Servlet/JSP framework to another
> level of simplicity and managability, RMI makes it easy to invoke
> methods on remote objects, other J2EE based frameworks do the same thing
> for other facets of distributing computing.
I have experience writing small-medium sized applications without
frameworks or with very simple frameworks, and there are several
problems that develop as the project grows:
1. It eventually becomes a maintenance nightmare because so many low-level
tasks are being done explicitly every time (SQL calls, passing data from
page to page, data conversions, transactions, etc.)
2. Because every chunk of code has its own arcane nuances, it is a ton of
work to extend the program to do new things, and it would be a huge
task to write a module for it.
My point is that if Calendula is going to escape getting bloated when it
reaches a certain size, you will need good tools. Furthermore, it
seems that J2EE, although it has a certain amount of work tied to it up
front in order to learn it, nevertheless it promises to keep things much
simpler and more maintainable because the code that we write lacks all of
the low-level baggage it would carry if it was written without the tools.
Thus I do not think J2EE is like using a Woolly Mammoth to crack a
walnut (that is, unless you do not plan to have Calendula grow very big).
Rather, it is a tool to help us write clean, well-organized, long-lasting
code that we can really build on instead of nasty spaghetti code
that we're constantly fighting against and re-writing.
And yet, what you say below intrigues me, Tom:
> Very smart man. I vote Python!
>
> ...If I were the architect, I'd choose J2EE, but I'm not.
> At the same time I do think that a Python system can be architected to
> scale and work too. Let's do it.
>
Although you personally would prefer J2EE, you seem to see Python as an
option. Why is that? What architecture design patterns are you thinking
of? What tools are you thinking of that are already in existence for
Python that will enable us to leap right into writing Calendula?
From the research I've done of the tools available for Python, I
don't see how we can expect to write a distributed, extensible,
multi-layered multi-user application in Python. Unless you intend to make
Calendula a simple, lightweight application for a specific limited purpose
(fundraising), then I think we're going to need something like J2EE. But
I'd be glad to be proved wrong. Thanks very much for your thoughts!
Matt