Web应用程序框架:C ++与Python [英] Web Application Frameworks: C++ vs Python
问题描述
我熟悉Python和C ++作为一个程序员。我正在想着写我自己的简单的Web应用程序,我想知道哪种语言更适合于服务器端Web开发。
I am familiar with both Python and C++ as a programmer. I was thinking of writing my own simple web application and I wanted to know which language would be more appropriate for server-side web development.
我正在寻找的一些东西:
Some things I'm looking for:
- 它必须直观。我认识到Wt存在,它遵循Qt的模型。我讨厌Qt的一件事是,他们鼓励奇怪的语法通过混淆手段(例如公共槽:成语)。如果我要写C ++,我需要它是标准的,可识别的,干净的代码。没有Qt提供的花哨的愚蠢的愚蠢。
- 我写的非C ++或Python代码越少越好。关于Django(Python Web框架)的事情是,它需要你几乎用手写的HTML。我认为如果HTML表单采用了更多的wxWidgets方法将是巨大的。 Wt接近这个,但遵循Qt模型,而不是wxWidgets。
我通常使用C ++编写视频游戏, Web开发经验。我想写一个很好的网站有很多原因。我想让它成为一个学习的经验,我想让它很有趣,我想轻松地集中在有趣的东西(例如更少的样板,更多的应用程序的肉)。
I'm typically writing video games with C++ and I have no experience in web development. I want to write a nice web site for many reasons. I want it to be a learning experience, I want it to be fun, and I want to easily be able to concentrate on "fun stuff" (e.g. less boilerplate, more meat of the app).
有关新手web开发人员的任何提示?
Any tips for a newbie web developer? I'm guessing web app frameworks are the way to go, but it's just a matter of picking one.
推荐答案
如果你选择了一个web应用程序框架, d为避免编写HTML,您可以尝试 GWT 。但是,根据我的经验,使用一个中间框架生成HTML和ECMAScript从来不会在任何地方工作,以及手写的页面。
If you'd like to avoid writing HTML, you could try GWT. However, in my experience, using an intermediate framework to generate HTML and ECMAScript never works anywhere near as well as hand-writing the pages.
[edit] nikow在评论睡衣是GWT到Python的端口。
[edit] nikow mentions in the comments that Pyjamas is a port of GWT to Python.
关于语言,如果给出C ++和Python之间的选择,我会选择Python 100%的时间。即使忽略这些语言之间的抽象的明显差异,Python只是比C ++更有用的库。你不必编写自己的面向开发的Web服务器 - Django附带一个。您不需要编写自定义模板库 - Python拥有 Genshi 。 Django提供了一个有效的ORM图层,或者为了更好的控制,你可以使用 SQLAlchemy 。这只是一场比赛。
Regarding the language, if given the choice between C++ and Python I would pick Python 100% of the time. Even ignoring the obvious difference in abstraction between those languages, Python simply has more useful libraries than C++. You don't have to write your own development-oriented web server -- Django comes with one. You don't need to write a custom template library -- Python has Genshi. Django comes with a capable ORM layer, or for even more control you can use SQLAlchemy. It's barely a contest.
这篇关于Web应用程序框架:C ++与Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!