After my first contact with a computer in the 1980's, I taught myself to program in BASIC and Z80 assembler. I went on to study Computer Science and have enjoyed a long career in Software Engineering.
Hi Aashutosh,
This is a good explanation of a particular application of MVC but it is a more generic pattern that you imply. For instance the Model does not necessarily have to communicate with a database. It could be a filesystem or just data kept in memory. Where is does communicate with a DB this is far more likely to be the other side of the HTTP communication (i.e., on the server).
Also, in web applications the Controller in more likely to be JavaScript than HTML. However, the View templates are likely to be HTML, as least at the point of presentation but, again, this is just one application of the generic pattern. Finally, the router is not generally regarded as part of the MVC pattern and you have not shown where events that affect the model enter the pattern (i.e., user interaction via the Controller or View are typical).
Hi Aashutosh,
This is a good explanation of a particular application of MVC but it is a more generic pattern that you imply. For instance the Model does not necessarily have to communicate with a database. It could be a filesystem or just data kept in memory. Where is does communicate with a DB this is far more likely to be the other side of the HTTP communication (i.e., on the server).
Also, in web applications the Controller in more likely to be JavaScript than HTML. However, the View templates are likely to be HTML, as least at the point of presentation but, again, this is just one application of the generic pattern. Finally, the router is not generally regarded as part of the MVC pattern and you have not shown where events that affect the model enter the pattern (i.e., user interaction via the Controller or View are typical).
You might find this page on MDN of interest.
I hope this is helpful, that is how it is intended. Kind regards, Tracy