views:

273

answers:

2

Possible Duplicate:
Choosing Java vs Python on Google App Engine

We are going to use Google Appengine platform for our next big web project.But we are not sure which flavour to use: Java or Python.

Could you please, advise on cons and pros of each approach? Which is the best way in order to build more scalable and efficient solution quicker.

Thanks in advance

+4  A: 

It would be helpful to know what type of things this project needs to do, do you need to integrate with lots of other libraries, applications, etc?

This is just one anecdote, but I've recently tried out GAE on both platforms, and found the Python option way easier to get working than using Java with JDO. A part of this had to do with also tackling JDO at the same time, but I found I was able to implement the same exact functionality in Python in just a few days as I was in weeks on the Java side.

As someone relatively new to Python still, there are a lot of things I still need to tackle to feel more comfortable in it, such as:

  • the best way to unit test my controllers and model classes
  • best way to structure my controllers
  • determine if Django templates are satisfactory or if I should attempt to use a different template system

When I attempted the best way to write Java unit tests for my GAE classes I bounced between a half-dozen different blog articles and suggestions on how to best mock out the App Engine services. Some seemed to work, some seemed like hacks, but the lack of a good and supported solution left me feeling uncomfortable.

All things being equal, I would recommend the Python flavor for a greenfield project. Easier to get started, less moving pieces, no nasty JVM startup times in the production environment, no post-compile bytecode enhancement necessary, etc.

matt b
Thanks matt. Have you used and MVC frameworks for python gae. I had a look at django-gae integration, but that is still not complete.
husayt
Not yet, no. The build-in *webapp* framework seems suitable for most simple tasks, at least so far.
matt b
+8  A: 

I gave the accepted answer to the question a comment claims is "very similar" -- but that was nearly a year ago. I'm still biased the same way (still expert on Python, rusty in Java), but in the intervening year I would say the Java runtime has just about caught up to the Python one -- or, if not quite that yet, it has made serious strides (as have both runtimes "in parallel", of course;-). Most of my general considerations in that answer remain roughly valid.

So the main consideration today is, I think, how familiar is the team with Python, and how familiar with Java -- if very familiar with one and not at all with the other, go with what you already know, as the time needed to "catch up" on the other is a cost that's probably larger than the advantages you could get one way or another (to a hobbyist wanting a "mind expanding" experience I'd recommend the reverse: take the opportunity to learn what you don't yet know -- but in terms of immediate productivity, staying with what you know increases it;-).

If there's some "killer library" that you've ascertained runs well with one of the runtimes and that you're really keen to use in your apps, that could be the decisive factor, if differences of familiarity with the two languages are not decisive in your case.

Alex Martelli
+1 I would echo this, but contribute that, if you decide to go with Java, the Objectify framework seems _much_ nicer to work with than the out-of-the-box JDO framework (which isn't designed to be used with the App Engine datastore, like Objectify is) http://code.google.com/p/objectify-appengine/
Jason Hall