4 ms·
Layered architecture is almost always used with MVC, but it's not MVC. It's separating your application into a communication layer (how does the front end SPA a
by throw1234651234 3y ago
Layered architecture is almost always used with MVC, but it's not MVC. It's separating your application into a communication layer (how does the front end SPA and other apps make requests against it - usually a "Controller" or "Router"), a service layer which actually processes the request, and a "Persistence" layer - logic used to save your data to a database or elsewhere. Look into FastAPI for Python
Your app would look something like the example below. Note that the significant difference from MVC, which is a bit out of style, is that the front end is in a different Single Page Application written in React or Angular. You can still do MVC if you want, but then your display and business logic concerns are really mixed. An SPA/API pattern is probably easier too.
Frontend SPA
--Angular or React - user takes action, this is sent to the API via a RESTful http request
Backend
--FastAPI router receives request, authenticates user
--Service layer actually validates the request, tries to spin up AWS resources, and returns an error if something failed. Note that you want a library here, rather than trying to pipe to CLI to run ws s3api create-bucket \
--bucket my-bucket \ or whatever.
--Persistence layer - save any data you need to the database here, if any - your app might not need this
Concise summary of layered arch: https://cs.uwaterloo.ca/~m2nagapp/courses/CS446/1195/Arch_Design_Activity/Layered.pdf https://cs.uwaterloo.ca/~m2nagapp/courses/CS446/1195/Arch_De...
Glad to hear the answer was helpful.