mamun-swe / flask-crud

0 stars 0 forks source link

Follow flask structures #1

Open shamspias opened 3 months ago

shamspias commented 3 months ago

Following any MVP pattern is fine but flask itself is a micro framework so no need to make complex architecture for each flask application. please read them before starting into flask https://flask.palletsprojects.com/en/2.3.x/design/ https://auth0.com/blog/best-practices-for-flask-api-development/

but my suggestion is get use to FastAPI instead of using Flask.

mamun-swe commented 3 months ago

I am following layered architecture for this application, which follows the most stable frameworks, and also it divides routes, controllers, and business logic from the database. It keeps business logic a long distance from the database. In this architecture, we use every layer independently. I think layered architecture is easier rather than other architecture. There are lots of Layered Architecture patterns, but I am using four-layer architecture. There are four layers, which are mentioned below.

• Presentation Layer • Business Layer • Persistence Layer • Database Layer

Thanks for your suggestion.