MVC Architecture
I think one of the hardest parts about the bootcamp so far is picking up new technology like every other day. Yesterday was the last day of using Flask and MySQL. And we were only on Flask and MySQL for two days. Now we're learning Pylot MVC to help us understand MVC architecture.
MVC is a way to organize server side information.
![]() |
Here's a flowchart of how MVC works |
- M stands for Model and does all the data manipulation to and from the database.
- V stands for View and is all the HTML templates or whatever the user sees.
- C stands for Controller and is the director of where information goes.
- Form action on html page is submitted
- Information is sent to the routes file
- If the action matches the route as well as route method (POST, GET etc.), it will go to whatever is after the hash in this example ('Controller_name#method_name')
- It will go that controller's method and execute whatever code is written in it.
No comments:
Post a Comment