On Sat, 20 Oct 2007 00:53:45 -0000
Francis <[EMAIL PROTECTED]> wrote:

  Hi,

I'm quite new to django but have a little insight into java.

> On the other hand, java web framework look quite complicated with lot
> of xml and manual configuration with no real advantage. Java verbosity

Well, it depends. There are tons of java frameworks. Some of them need
XML configuration some of them don't but most of them will allow you to
use it. The modern ones will allow you to use annotations which is
quite terse way of expressing configuration. The main difference here is
that django uses 'convention over configuration' while the java
most frameworks don't. Then when you talk about java web frameworks it's
usually really just the web framework without persistence or
authentication, etc. So it's not a full stack. In that world you combine
the components you like into your application while django, as far as I
can see, gives you one option for all of these.

You'll need some XML for the servlet container (web application server)
which you don't really use with django. In the java world you have a
separate server that hosts all of the web applications for a given
machine. Some of them may use one framework some of them may be just
plain servlets. You can deploy them on the same server without any
problem. You can even apply independent pre/post processors (so
called servlet filters). They are like django middlewares (if I got that
right) but they're standard components and can be plugged in
without touching the application. This all needs to be wired together
somehow.

You can host multiple applications in django but as far as I could see
from the mailing list you'll have some problem if you want to have two
different django instances running under mod_python.

So the java solutions need more configuration work but they might be more
flexible in some cases. And don't forget that you're comparing a set of
components (java) against a full stack (django). The configuration work
can be alleviated by pre-assembling a full stack from java components.
There are projects that do just that (e.g. appfuse).

> and static checking may help to find bug earlier than with python.
> Python doesn't force you to include exception, assertion etc.. which
> may lead to spent more time debuging or delevering application that
> broke more often.

It's a matter of taste. I kind of like static type checking some people
don't. I also like having to declare exceptions. There is a more-or-less
valid argument that you have to write unit tests anyway, no matter if
you use a statically or dynamically typed language, and those tests are
supposed to catch (most of the) type errors.

> My question is to someone who actually try both, are they similar in
> productivity and enterprise quality?

For quality you'll need the unit tests. I'm not sure if you need to write
more tests for python to make up for the lack of static type checking or
not. I would think that you should, but I don't have enough experience
yet. But the quality can be assured by good tests and they are needed in
both cases.

I can't really tell anything about the productivity as I'm really slow in
django :) bacause I know very little yet. In java you have to use the
right tools and components to be productive and that's not an easy task.
On the other hand my feeling is that if you know your environment then
there isn't such a big difference between the two. (I know it's quite a
rebell view here :) and I'm actually using django to test this claim.)
Java frameworks have a lot to learn/steal from django to become more
productive. E.g. I don't think that there is any framework out there that
support the generic view concept of django.

If you don't have any background then you'll probably better off starting
with django because it has everything put together.

  atleta

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to