views:

3811

answers:

9

Now that Google allows Java on App Engine, I'm wondering what effect this has on a choice of web framework for App Engine.

  1. I realize Google provides the webapp framework which is pretty barebones.
  2. And the .96 version of django that's available for App Engine is restrictive.
  3. web2py burns up resources, from what I've heard.
  4. Rails (now available) can't use ActiveRecord, ActiveResource, restclient, rmagick.

Is there something I'm missing - do any frameworks work well on App Engine?

+1  A: 

Try Spring. It supports JPA and JDO.

There's even a Python version for Spring now.

duffymo
Never occurred to me to use a Java web framework. But that's an idea. Thanks. Was hoping for something more concise than Java - Python, Ruby.
karl
You probably should clarify and specify Spring MVC, Spring has a big portfolio of projects.
Jon
I plan to try Java and Spring there. It's early, but that's the best approach IMO.
duffymo
@Jon - Yes, I wasn't clear enough on that. Thanks, Jon.
duffymo
duffymo, could you clarify why you think it's the best approach? is that because you're a Java guy and you want a Java solution because that's what you know best? Or is it because you've considered all languages and frameworks? Not trying to put you on the spot. Just want to clarify where you are.
karl
I'm a Java guy, and when I read "Google allows Java on App Engine" I might have jumped to the conclusion that you were looking for a Java solution. I don't have an ax to grind. I can't speak with authority on Python because I'm just learning it now. I downloaded both Python and Java SDKs to try.
duffymo
duffmo, that's cool - just wasn't sure where you were coming from. i've worked with Java in the past too. but ever since getting exposed to python and ruby, I don't have much desire to use Java unless it provides obvious benefits over Python and Ruby. I'm going to check out Spring (not Struts)
karl
I'm going the other way. I love Java and Spring, but the more I read about Python the more I like it. You can choose object-oriented or functional programming; it's got closures and terrific library support. I hope I can master it.
duffymo
Check out http://diveintopython.org/toc/index.html
karl
Thanks, but I've got a dead tree copy of "Core Python". I think it's great.
duffymo
A: 

If you are looking for Python, then Django would be your best bet.

TheTXI
Django on GAE seems unwieldy. I like the Django framework a lot. But when I tried to integrate one of my Django apps into GAE I spent a few weeks on it and it got nowhere. Did you have any luck?
karl
Try Appengine Patch for Django: http://code.google.com/p/app-engine-patch/ . It's a single-developer project and adds some overhead, but is definitely the simplest way possible to use any Django over 0.96.
Ben
A: 

Struts 2 is purported to work on Google App Engine (at least in terms of the example applications). Follow this thread:

http://www.nabble.com/Google-App-Engine-support--td22972179.html

It appears that there are some issues with Sitemesh in terms of templating, but if you're using JSP you should be ok.

It's a good choice as a web application framework goes.

Jon
I'm not up to date on the Java world but I thought Struts had fallen out of favor - Spring seems more the talk of the town these days. Do you think this is unjustified?
karl
Struts is pretty much legacy, Struts 2 is the successor which is a merge of Webwork and Struts. Having used both that and Spring MVC commercially I would say that Struts 2 is far more flexible and advanced as far as a web application framework goes.
Jon
Two other web apps include Stripes, which is fairly popular at the moment, and Grails - I've just started with this on Google App Engine, but not got very far yet...
Jon
I see. I'm obviously out of date. I didn't know about the update to Struts 2. Grails might be a good option because I like Groovy as an alternative to Ruby. It's much more concise than writing pure Java. I'll have to read up on Stripes. Never heard of it. Have you used it?
karl
+5  A: 

Personally, I have found Python to be more fun. That's just me. However there are several commited Java developers out there that will appreciate the Java support in GAE. Furthermore, supporting Java was a good choice by Google since it will allow the GAE platform to potentially host many other languages. It's obviously a little early to expect all JVM based languages to run on GAE, but the future looks promising. For now we can look at what is and isn't working by taking a look at this GAE Java Group Page.

