views:

258

answers:

5

Hi all,

This will not be a "programming" question but more technology / platform related question. I'm trying to figure out whether Python can be a suitable Java alternative for enterprise / web applications.

Which are the ideal cases where you would prefer to use Python instead of Java? How would a typical Python web application (databases/sessions/concurrency) perform as compared to a typical Java application? How do specific Python frameworks square up against Java based frameworks (Spring, SEAM, Grails etc.)?

For businesses, switching from the Java infrastructure to a Python infrastructure .. is it too hard/expensive/resource intensive/not viable? Also shed some light on the business case for providing a Python + Google AppEngine based solution to the end customer. Will it be cost effective in an typical scenario?

Sorry if I am asking too wide a question, I would have liked to keep it specific, but I need your help to evaluate Python as a whole from the perspectives of the programmers, service providing company and end business customer.

For an SME, a Python/GoogleAppEngine based technology stack is a clear scalable and affordable platform. But what about a large MNC that already has a lot invested in Java.

Thank you so much. I am researching this myself and will gladly share my conclusions here!

Thank you, Srirangan

+14  A: 

An enterprise that already has a terabucks of Java investments should add jython to their mix of technologies -- it can be adopted gradually and progressively, at first for ancillary functions such as testing, "one-off" data migrations &c, prototyping of new functionality, cases in which using some existing open source Python library is obviously very handy, and so on, and so forth -- then, as the many Java developers in the company learn to use Jython, some of the prototypes will just be put in production as Jython code because there would be no advantage recoding them, some old subsystem needing recoding will be recoded in Jython, and so forth.

It's never really a wise decision to throw away a huge existing and working codebase and the ginormous investment it represents -- Python's strengths include its wealth of strong, production-level implementations, how well they "play with others", and how well Python can gradually and incrementally infiltrate most any development shop.

Alex Martelli
Thanks for your answer.
Srirangan
@Srirangan, you're welcome!
Alex Martelli
Is "Terabucks" where you get your coffee? :)
Paul McGuire
thats sterabucks
Anurag
+4  A: 

The larger your investment in an existing technology is, the more expensive it is to move away from it. COBOL is perhaps the best example here.

That investment isn't just in porting existing solutions, but also in retraining or hiring new staff so that you have the skill sets to build and support the new technologies even while still maintaining your legacy solutions.

Add to that the fact that for most large Multinational Corporations, software isn't their core business. As long as it functions effectively and fulfills the business need, they don't tend to care so much about the 'details'.

You need to be able to offer some pretty compelling benefits to overcome this kind of inertia.

Sad but true.

Adam Luchjenbroers
Thanks for your answer
Srirangan
+1  A: 

If you need to do the sort of things you can do with Django, then Django and Python is totally what you want. Google App Engine runs Django as well. So, you can do a Django app and host it on Google App Engine, and later change your mind and switch to conventional server hosting, or self-hosting if you have your own server.

I haven't tried Google App Engine but my understanding is that the price is quite reasonable for what you get. Google's IT department does a great job of keeping their data centers going; if you outsource the hosting to Google App Engine you know your data is backed up, you know the servers won't go down, and even if a backhoe takes a whole Google data center off the Internet, some other Google data center will keep serving up your application to your customers. You also know that if your application suddenly becomes hugely popular, Google App Engine wil l scale up automatically to handle the load. (I think you set a cap for the maximum you are willing to pay, and it scales until it hits the cap. But as I said I haven't used it and I'm not certain.)

I haven't used Java yet, but from what I have seen of it, Python is a much more expressive language and skilled Python coders can get more work done in a day just because the language is that much better. However, if you already have invested in Java and have in-house expertise in Java, you would be crazy to walk away from that overnight. The correct thing is to pick one new project to just try out that crazy Python thing.

And I really do recommend Django. You can get the Django book and try out the tutorial. If your first pilot project in Python is a Django project, you should have an easy time of things.

steveha
Django is awesome. GAE + Django is less awesome, given that GAE doesn't really fully support many of the features that make Django really handy. The OP is asking about the kinds of problems at are solved with internal hardware in any case, making GAE not the answer.
Paul McMillan
Also, I love Python, but if you haven't used Java, don't parrot nonsense about it that you've heard elsewhere, it just makes you look bad.
Paul McMillan
*Rawk!* steveha wants a cracker! <-- That is parroting. Please specifically identify the part where I parroted something I had heard elsewhere. Note I said "from what I have seen of it"... I was arguing from my own experience. Python takes fewer lines of code compared to Java, and most people agree that this helps people be more productive. See also: http://pythonconquerstheuniverse.wordpress.com/category/java-and-python/
steveha
@Paul, if GAE doesn't really fully support many of the Django features, that is important information and worth noting. Is my idea still correct that it would be easy to take a GAE application and move it to conventional hosting on Django? If Django is a proper superset of GAE, that should work, but if GAE has additional features missing from Django, it won't work very well. Do I need to edit my answer to take out anything that is incorrect?
steveha
A: 

There is -- almost -- no usable "Business Case" for any technology choice.

"what about a large MNC that already has a lot invested in Java" Ask around. See if there's a business case for Java.

I doubt you'll find anything. Most companies drift into technology choices slowly.

There was no business case for COBOL -- it was the only game in town in the olden days.

There is rarely a business case for Java. What usually happens is that some visionary individual started building the first web site (probably in Perl). The "web thing" gained traction, and some vision individual started building web sites in Java. Eventually, the success of those small teams indicated to others that Java had advantages over COBOL.

Managers say the words "make a business case", but watch what they actually do. They listen to (1) their peers, (2) successful people.

To make the "business case" for Python, you have to be that visionary individual.

1) Use Python.

2) Be successful.

3) Share your successes.

4) Be prepared to explain that your success is due to your tools, not your personal level of genius and charisma.

S.Lott
There are most certainly business cases for a language. Do our developers have appropriate knowledge, are there (new) developers available for that language? Can we easily interoperate with this other software stack of ours (ldap integration for example) or do we need to reinvent that wheel ourselves? It's just nor really the technology which is interesting for the business case, but the usage and support of that technology.
extraneon
@extraneon: All interesting questions. But, none of those were actually used in a quantitative "business case" way to make any of the language use decisions. Instead, the language use decision is something that happens slowly based on previous success. Look at the adoption of Java in any organization. Find the "business case" documentation. It's very, very rare.
S.Lott
A: 

The answer to your question is yes. Python can be well suited for Enterprise because python is a language which has raw power, flexible and can be glued with other programming languages. What enterprise really requires is a language which does everything and i feel python is already enterprise ready. If you want examples then i believe there can be no bigger example than google. Google is running python internally and externally for its business critical applications. The only problem with python is that it is not very well recognized by top MNC company and we as a python programmer find hard time convincing the management team. I guess you will face the same issue. But i guarantee you once you get your feet wet in python, you will understand its true power