10. Interim Conclusion
Examples 01 through 28 have presented, one by one, all the concepts required by the case study:
Concepts | Examples | In the case study |
blueprints, actions, routing, responses, redirects | 01 through 05 | folder [controllers] |
[create_app] factory, shared services ([app.extensions], [current_app]) | 02, 06 | [rdvmedecins/__init__.py], [web/services.py] |
Action model, linkage, validation | 07 through 12 | [forms/], [web/validation.py] |
views [Jinja2], template, fragments, macros, common view variables | 13 to 16 | folder [templates], [web/common_model.py] |
[WTForms] forms, validation, redisplay | 17 to 19 | [forms/forms.py], [templates/fragments/person_fields.html] |
Post / Redirect / Get, flash messages | 20 | [web/flash.py], [templates/fragments/flash.html] |
links and buttons, CSRF protection, confirmation window | 21 | [templates/fragments/confirmation.html], [static/js/app.js] |
Internationalization | 22 | [i18n/*.json], [web/translator.py], [controllers/language.py] |
Data Scopes | 23 | [web/application_model.py] (application), [g] (request), cookies (client) |
hooks, error handlers, error pages | 24 | [auth/security.py], [web/errors.py], [templates/error.html] |
authentication JWT, roles, CAPTCHA, rate limiting | 25–27 | folder [auth], [controllers/auth.py] |
Web / Business / DAO, [SQLAlchemy], Transactions | 28 | files [entities], [repositories], [business] |
The case study brings them together into a complete, realistic-sized application (80 files, approximately 5,300 lines, including comments). It was written with the same care as the examples: each file begins with a comment explaining its role, and tricky sections are annotated in the code. Each main folder also contains a file named [README.md] that lists its files. The document’s comments highlight what the examples did not show and refer to the examples for the rest.