哪个Web开发框架最适合Google App Engine?

时间:2023-01-17 21:07:54

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

现在谷歌允许在App Engine上使用Java,我想知道这对App Engine的Web框架选择有何影响。

  1. I realize Google provides the webapp framework which is pretty barebones.
  2. 我意识到谷歌提供了非常准确的webapp框架。
  3. And the .96 version of django that's available for App Engine is restrictive.
  4. 可用于App Engine的.96版django是限制性的。
  5. web2py burns up resources, from what I've heard.
  6. web2py从我所听到的内容中消耗了资源。
  7. Rails (now available) can't use ActiveRecord, ActiveResource, restclient, rmagick.
  8. Rails(现在可用)不能使用ActiveRecord,ActiveResource,restclient,rmagick。

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

是否有一些我缺少的东西 - 任何框架在App Engine上运行良好吗?

11 个解决方案

#1


5  

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.

就个人而言,我发现Python更有趣。这就是我。但是,有几个提交的Java开发人员会欣赏GAE中的Java支持。此外,支持Java是谷歌的一个很好的选择,因为它将允许GAE平台可能托管许多其他语言。期望所有基于JVM的语言在GAE上运行显然有点早,但未来看起来很有希望。现在,我们可以通过查看这个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.

回到Python,我认为小型Web应用程序将与内置的webapp框架配合使用。其他应用程序将从Django 1.0中受益更多。请查看框架部分下的GAE文章,以便对此进行一些很好的阅读。在任何情况下,您的任何选择无疑都会受到限制,因为大多数Web框架都是考虑到关系数据库而设计的......哪个数据存储/ bigtable不是。此外,出于安全原因,GAE平台必须进行沙盒处理,这在某种程度上也会限制您。希望这可以帮助。

#2


8  

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

实际上web2py很轻,因为GAE上的〜1.50,它会缓存所有字节码编译的模型/视图/控制器。

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).

然而,您需要考虑默认情况下是基于数据存储区的会话,与没有在GAE上运行会话的框架相比,这可能会增加一些开销(至少在默认情况下不是这样)。

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

与天真的Google数据存储区API相比,web2py DAL本身不会增加显着的开销。

#3


3  

Try Spring. It supports JPA and JDO.

试试春天。它支持JPA和JDO。

There's even a Python version for Spring now.

现在还有一个适用于Spring的Python版本。

#4


1  

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.
  • Google Apps构建于/使用Django之上。
  • Django is pretty much what Google Apps cheer and support, so I'd expect it to integrate with Google Apps better than others.
  • Django几乎是Google Apps的欢呼和支持,所以我希望它能比其他人更好地与Google Apps集成。
  • 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.
  • Google Apps内置了一些限制,您无法规避(或不应该)。这些限制与任何特定框架无关,而是可以说它们内置于Apps结构中。
  • 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.
  • 谷歌最终会转向更新的Django 1.0,而且他们也在更新Google Apps。
  • They do use memcache (or an equivalent) so take that into consideration and utilize it.
  • 他们确实使用memcache(或等效的),所以考虑并利用它。

#5


1  

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.

这真的取决于你想做什么。根据我的经验,在Webob上使用小手工制作的API非常适合。但对于需要模板/会话/复杂路由/缓存的完整网站来说,django很难被击败。

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.

考虑到如果您使用庞大的框架(如django 1.0),第一个请求总是需要大约3秒才能将所有内容加载到内存中并将其保留在那里直到该请求后15秒。

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

当你四处寻找框架时,请考虑到:

  • ORM's don't apply to the platform so basically don't matter.
  • ORM不适用于平台所以基本无所谓。
  • Fast templates (like Cheetah) won't be fast (or even work) as they can't use c extensions.
  • 快速模板(如Cheetah)不会快速(甚至工作),因为它们不能使用c扩展。
  • Caching might be the most important thing to make everything fast.
  • 缓存可能是让一切变得快速的最重要的事情。

#6


0  

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

如果您正在寻找Python,那么Django将是您最好的选择。

#7


0  

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

据称Struts 2可以在Google App Engine上运行(至少在示例应用程序方面)。请遵循以下主题:

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

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.

看起来Sitemesh在模板方面存在一些问题,但是如果你使用的是JSP,你应该没问题。

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

这是Web应用程序框架的一个很好的选择。

#8


0  

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

如果您使用的是Python,我推荐使用web.py.

#9


0  

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

我使用新的框架GAE框架。这与Django类似,但在AppEngine上工作。

Best regards!

最好的祝福!

#10


0  