Coming back to Python, I think small web applications will work great with the built-in webapp framework. Other applications will benefit more from Django 1.0. Have a look at the GAE articles under the frameworks section for a few good reads on this. In any case, you will undoubtedly have restrictions in any of your choices since most web frameworks are designed with relational databases in mind ... which datastore/bigtable is not. Furthermore, the GAE platform has to be sandboxed for security reasons which also restrict you to some extent. Hope this helps.

fuentesjr
Thanks for the link. Didn't know there was a separate Google Group for the Java version. And the articles link is excellent. I obviously have some reading to do on this. thanks.
karl
No problemo. Glad I could help.
fuentesjr
I compiled a list of App Engine Frameworks for Python here: http://code.google.com/p/tipfy/wiki/AppEngineFrameworks
moraes
+1  A: 

I don't know exactly the full range of options, but I can tell you a couple of things off the bat...

  • Google Apps is built on top of / using Django.
  • Django is pretty much what Google Apps cheer and support, so I'd expect it to integrate with Google Apps better than others.
  • Google Apps has restrictions built into it that you cannot circumvent (or shouldn't). These limitations are not related to any particular framework, rather they are built into the fabric of Apps, so to speak.
  • I wouldn't worry much about performance of the framework - try to improve your design/structure, it will certainly payback better.
  • Google will eventually move to Django 1.0 and newer, plus they are updating Google Apps too.
  • They do use memcache (or an equivalent) so take that into consideration and utilize it.
Ash
I think you're wrong about App Engine being built with/on top of Django. Do you have any links to support that statement?
karl
The performance of the framework is obviously a concern - in the case of web2py, it may cause you to exceed your quotas for the day.
karl
Google Apps is not the same as Google App Engine.
karl
Why focus on memcache above all else. That is the only feature of App Engine that you mentioned in your answer. Why?
karl
I've seen a presentation or two from IO where the presenter (a member of Google App Engine) mentioned it or at least raved about Django and how much they like it.I understand your concert about exceeding quotas.Google Apps - a typo.All else being equal, memchache will give the biggest boost.
Ash
Django is incorporated into App Engine as an additional option but webapp is Google's native framework.
karl
Google Apps is not App Engine. App Engine is not built in Django; it merely bundles a version of it in the standard library.
Nick Johnson
A: 

I recommend web.py if you're using Python.

apphacker
And the reason would be? Because you want other people who like web.py to vote for your answer?
karl
+1  A: 

It really depends on what you want to do. In my experience something small hand made on top of Webob is really good for an API. But for full fledged sites that need templates/sessions/complex routing/caching django is hard to beat.

Take into account that if you huge frameworks (like django 1.0) the first request always takes around 3 seconds to load everything in memory and keeps it there until 15 secs after that request.

And while you shop around for frameworks take into account that:

  • ORM's don't apply to the platform so basically don't matter.
  • Fast templates (like Cheetah) won't be fast (or even work) as they can't use c extensions.
  • Caching might be the most important thing to make everything fast.
Koen Bok
Well, Google's webapp framework has reqest/response objects so I'm not sure why you would use Webob. Interesting point about ORMs, but I'm not sure what you mean that they don't apply. web2py uses an ORM and it works with GAE although you have to be mindful of the unique character of BigTable.
karl
@karl Google's webzapp framework actually uses Webob for the request, and a simple StringIO-based class for response.
moraes
+7  A: 

Actually web2py is very light and since ~1.50 on GAE, it caches all bytecode compiled models/views/controllers.

Nevertheless you need to consider that by default is has datastore based sessions and this may add some overhead when compared with framework that do not have sessions working on GAE (at least not by default).

The web2py DAL itself does not add a significant overhead when compared to the naive Google datastore APIs.

mdipierro
web2py DAL does not handle transactions and references with ancestors. I only spent a couple of minutes looking at it so I don't know about other issues, but these ones are bad enough.
moraes
I am not sure about references with ancestors but it does handle transactions to the extent that GAE handles transactions. You can in fact put DAL code in GAE run_in_transcation(...)
mdipierro
A: 

I use new framework GAE framework. This is similar with Django, but work on AppEngine.

Best regards!

Anton Danilchenko