3 ms·
I think services definitely make sense in flask because flask has no built in ORM, you'll end up using sqlalchemy. Even the author concedes that in some non-dja
by animal_spirits 2y ago
I think services definitely make sense in flask because flask has no built in ORM, you'll end up using sqlalchemy. Even the author concedes that in some non-django applications it may make sense
> And if, after reading this, you still are convinced that a service-layer approach with business logic separate from the data models is the right thing for you, then go for it, but I’ll urge you one last time to at least strongly consider not doing it with Django, and instead building on top of a component stack that uses a Data Mapper ORM (in the Python world, SQLAlchemy is far and away the best choice) that natively incorporates that type of separation. In the long term, I think that’s going to be a much happier and more productive path than trying to fit the square peg of a service layer into the round hole of Django’s Active Record approach.
- mattbillenstein 2y agoYeah, I'd think it's probably a really bad fit for Django. I'm doing it with SQL + psycopg2, so tired of fighting the ORM.