For Python use webapp2 (comes bundled with app engine)

对于Python使用webapp2(与app引擎捆绑在一起)

#11


0  

If you want to build large scale application and need more flexible framework, then you can take a look at Pyramid Python Framework. Previously it is called as Pylons. There are lot of good companies using this framework.

如果您想构建大型应用程序并需要更灵活的框架,那么您可以查看Pyramid Python Framework。以前它被称为Pylons。有很多优秀的公司使用这个框架。

#1


5  

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.

就个人而言,我发现Python更有趣。这就是我。但是,有几个提交的Java开发人员会欣赏GAE中的Java支持。此外,支持Java是谷歌的一个很好的选择,因为它将允许GAE平台可能托管许多其他语言。期望所有基于JVM的语言在GAE上运行显然有点早,但未来看起来很有希望。现在,我们可以通过查看这个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.

回到Python,我认为小型Web应用程序将与内置的webapp框架配合使用。其他应用程序将从Django 1.0中受益更多。请查看框架部分下的GAE文章,以便对此进行一些很好的阅读。在任何情况下,您的任何选择无疑都会受到限制,因为大多数Web框架都是考虑到关系数据库而设计的......哪个数据存储/ bigtable不是。此外,出于安全原因,GAE平台必须进行沙盒处理,这在某种程度上也会限制您。希望这可以帮助。

#2


8  

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

实际上web2py很轻,因为GAE上的〜1.50,它会缓存所有字节码编译的模型/视图/控制器。

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).

然而,您需要考虑默认情况下是基于数据存储区的会话,与没有在GAE上运行会话的框架相比,这可能会增加一些开销(至少在默认情况下不是这样)。

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

与天真的Google数据存储区API相比,web2py DAL本身不会增加显着的开销。

#3


3  

Try Spring. It supports JPA and JDO.

试试春天。它支持JPA和JDO。

There's even a Python version for Spring now.

现在还有一个适用于Spring的Python版本。

#4


1  

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.
  • Google Apps构建于/使用Django之上。
  • Django is pretty much what Google Apps cheer and support, so I'd expect it to integrate with Google Apps better than others.
  • Django几乎是Google Apps的欢呼和支持,所以我希望它能比其他人更好地与Google Apps集成。
  • 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.
  • Google Apps内置了一些限制,您无法规避(或不应该)。这些限制与任何特定框架无关,而是可以说它们内置于Apps结构中。
  • 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.
  • 谷歌最终会转向更新的Django 1.0,而且他们也在更新Google Apps。
  • They do use memcache (or an equivalent) so take that into consideration and utilize it.
  • 他们确实使用memcache(或等效的),所以考虑并利用它。

#5


1  

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.

这真的取决于你想做什么。根据我的经验,在Webob上使用小手工制作的API非常适合。但对于需要模板/会话/复杂路由/缓存的完整网站来说,django很难被击败。

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.

考虑到如果您使用庞大的框架(如django 1.0),第一个请求总是需要大约3秒才能将所有内容加载到内存中并将其保留在那里直到该请求后15秒。

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

当你四处寻找框架时,请考虑到:

  • ORM's don't apply to the platform so basically don't matter.
  • ORM不适用于平台所以基本无所谓。
  • Fast templates (like Cheetah) won't be fast (or even work) as they can't use c extensions.
  • 快速模板(如Cheetah)不会快速(甚至工作),因为它们不能使用c扩展。
  • Caching might be the most important thing to make everything fast.
  • 缓存可能是让一切变得快速的最重要的事情。

#6


0  

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

如果您正在寻找Python,那么Django将是您最好的选择。

#7


0  

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

据称Struts 2可以在Google App Engine上运行(至少在示例应用程序方面)。请遵循以下主题:

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

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.

看起来Sitemesh在模板方面存在一些问题,但是如果你使用的是JSP,你应该没问题。

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

这是Web应用程序框架的一个很好的选择。

#8


0  

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

如果您使用的是Python,我推荐使用web.py.

#9


0  

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

我使用新的框架GAE框架。这与Django类似,但在AppEngine上工作。

Best regards!

最好的祝福!

#10


0  

For Python use webapp2 (comes bundled with app engine)

对于Python使用webapp2(与app引擎捆绑在一起)

#11


0  

If you want to build large scale application and need more flexible framework, then you can take a look at Pyramid Python Framework. Previously it is called as Pylons. There are lot of good companies using this framework.

如果您想构建大型应用程序并需要更灵活的框架,那么您可以查看Pyramid Python Framework。以前它被称为Pylons。有很多优秀的公司使用这个框架。