Is my understanding of MVC correct?
( USER )
[ View ] deals with displaying to the user [ Controller ] deals with dealing with user interactions [ Model ] deals with the database and the mechanics of the overall application { DATABASE } such as Mongo db or MySQL |
Seems accurate from the chapter and verse for MVC.
I have to be honest, I'm not a huge proponent of design patterns. Can I ask, why you're asking? For me the only reason why things like this ever come up is that they're part of a job description, and I've found many times that they are meaningless to the actual job in question. |
1 - I am trying to get a job as a python developer
2 - Python developers are expected to have a GitHub repository and be aware of python frameworks such as Django 3 - Django is based on MVC You are welcome to tell me advices |
There are several subtly different interpretations/implementations of MVC, so you'll probably get conflicting advice.
For example, I disagree with what you've written and would say something more like: M = deals with the data model of the application V = deals with displaying and interacting with the user C = connects the M and V and controls the flow But do the differences there matter? So long as the application is correct, easily maintainable, and performs ok, it's not usually a big issue. Exact definitions are less important than understanding how (e.g.) Django works, so if you're after a Python job then you should focus on learning & practising the skills that will help with that. |
Your top post sounds sounds right for Django, yes.
Note that the reason these web frameworks were called "MVC" was largely to distinguish them from old-timey ASP, JSP and PHP, where you'd have all your code embedded in the HTML pages. Those HTML pages were sometimes called "server pages". |
Quote:
|
All times are GMT -5. The time now is 12:22 PM. |