开发者

Are microframeworks intended for large code bases?

开发者 https://www.devze.com 2023-04-07 12:45 出处:网络
I ask about the longevity of microframeworks like Flask, Bottle, and expressjs. Advantages: small, fast, manageable.

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 Djang开发者_StackOverflowo or Pyramid, or are microframeworks the new standard?


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消