4 ms·
Do you know of a good side-by-side comparison of a simple app built with blueprints versus one without? I am still trying to wrap my head around the problem tha
by cirgue 8y ago
Do you know of a good side-by-side comparison of a simple app built with blueprints versus one without? I am still trying to wrap my head around the problem that they solve.
- guitarbill 8y agothing is, a simple app won't show you the benefits. blueprints are basically modules, and allow you to compose a big flask app from multiple blueprints. so as your app grows, you can add new features sanely (especially routing). a nice side-effect is having to think as features being correctly separated. initially, it's only a bit more effort, but as you scale it'll stop e.g. your views.py getting out of control, without resorting to hackery. again, it can be hard to do retro-actively, and once you realize you need it, the codebase is usually pretty bad. so i just do it from the start, as the extra effort is small then. (best practices prevent team members with less experience from committing attrocities and give them a good foundation to copy from)