为什么在Google App Engine上使用Django? [英] Why use Django on Google App Engine?

查看:106
本文介绍了为什么在Google App Engine上使用Django?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在研究Google App Engine(GAE)时,很明显,使用Django在GAE上开发Python时非常受欢迎。我一直在搜索网页,找到有关使用Django的成本和收益的信息,以了解为什么如此受欢迎。虽然我已经能够找到各种各样的源代码,如何在GAE上运行Django以及各种方法,但我没有发现任何比较分析,为什么 em> Django比较好使用由Google提供的webapp框架。



要明确的是,很明显,为什么在GAE上使用Django对于现有技能的开发人员是有用的Django(绝大多数Python Web开发者,毫无疑问)或Django中的现有代码(使用GAE更多的是移植操作)。然而,我的团队正在评估GAE用于一个全新的项目,而我们现有的经验是与TurboGears而不是Django。



很难确定Django为什么对于开发团队来说,当BigTable库已经取代Django的ORM时,会话和身份验证必然发生变化,Django的模板(如果需要)可用,而不使用整个Django堆栈。



最后,很明显,使用Django确实有优势,如果我们以后想要离开GAE并且需要一个平台来定位出口,就提供一个退出策略。



我非常感谢帮助指出为什么使用Django比在GAE上使用webapp更好。我也完全没有Django经验,所以在GAE上工作的小功能和/或便利性的细节对我来说也是有价值的。

解决方案

我们在我们的appengine实例上使用django,主要是当我们向用户提供实际的网站时。它有一个很好的模板引擎,url路由和所有的请求/响应/错误处理内置。所以即使我们不能使用魔术orm /管理员的东西,它有很多去。



对于api服务,我们在 webob 。它更轻巧,因为它不需要django提供的所有东西,因此在某些情况下有一点更快。


When researching Google App Engine (GAE), it's clear that using Django is wildly popular for developing in Python on GAE. I've been scouring the web to find information on the costs and benefits of using Django, to find out why it's so popular. While I've been able to find a wide variety of sources on how to run Django on GAE and the various methods of doing so, I haven't found any comparative analysis on why Django is preferable to using the webapp framework provided by Google.

To be clear, it's immediately apparent why using Django on GAE is useful for developers with an existing skillset in Django (a majority of Python web developers, no doubt) or existing code in Django (where using GAE is more of a porting exercise). My team, however, is evaluating GAE for use on an all-new project and our existing experience is with TurboGears, not Django.

It's been quite difficult to determine why Django is beneficial to a development team when the BigTable libraries have replaced Django's ORM, sessions and authentication are necessarily changed, and Django's templating (if desirable) is available without using the entire Django stack.

Finally, it's clear that using Django does have the advantage of providing an "exit strategy" if we later wanted to move away from GAE and need a platform to target for the exodus.

I'd be extremely appreciative for help in pointing out why using Django is better than using webapp on GAE. I'm also completely inexperienced with Django, so elaboration on smaller features and/or conveniences that work on GAE are also valuable to me.

解决方案

We use django on our appengine instances mostly when we have to serve actual websites to the user. It has a great template engine, url routing and all the request/response/error handling built in. So even while we can't use the magic orm/admin stuff it has a lot going for it.

For api services we built something very simple on top of webob. It's far more lightweight because it doesn't need everything that django offers, and therefore a little quicker in some situations.

这篇关于为什么在Google App Engine上使用Django?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