4 ms·
If you're using Python and don't use Django (I've tried it as an exercise for one of my pet projects), you have 2 options. Create your own framework - writing
by kayman 10y ago
If you're using Python and don't use Django (I've tried it as an exercise for one of my pet projects), you have 2 options.
Create your own framework - writing http headers etc from scratch which will take you forever or Use a lightweight framework like Flask or Web.py.
Either way, you'll end up creating your own ways to query the database and creating patterns to communicate with frontend.
As you write more code, you'll abstract your code to reusable methods.
About a month into the project, you'll realize that you're slowly rolling out your own framework which has grown organically.
Soon you'll realize you're better off using a polished framework like Django which has abstracted many of the details so you can focus on delivering value instead of clobbering together your own framework which will become a burden to maintain alongside your app.
- mrwebmaster 10y agoWhat about web2py? Isn't it another good option?
- kayman 10y agoAs your project matures, you'll notice Django has more things out of the box to use than most other existing python frameworks.
- aftbit 10y agoI've always preferred microframeworks for exactly this reason. As you build, you tailor things to what you actually need instead of building features that match the framework. I've got one project that's built on flask + sqlalchemy, but I've been slowly hacking sqlalchemy out of the fast paths because it is just too slow and I'd rather improve my grasp of SQL than spend my time learning SQLAlchemy.
- crdoconnor 10y agoDjango's opinionated nature means it fits together better. Random django packages will do admin, ORM handling, etc. in a single consistent way whereas flask packages typically don't. E.g. what seems to be flask's most popular CMS uses mongo as a backend.