流行的Web框架之间的主要区别是什么? [英] What are the main differences between the popular web frameworks?

查看:121
本文介绍了流行的Web框架之间的主要区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在有许多网络应用程序框架可用,几乎每种语言都可以使用那里。在你的经验中,他们的优势,弱点和独特的功能是什么?假设是奢侈的选择,什么因素会导致你考虑​​一个在另一个?

There are lots of web application frameworks available these days, for pretty much every language out there. In your experience, what are their strengths, weaknesses, and unique features? Assuming the luxury of choice, what factors would lead you to consider one over another other?

我最感兴趣的人的直接经验与一个或多个框架,而不是一个详尽的比较所有的东西。希望SO社群拥有的程序员对于 Rails ASP.NET Django a>, TurboGears JSF 。如果有人使用 Seaside Weblocks

I'm most interested in people's direct experience with one or more frameworks, rather than an exhaustive comparison of everything out there. Hopefully the SO community has programmers who have good and bad experiences with things like Rails, ASP.NET, Django, TurboGears, or JSF. It would also be great to hear if anyone is using one of the less mainstream frameworks like Seaside or Weblocks.

编程语言一个明显的区别,但是一个Java vs. Ruby flamewar将不会有什么乐趣,并且这些框架中的大多数似乎至少是作为他们的选择语言的技术,工具和复杂性的投资;所以我对以下的感兴趣:

Programming language is an obvious difference, but a Java vs Ruby flamewar won't be much fun, and most of these frameworks seem to be at least as much an investment in technology, tools and complexity as their language of choice; so I'm more interested in things like:


  • 发展速度和方便


  • 锁定 - 如果您必须切换框架,可以保留多少代码?

  • >灵活性 - 框架是否决定您的架构或设计? (

  • 性能,可扩展性和稳定性 - 显然取决于开发人员!
  • $ b(不管是好是坏, $ b
  • Development speed and convenience
  • Barriers to entry - both in terms of developer training, and of infrastructure needed
  • Lock-in - how much code could you keep if you had to switch frameworks?
  • Flexibility - does the framework dictate your architecture or design? (Whether that would be a good or bad thing is probably best left to a separate discussion.)
  • Performance, scalability, and stability - obviously depending on the developers!

推荐答案

我将简要介绍三个流行的Python框架的每个领域。

I am going to briefly address each area for three popular Python frameworks. This is only based on my personal experiences and observations.

适用于 TurboGears Pylons Django ,开发速度大致相等。作为现代框架,很容易开始在一个新的网站,开始投掷页面。 Python是开发和调试的着名快速,我会把任何Python框架的开发时间比任何其他工作(包括PHP,Perl,嵌入式Perl和C#/ ASP.Net)更短的开发时间。

For TurboGears, Pylons, and Django, development speed is roughly equal. Being modern frameworks, it's easy to get started on a new site and start throwing together pages. Python is famously fast to develop and debug and I would put any Python framework as having a shorter development time than any other setup I've worked with (including PHP, Perl, Embedded Perl, and C#/ASP.Net).

如果你知道Python并且愿意观看 20分钟视频教程,您可以从头开始创建一个相当完整的wiki类型的网站。或者,您可以在30分钟内完成社交书签网站教程(包括安装)。这些是TurboGears示例,但其他两个框架也有几乎相同的教程。

If you know Python and are willing to watch a 20 minute video tutorial, you can create a fairly complete wiki-type site from scratch. Or you can walk through a social-bookmarking site tutorial in 30 minutes (including installation). These are TurboGears examples but the other two frameworks have nearly identical tutorials as well.

这些框架提供的测试/开发基础架构通常足以完成大多数网站。在任何时候,您都可以换出组件以满足生产环境要求。例如,SQLite可以很好地设置你的模型和加载测试数据,但是你会想要在运行或存储大量的数据之前安装MySQL(例如)。

The test/development infrastructure that comes out of the box with these frameworks is generally enough to complete most sites. At any point, you can swap out components to meet your production environment requirements. For example, SQLite is fine for setting up your models and loading test data, but you will want to install MySQL (for example) before going live or storing large amounts of data.

在所有情况下,需求都非常低,完全由您的可扩展性要求决定,而不是框架的任何特性。

In all cases, the requirements are very low and dictated entirely by your scalability requirements and not any peculiarities of the framework. If you are comfortable with a certain template language or ORM, it will probably plug right in.

这是所有框架中的一个普遍问题。选择语言时,您将限制代码重复使用选项。当你选择一个模板,你再次被锁定(虽然这更容易改变,一般来说,比其他事情)。同样适用于您的ORM,数据库等。这些框架没有什么具体的帮助或阻碍锁定。

This is a generalized problem across all frameworks. When you select a language, you limit your code-reuse options. When you select a templater, you are again locked in (although that's easier to change, in general, than other things). The same goes for your ORM, database, and so on. There is nothing these frameworks do specifically that will help or hinder lock-in.

MVC与这三个框架。正如你所说,这是一个非常不同的讨论!

It's all about MVC with these three frameworks. As you said, that's a very different discussion!

写好代码,你的网站会表现良好!同样,这是不同开发技术解决的所有框架中的问题,可能超出了这个答案。

Well, if you write good code, your site will perform well! Again, this is a problem across all frameworks addressed by different development techniques and is probably way outside the scope of this answer.

这篇关于流行的Web框架之间的主要区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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