views:

543

answers:

6

I heard lots of good opinions about Python language. They say it's mature, expressive etc... I'm looking for production-ready enterprise application frameworks in Python. By "production ready" I mean :

  • supports objective-relational mapping with caching and declarative desciption (like JPA, Hibernate etc..)
  • controls oriented user interface support - no HTML templates but something like JSF (RichFaces, Icefaces) or GWT, Vaadin, ZK
  • component decomposition and dependency injection (like EJB or Spring)
  • unit and integration testing
  • good IDE support
  • clustering, modularity etc (like Terracota, OSGi etc..)
  • there are successful applications written in it by companies like IBM, Oracle etc (I mean real business applications not Twitter)
  • could have commercial support

Is it possible at all in Python world ? Or only choices are :

  • use Python and write everything from the bottom (too expensice)
  • stick to JEE
  • buy .NET stack
+25  A: 

Django seems like the obvious choice. It is by far the most stable and developed framework, used by several large corporations.

Because it is a Python framework, it can generally use any Python module, as well as the many modules that have been made for Django.

It should fulfill all of your needs, and is not terribly difficult to learn/deploy.

mvid
yay for Django! (if only there were more django jobs out there)
T. Stone
Django +1, and by the way, I hate web2py and those who force his subordinate to use web2py...
Satoru.Logic
Django looks poor for me. Models looks fine,there is a simple annotation-based transaction support.View layer and templating system is extremely poor and unacceptable. I dont want to think abou request, GET, POST but about methods and events. View layer must be reaplced (Flex maybe)I couldn't find any stateful components.Django is a tool for creating websites and e-shops but not for enterprise applications.
peperg
django is the obvious choice if all you know is django and don't understand all the java acronyms the OP mentions and what their value proposition is.
Tom Willis
@Satoru. Sometimes there are reasons why one person is the boss and one is the subordinate. If it is not for the ability to choose the proper tools and people, it is because of the ability to communicate and justify one's ideas in a professional manner.
mdipierro
@mdipierror. And yes, I have been trying to convince my supervisor that there must be a reason why Django is much more popular than web2py and popularity matters.
Satoru.Logic
Django is great for server side scripts, db managements and business logic. But for the client side you also need something strong and maintanable. For this purpose there is ExtJs a master choice for real web *applications* that an entreprise need.
jujule
+11  A: 

For the context, I work at a large private bank in Switzerland, writing Enterprise applications on the J2EE stack.

There are plenty of "Production Ready" web frameworks in Python. And there are plenty of large Python based websites out there.

That said, I think Python is a poor choice for an Enterprisy application. It can be used as a glue language, or a scripting language (our deployement scripts are Python). The showstopper for me is backward compatibility (Python 3.x isnt backward compatible with Python 2.x). The Python philosopy seems to be more to inovate and make the language better, smoother, and not necessaraly to support programs written 10 years ago.

On the Web framework side, I love Django, but it is definitly much too young and evolving too rapidly to be used in the enterprise. I have not much experience with other Python based frameworks.

If you want an enterprise oriented framework, you'll have to stay with enterprise stacks (Java / .Net).

On the other hand, even in the Java world, there is a tendency to use frameworks that are less enterprisy. Think Spring vs EJB2 or EJB3 being much lighter weight than EJB2. Or think Flex (which is far from an enterprise framework in my view) being used more and more in the enterprise. So if your enterprise is openminded enough, ready to jump into the future, using Django, RoR or other modern Web 2.0, community driven, Open Source, next generation, active record based frameworks ... might not be that much of a stretch ...

And finally, to answer a few of your points directly :

  • support of ORM / caching / ... : yes, but most solutions are based on active record, which is fine for 90% of what youmight want to do, but is definitly not as complete / complex as JPA / Hibernate
  • control oriented UI : no, and you wont find a standard, so you wont find 3rd party components. The closest you might get is integration with jQuery or other JS UI frameworks
  • dependency injection : There is a port of Spring to Python, maintained by SpringSource. But DI is not in the Python philosophy. The same problem will be resolved wit functions, default arguments and closures. And we might argue that the Pythonic solution is cleaner than the Java way ...
  • unit / integration tests : very good support, multiple test frameworks. Still, support is not as good as Java where we have tons of tools around testing.
  • good IDE support : there are technical limitations to the ammount of support you can provide to a dynamic language, but at least both Eclipse and Netbeans have great support for Python.
  • clustering / modularity : clustering will be resovled with a "share nothing infrastructure" and/or distributed caching. There are no solutions for modularity (in the OSGI sense) as far as I know. But I would challenge that very often OSGI is a solution for a problem we dont have in the enterprise ...
Guillaume
Great comparison!
peperg
I think the backwards compatibility one is irrelevant, since Python 2 is still supported. It's not like Java where it's assumed you should always upgrade to the highest version - the two strands are growing in parallel for now.
Kylotan
Python is quite a lot more backward compatible than the typical C++/Java implementation, with the *possible* exception of Python 3.x. I see quite a lot more breakages from JVM/C++ compiler changes, not to mention library changes, than I do from Python upgrades. Even the changes required to go from 2.x to 3.x are mild in comparison to some of the changes in C++ and Java in recent years. There seems little other reason not to call Python 'enterprisy', considering how well it integrates and abstracts.
Thomas Wouters
+4  A: 

As mentioned, django is perhaps the most stable python web application framework. To answer your points in turn:

  • supports objective-relational mapping with caching and declarative desciption (like JPA, Hibernate etc..). Yes, see django models
  • controls oriented user interface support - no HTML templates but something like JSF (RichFaces, Icefaces) or GWT, Vaadin, ZK. No. django templates are there but you could add some other view layer quite easily.
  • component decomposition and dependency injection (like EJB or Spring). Not sure as I haven't used EJB.
  • unit and integration testing. Yes, see django testing.
  • good IDE support. Pretty good. See eclipse + pydev
  • clustering, modularity etc (like Terracota, OSGi etc..). Don't know.
  • there are successful applications written in it by companies like IBM, Oracle etc (I mean real business applications not Twitter). Mostly news organisations like LA Times and Washington Post.
  • could have commercial support. There are a few like this.
blokeley
+1  A: 

Have you had a look at Jython? Jython is an implementation of Python for the Java Virtual Machine. It is possible to run Django on Jython: Django on Jython and to use Jython and Django with a JEE application server: Django on Glassfish.

If you haven't definitely selected Python yet, you might take a look at Groovy with either Wicket or Grails as the web application framework.

richj
+4  A: 

Check out Zope ...

dugres
+1: Everything required, plus the option of Commercial Support.
S.Lott
Zope 2 is an application server and Zope 3 is an component architecture? I need both Zope 2 and 3 or 3 only makes the trick?Zope looks promissing.
peperg
A: 

What about Plone? visit http://www.plone.org for more information. Used in many enterprise level applications.

Some organizations using Plone:

CIA, FBI, NASA, Oxfam, Brazilian Federal Government, Novell, the list goes on.

For information about deployed solutions and case studies visit www.plone.net

Torkel Lyng
Plone is build on Zope.
Unreason