webapp和web.py的区别 [英] Differences between webapp and web.py

查看:162
本文介绍了webapp和web.py的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Webpy.org - 谁使用web.py?



< blockquote>

[web.py启发了我们在FriendFeed中使用的web框架
[和]附带应用程序
Engine的webapp
框架...

- Brett Taylor,
FriendFeed的联合创始人以及Google App Engine上的原始
技术领导者

Google App Engine Python入门


嵌入代码中的HTML非常混乱,
难以维护。最好
使用一个模板系统... ...对于
的便利,webapp模块
包含Django的模板引擎


问题:

webapp和webpy有什么不同?

捆绑webpy时, Appengine已经提供了webapp?

我知道的是:

1. Web.py有自己的模板语言(它看起来比Django's)

2.目前,我正在考虑使用web.py的唯一原因是为了避免使用(并学习)Django来模拟appengine。

3.引用这个问题的头部

4.我有 通过 相关 问题并通过 Google上的webapp文档

5.我注意到 stackprinter 使用web.py并托管在appengine上。

解决方案

web.py体验

我开始使用 web.py 三年前,当我决定学习一些 Python web框架
我喜欢web.py的第一件事是它的简单性;我正在寻找一个基本的微型框架,而没有你可以在其他更大的项目中找到的所有电池,比如 Web2py

因此,我开发了几个项目(部署时使用 fastcgi )并了解了所有的web.py 库功能 Templetor 包括在内。

然后我发现Google App Engine并开始使用Webapp;这是一个无聊的过程,因为它不是使用Python(如Templetor或Mako),而是强制你学习一种新的模板语法,默认情况下它是非常严格的。

开发 StackPrinter 我发现 Google App Engine was was由web.py支持,所以我删除了 Sqlite ,做了一些小的调整并开始使用GAE数据存储。

Web.py是我在Python web框架方面的第一个爱好,可以公平地说,我有点偏见来谈论它。

我坚持使用web.py为我的GAE上的宠物项目,因为我很流畅,它和templetor是闪电般快速
我喜欢这样一个事实,即我可以使用Python进行模板化,并且可以轻松地在全局范围内共享一些数据或函数对于观点,我还喜欢实用程序的丰富工具集编码,降价等。



Webapp vs web.py

我认为比较它们并不公平因为Webapp是一个简单的框架,只是提供最简单的工具来开始;许多功能缺失,如I18n,验证,处理器或甚至基本的cookie处理。

查看 Webapp-improved 以获得更好的结果。



我的建议

如果您的重点主要是为Google App Engine开发,我建议您前往一些特别针对GAE的框架,如 Tipfy

如果您正在搜索pythonic网站框架在你的侧面项目上玩,web.py是一个很好的项目,以学习关注


Webpy.org - Who uses web.py?

"[web.py inspired the] web framework we use at FriendFeed [and] the webapp framework that ships with App Engine..."
— Brett Taylor, co-founder of FriendFeed and original tech lead on Google App Engine

Google App Engine Getting Started for Python

HTML embedded in code is messy and difficult to maintain. It's better to use a templating system... ...For your convenience, the webapp module includes Django's templating engine

Questions:
What are the differences between webapp and webpy?
Is it worth the trouble to bundle webpy when Appengine already offers webapp?

What I know:
1. Web.py has a templating language of it's own(it looks easier than Django's)
2. Currently, the only reason for which I am thinking about using web.py is to avoid using(and learning) Django for templating on appengine.
3. The quotes at the head of this question
4. I have been through related questions and through the webapp documentation on Google.
5. I have noticed that stackprinter uses web.py and is hosted on appengine.

解决方案

web.py experience:
I started to use web.py three years ago when I decided to learn some Python web frameworks.
The first thing I loved of web.py was its simplicity; I was searching for an essential microframework without all the batteries that you can find in other bigger projects like Django or Web2py for example.

So I developed a couple of projects (deployed with fastcgi) and learned all of the web.py library features, Templetor included.

Then I discovered Google App Engine and started to use Webapp; it was a boring process because instead of using python (like Templetor or Mako), it forces you to learn a new templating syntax that it is very restrictive by default.
While Developing StackPrinter I found that Google App Engine was supported by web.py so I removed Sqlite, made some minor tweaks and started to use GAE datastore.

Web.py was my first love in term of Python web frameworks and it's fair to say that I'm a little biased to talk about it.
I'm sticking with web.py for my pet-project on GAE because I'm fluent with it and templetor is lightning fast.
I like the fact that I can use Python for templating and the easy way to share some data or functions globally to the views, I like also the rich toolset of utilities for encoding, markdown and so on.

Webapp vs web.py:
I think it's not fair to compare them because Webapp is a simple framework that just provides the minimum easy tools to get started; many features are missing like I18n, validation, processors or even the basic cookies handling.
Check Webapp-improved for something better.

My recommendation:
If your focus is mainly on developing for Google App Engine, I would recommend you to go with some framework made specifically for GAE like Tipfy.
If you are searching for a pythonic web framework to play with on your side-projects, web.py is a good project to study and to follow.

这篇关于webapp和web.py的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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