remove becomingbig.rst
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Luis Palacios · committed by David Lord · parent 587a49c · Browse files · 5 files·+4 added−112 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+4 added−112 removed
- other:+4 added−112 removed
Provenance
- Commit
410a324- Tree
7e8afea- Author
Luis Palacios <60991609+moondial-pal@users.noreply.github.com>- Committer
David Lord <davidism@gmail.com>- Parent
587a49c
5 files changed+4 added−112 removed
modified:docs/patterns/packages.rst-4 removed
171 unmodified lines172 that we are not actually using the views in :file:`__init__.py` and just173 ensuring the module is imported and we are doing that at the bottom of174 the file.175 176- There are still some problems with that approach but if you want to use177- decorators there is no way around that. Check out the178- :doc:`/becomingbig` section for some inspiration how to deal with that.176 180-177 Working with Blueprints178 -----------------------179 180 If you have larger applications it's recommended to divide them into3 unmodified linesdeleted:docs/becomingbig.rst-100 removed
1-Becoming Big2-============3-4-Here are your options when growing your codebase or scaling your application.5-6-Read the Source.7-----------------8-9-Flask started in part to demonstrate how to build your own framework on top of10-existing well-used tools Werkzeug (WSGI) and Jinja (templating), and as it11-developed, it became useful to a wide audience. As you grow your codebase,12-don't just use Flask -- understand it. Read the source. Flask's code is13-written to be read; its documentation is published so you can use its internal14-APIs. Flask sticks to documented APIs in upstream libraries, and documents its15-internal utilities so that you can find the hook points needed for your16-project.17-18-Hook. Extend.19--------------20-21-The :doc:`/api` docs are full of available overrides, hook points, and22-:doc:`/signals`. You can provide custom classes for things like the23-request and response objects. Dig deeper on the APIs you use, and look24-for the customizations which are available out of the box in a Flask25-release. Look for ways in which your project can be refactored into a26-collection of utilities and Flask extensions. Explore the many27-:doc:`/extensions` in the community, and look for patterns to build your28-own extensions if you do not find the tools you need.29-30-Subclass.31----------32-33-The :class:`~flask.Flask` class has many methods designed for subclassing. You34-can quickly add or customize behavior by subclassing :class:`~flask.Flask` (see35-the linked method docs) and using that subclass wherever you instantiate an36-application class. This works well with :doc:`/patterns/appfactories`.37-See :doc:`/patterns/subclassing` for an example.38-39-Wrap with middleware.40----------------------41-42-The :doc:`/patterns/appdispatch` pattern shows in detail how to apply middleware. You43-can introduce WSGI middleware to wrap your Flask instances and introduce fixes44-and changes at the layer between your Flask application and your HTTP45-server. Werkzeug includes several `middlewares46-<https://werkzeug.palletsprojects.com/middleware/>`_.47-48-Fork.49------50-51-If none of the above options work, fork Flask. The majority of code of Flask52-is within Werkzeug and Jinja2. These libraries do the majority of the work.53-Flask is just the paste that glues those together. For every project there is54-the point where the underlying framework gets in the way (due to assumptions55-the original developers had). This is natural because if this would not be the56-case, the framework would be a very complex system to begin with which causes a57-steep learning curve and a lot of user frustration.58-59-This is not unique to Flask. Many people use patched and modified60-versions of their framework to counter shortcomings. This idea is also61-reflected in the license of Flask. You don't have to contribute any62-changes back if you decide to modify the framework.63-64-The downside of forking is of course that Flask extensions will most65-likely break because the new framework has a different import name.66-Furthermore integrating upstream changes can be a complex process,67-depending on the number of changes. Because of that, forking should be68-the very last resort.69-70-Scale like a pro.71------------------72-73-For many web applications the complexity of the code is less an issue than74-the scaling for the number of users or data entries expected. Flask by75-itself is only limited in terms of scaling by your application code, the76-data store you want to use and the Python implementation and webserver you77-are running on.78-79-Scaling well means for example that if you double the amount of servers80-you get about twice the performance. Scaling bad means that if you add a81-new server the application won't perform any better or would not even82-support a second server.83-84-There is only one limiting factor regarding scaling in Flask which are85-the context local proxies. They depend on context which in Flask is86-defined as being either a thread, process or greenlet. If your server87-uses some kind of concurrency that is not based on threads or greenlets,88-Flask will no longer be able to support these global proxies. However the89-majority of servers are using either threads, greenlets or separate90-processes to achieve concurrency which are all methods well supported by91-the underlying Werkzeug library.92-93-Discuss with the community.94----------------------------95-96-The Flask developers keep the framework accessible to users with codebases big97-and small. If you find an obstacle in your way, caused by Flask, don't hesitate98-to contact the developers on the mailing list or Discord server. The best way for99-the Flask and Flask extension developers to improve the tools for larger100-applications is getting feedback from users.modified:docs/design.rst-3 removed
165 unmodified lines166 large applications harder to maintain. However Flask is just not designed167 for large applications or asynchronous servers. Flask wants to make it168 quick and easy to write a traditional web application.169 170-Also see the :doc:`/becomingbig` section of the documentation for some171-inspiration for larger applications based on Flask.170 173-171 Async/await and ASGI support172 ----------------------------173 174 Flask supports ``async`` coroutines for view functions by executing the31 unmodified linesmodified:docs/foreword.rst+4 added-4 removed
45 unmodified lines46 SQLAlchemy or another database tool, introduce non-relational data persistence47 as appropriate, and take advantage of framework-agnostic tools built for WSGI,48 the Python web interface.49 50-Flask includes many hooks to customize its behavior. Should you need more51-customization, the Flask class is built for subclassing. If you are interested52-in that, check out the :doc:`becomingbig` chapter. If you are curious about53-the Flask design principles, head over to the section about :doc:`design`.50+Flask includes many hooks to customize its behavior. Should you need51+more customization, the Flask class is built for subclassing. If you are52+curious about the Flask design principles, head over to the section53+about :doc:`design`.modified:docs/index.rst-1 removed
56 unmodified lines57 server58 shell59 patterns/index60 deploying/index61- becomingbig61 async-await62 63 64 API Reference26 unmodified lines