Django vs web2py作为初学者开发者 [英] Django vs web2py for a beginner developer

查看:218
本文介绍了Django vs web2py作为初学者开发者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这两个框架中的哪一个更适合具有11个月经验的开发人员。我已经决定学习python的服务器端编码,并想知道哪些更适合我的技能水平的人。我刚刚花了几天玩web2py,真的很喜欢它,我想知道Django是否提供了更多的东西,我错过了?



PS。更新:感谢大家的精彩投入,购买三本django书籍,并通过几个小项目/教程django和web2py,我已经定居在web2py。这是一个很棒的框架,这使得Web开发对于新手来说非常有趣。我会建议所有的新手来学习这个框架,因为它将来会成为主流。 Django也是一个很棒的框架,但web2py在我有限的经验意见中更好。

解决方案

(免责声明:我是项目负责人对于web2py)



Django比web2py长约5年,因此它有更多的用户和更多的应用程序炫耀。 Django有他们所说的admin,这与web2py的admin不一样,但更像web2py的appadmin。 Django的admin比web2py的appadmin更好,更可自定义。 Django没有相当于web2py的admin。 (抱歉的名字混淆)。



web2py更紧凑,并且具有更多功能开箱即用(更多支持的数据库,基于Web的IDE,票务系统,运行于GAE没有补丁,多个登录方式,基于角色的访问控制,基于Web的翻译界面,支持多个数据库连接,分布式事务等)。



对我来说最重要web2py的功能是自动迁移。 Django不提供它们开箱即用。



对于web2py,长期的向后兼容性是一个主要目标,以及安全性。 Django在安全性方面与web2py相当(除了web2py已经在CSRF预防和模板之前默认转义),但Django在1.0发布时破坏了向后的兼容性。 web2py从2007年10月开始没有。



对我来说,web2py语法更为自然:

 code> db(db.tablename.fieldname< = value).select()#web2py 
Tablename.objects.filter(fieldname__lt = value)#Django
我不知道Django中不存在web2py的任何功能。我曾经问过这个问题,因为如果有的话,我们想把它添加到web2py,但是我还没有收到一个令人满意的答案。



当然有我们都做的但是不同的。 Django遵循显性优于隐性。 web2py并不代替,而是遵循一切都应该有默认行为。我相信这会使web2py代码和配置更加紧凑。



无论如何,无论你选择什么,他们都是非常好的固体Web框架,相似之处不如差别。 Django开发人员非常聪明。



web2py社区非常友好。您应该尝试在web2py的谷歌组和Django组上提出问题。就像一个实验一样。


Which of these two frameworks is better suited to a developer with 11 months experience. I have decided to learn python for my server side coding and wanted to know which of these would be better suited for someone at my skill level. I have just spent a few days playing around with web2py and really like it and i am wondering if Django offers something more that i am missing out on?

PS. UPDATE: Thank you all for the wonderful input, after buying three django books and going through a few small projects/tutorials for both django and web2py, i have settled on web2py. This is a wonderful framework, which makes web development really fun for a newbe. I would recommend all newbies to learn this framework as it will be mainstream in the future. Django is also a wonderful framework but web2py is just better in my limited experience opinion.

解决方案

(disclaimer: I am the project leader for web2py)

Django has been around 5 years longer than web2py therefore it has more users and more applications to show off. Django has what they call "admin" which is not the same as web2py's "admin" but more like web2py's "appadmin". Django's "admin" is better and more customizable than web2py's "appadmin". Django does not have the equivalent of web2py's "admin". (sorry for the name confusion).

web2py is more compact and has more functionality out of the box (more supported databases, web based IDE, ticketing system, runs on GAE without patches, multiple login methods, role based access control, web based translation interface, support for multiple database connections, distributed transactions, and more).

For me the most important functionality of web2py is automatic migrations. Django does not provide them out of the box.

For web2py long term backward compatibility is a primary goal, together with security. Django is comparable to web2py in terms of security (except that web2py had CSRF prevention and default escaping in templates before they did) but Django broke backward compatibility when 1.0 was released. web2py never did since Oct 2007.

To me the web2py syntax is more natural:

 db(db.tablename.fieldname <= value).select() # web2py
 Tablename.objects.filter(fieldname__lt=value) # Django

I am not aware of any functionality of web2py that is not present in Django. I have asked that question many times because, if there is, we want to add it to web2py, but I have not yet received a satisfactory answer.

Of course there are things that we both do but differently. Django follows "explicit is better than implicit". web2py does not and instead follows "everything should have a default behavior". I believe this makes web2py code and configuration more compact.

Anyway, whatever you choose, they are too good solid web frameworks and the similarities are less than the differences. The Django developers are very smart people.

The web2py community is very friendly. You should try ask a question on the web2py google group and on the Django group. Just as an experiment.

这篇关于Django vs web2py作为初学者开发者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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