@@ -130,9 +130,25 @@ being present. You can easily use your own templating language, but an
130
130
extension could still depend on Jinja itself.
131
131
132
132
133
- Micro with Dependencies
133
+ What does "micro" mean?
134
134
-----------------------
135
135
136
+ “Micro” does not mean that your whole web application has to fit into a single
137
+ Python file (although it certainly can), nor does it mean that Flask is lacking
138
+ in functionality. The "micro" in microframework means Flask aims to keep the
139
+ core simple but extensible. Flask won't make many decisions for you, such as
140
+ what database to use. Those decisions that it does make, such as what
141
+ templating engine to use, are easy to change. Everything else is up to you, so
142
+ that Flask can be everything you need and nothing you don't.
143
+
144
+ By default, Flask does not include a database abstraction layer, form
145
+ validation or anything else where different libraries already exist that can
146
+ handle that. Instead, Flask supports extensions to add such functionality to
147
+ your application as if it was implemented in Flask itself. Numerous extensions
148
+ provide database integration, form validation, upload handling, various open
149
+ authentication technologies, and more. Flask may be "micro", but it's ready for
150
+ production use on a variety of needs.
151
+
136
152
Why does Flask call itself a microframework and yet it depends on two
137
153
libraries (namely Werkzeug and Jinja2). Why shouldn't it? If we look
138
154
over to the Ruby side of web development there we have a protocol very
@@ -201,5 +217,12 @@ requirements and Flask could not meet those if it would force any of this
201
217
into the core. The majority of web applications will need a template
202
218
engine in some sort. However not every application needs a SQL database.
203
219
220
+ As your codebase grows, you are free to make the design decisions appropriate
221
+ for your project. Flask will continue to provide a very simple glue layer to
222
+ the best that Python has to offer. You can implement advanced patterns in
223
+ SQLAlchemy or another database tool, introduce non-relational data persistence
224
+ as appropriate, and take advantage of framework-agnostic tools built for WSGI,
225
+ the Python web interface.
226
+
204
227
The idea of Flask is to build a good foundation for all applications.
205
228
Everything else is up to you or extensions.
0 commit comments