微框架是否适用于大型代码库?

发布于 2024-12-06 18:17:18 字数 137 浏览 0 评论 0原文

我询问 Flask、Bottle 和expressjs 等微框架的寿命。优点:小、快速、易于管理。

随着代码复杂性和用户群的增长,它们是否打算被替换?还问:它们应该被 Django 或 Pyramid 这样的完整框架取代,还是微框架成为新标准?

I ask about the longevity of microframeworks like Flask, Bottle, and expressjs. Advantages: small, fast, manageable.

Are they intended to be replaced as code complexity and user base grow? Also asked: should they be replaced with a full framework like Django or Pyramid, or are microframeworks the new standard?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

回忆追雨的时光 2024-12-13 18:17:18

嗯,这有点取决于你所说的增长是什么意思。让我们看看两种可能性:

  1. 用户增长。如果您正在构建一个具有相当固定功能的应用程序,并且希望拥有快速扩展的用户群(例如 Twitter),那么微框架可能非常适合可扩展性,因为它已经被精简为最基本的功能 + 您的应用程序代码。

  2. 功能增长。如果您的网站需要快速添加许多离散且复杂但通用的功能(论坛、消息传递、商务、迷你应用程序、插件、复杂的 API、博客),那么您可以通过使用完整的功能来节省时间。 - Django 或 Ruby on Rails 等特色框架。

基本上,从长远来看,微框架可能不适合您的应用程序的唯一原因是您是否认为您可以从即插即用功能中受益。由于功能齐全的框架比微框架更高级别,因此您经常会发现功能齐全的解决方案作为开箱即用的插件。博客、身份验证等等。使用微框架,您需要为这些事情推出自己的解决方案,但可以通过社区访问许多较低级别的功能。

Well, it kind of depends on what you mean by growth. Let's look at two possibilities:

  1. User growth. If you're building an application with fairly fixed features which you expect to have a rapidly expanding user-base (like Twitter), then a microframework may be ideally suited for scalability since it's already stripped down to the bare essentials + your application code.

  2. Feature growth. If you have a site which you're expecting to require rapid addition of many discrete and complex yet generic features (forums, messaging, commerce, mini-applications, plugins, complex APIs, blogs), then you may save time by using a full-featured framework like Django or Ruby on Rails.

Basically, the only reason a microframework might be unsuitable for your application in the long term is if you think you would benefit from plug-and-play functionality. Because fully-featured frameworks are higher-level than microframeworks, you'll often find fully-featured solutions as plugins right out of the box. Blogs, authentication, and so on. With microframeworks you're expected to roll your own solutions for these things, but with access to a lot of lower-level functionality through the community.

嗫嚅 2024-12-13 18:17:18

这取决于(微)框架支持什么,以及为其提供的文档数量。

例如,使用 Flask 的站点需要一个数据库来存储数据。尽管 Flask 没有内置数据库扩展,但还是有可用的扩展。

It depends on what the (micro)framework supports, as well as the amount of documentation provided for it.

For example, a site using Flask needs a database for storing data. Even though Flask does not have a database extension built in, there are extensions available for it.

最冷一天 2024-12-13 18:17:18

如果微框架可以处理它,为什么要用其他东西替换它呢?

If the microframework can handle it why replace it with something else?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文