Background : I'm a professional Java developer that does Django on the side.
Java
Java is used mainly in the enterprise, and there are very good reasons for it. Java is a good solution if you need a language that is mature, has good support for concurrency, transactions, access to multiple databases ... Java is also a very stable platform. And by stable, I dont mean that it has fewer bugs than Python or Ruby, I mean that it doesnt change as much.
There is wonderful tool support for Java. Great IDE, great refactoring tools, great static analysis tools ... You probably wont find as many tools of that quality for any other language.
There are a lot of slow Java applications, but in my opinion it comes more from developers using an architecture that they dont understand, trying to do things more complicated than they need to. You can develop high performance, very fast websites with Java.
Django
Django is more light weight, more fun to work with. You can have an application running in a very short time. The admin interface is magical for simple CRUD operation and can be used for even pretty complex logic. You can find a lot of "reuseable apps" that will implements some of the functionalities that you need.
Even if Django is now in version 1.0, it is far from stable. If you need to be still developing your project in 1-2 years, you can expect a lot of changes just to follow the state of Django.
Conclusion
Use Java if you already know it and if you have needs for complex architecture and long term support.
Use Django (or RoR) if you want rapid development and dont care if you need to rewrite a lot of the app in 1-2 years.
Answer from Guillaume on Stack OverflowJava or Python or Ruby for Web Application? - Stack Overflow
Elixir vs Ruby vs Python vs Javascript | Which path to choose?
Python, Ruby, PHP or Java? How to pick a programming language to learn
Ruby vs. Python comes down to the for loop
Your python example is unnecessarily complicated. You can achieve the exact same thing just as simple as you would in your Ruby example. Perhaps you are not aware of the existence of "yield" in python?
class Stuff:
def __init__(self):
self.a_list = [1, 2, 3, 4]
def __iter__(self):
for val in self.a_list:
yield val More on reddit.com Is Ruby better than Python?
Which is more popular, Ruby or Python?
Which is easier, Ruby or Python?
Videos
Background : I'm a professional Java developer that does Django on the side.
Java
Java is used mainly in the enterprise, and there are very good reasons for it. Java is a good solution if you need a language that is mature, has good support for concurrency, transactions, access to multiple databases ... Java is also a very stable platform. And by stable, I dont mean that it has fewer bugs than Python or Ruby, I mean that it doesnt change as much.
There is wonderful tool support for Java. Great IDE, great refactoring tools, great static analysis tools ... You probably wont find as many tools of that quality for any other language.
There are a lot of slow Java applications, but in my opinion it comes more from developers using an architecture that they dont understand, trying to do things more complicated than they need to. You can develop high performance, very fast websites with Java.
Django
Django is more light weight, more fun to work with. You can have an application running in a very short time. The admin interface is magical for simple CRUD operation and can be used for even pretty complex logic. You can find a lot of "reuseable apps" that will implements some of the functionalities that you need.
Even if Django is now in version 1.0, it is far from stable. If you need to be still developing your project in 1-2 years, you can expect a lot of changes just to follow the state of Django.
Conclusion
Use Java if you already know it and if you have needs for complex architecture and long term support.
Use Django (or RoR) if you want rapid development and dont care if you need to rewrite a lot of the app in 1-2 years.
Pick which is familiar to you and run with it.
Or you can pick Django on Jython to get best of Java libraries and Python's speed-coding.
Or pick Java if you need to convince somebody that it is enterprise-y.
I would say if you're working alone / in a small team, then just pick the one that requires least resources (hint: Python).
I am completely sure I want to dive into the world of Programming (web dev) and ultimately get a job(in programming) to continue learning to program.
I have to choose a path: to get a Programming job and ultimately support myself.
Why should and shouldn't I choose the Elixir programming path to reach my goal?
I have dabbled into Elixir Programming a bit and I have already started to like it.
I have to choose a language and it's confusing. I like Elixir but I don't know where it will lead me, the other is JS, and Python which seem to have a lot of opportunities but I never got along well with both.
And then there is Ruby, which in terms of Job Opportunities seems similar to Elixir.
My Background: I am from a Commerce Background. Know basic Python, MYSQL, and created a few blog sites using WordPress and managed their backend by myself (cloud hosting), which gave me an understanding of configuring the NGINX webserve.
I have noticed a lot of folks asking what language to use to learn programming. Javascript seems to have become popular for the backend. Some coding bootcamps seem to use that as well.
By choosing javascript though, you will miss out on learning some deeper software design principles that will be important for your career in the long term. These tend to be better learnt through a more full-fledged backend language such as Ruby, Python, Java.
Here's a post that explores this:
Python, Ruby, PHP or Java? How to pick a programming language to learn