Web Application Architecture
AMK writes: "I've written an article
about Web application architecture, describing the design we use
at my workplace which relies on an object-oriented database, a Web app server we wrote, some parts of extreme programming, and lots of Python code. It shows a straightforward way of building a system that can cope with a complex Web-based application."
Can't connect.
As the article points out, the site already runs more than fast enough for our needs. Why make development slower to gain extra speed that isn't needed?
Three of their developers are Python contributors. They also developed two previous versions in Java. It's unsurprising that they found success in Python on their third attempt.
Development slower? By using Java, you are forced to use OOD/P and properly design every aspect of the project. This may increase your development cycle, but decrease your maintainance cycle (which clients *thoroughly* enjoy).
Maintenance and development of a Python web site are both likely to be significantly faster than for the equivalent site written in Java if for no other reason than that the Python code is going to be substantially shorter; less lines to both write and maintain, and they're clear, readable lines (unlike say an awk or poorly-written Perl program).
Also, Java is more of a class oriented language than a truly object-oriented language; Python closer to being a fully object-oriented language (like Smalltalk but unlike, say, C++). Read e.g. the comp.object FAQ and pay attention to things like dynamic inheritance, meta-class programming (which Java supports only in a very limited way; e.g, you can't get the meta-class of a meta-class), and multiple polymorphism.
Heck, functions aren't even objects in Java; you can't keep a vector (or other container) full of functions (or methods). The type-class dichotomy in Python is a bit of a wort (though it's even worse in Java), but there's a unification coming in Python 2.2.
Java is primarily statically typed while Python is primarily dynamically typed; that's the major difference between the two from a programming languages standpoint, and Java vs. Python boils down essentially to the same old Pascal vs. Lisp or Ada vs. Smalltalk debate on that level. Python certainly isn't untyped (unlike, say, tcl or in some ways perl).
Also, the speed argument is pretty bogus in this arena; Python is slower than Java for heavy computation, but it's substantially faster for file and network I/O (areas which are quite important in web site development).
Which is not to say that Java isn't the right tool for some web sites, but Python is an extremely good tool even for large multi-developer web sites where maintenance is an important issue.
Sumner
rage, rage against the dying of the light
Oh my God, you can make a vector full of functions/methods in Python!? That has to be the coolest thing I've ever heard!
-The art of programming is the pursuit of absolute simplicity.
You can do that in Perl, C (I think), LISP (for sure, and any other functional language), etc.