Many of students and starter programmer are unaware of the MVC paradigm. This is my attempt to let them visualize how code can be highly maintainable and reusable by applying MVC pattern.
There are various design patterns already in existence which provide considerable benefits when applied. One such pattern is the MVC (Model-View-Controller) paradigm, which divides your application into three interoperable components:

- Model: Represents the business data and any business logic that govern access to and modification of the data. The model notifies views when it changes and lets the view query the model about its state. It also lets the controller access application functionality encapsulated by the model.
- View: The view renders the contents of a model. It gets data from the model and specifies how that data should be presented. It updates data presentation when the model changes. A view also forwards user input to a controller.
- Controller: The controller defines application behavior. It dispatches user requests and selects views for presentation. It interprets user inputs and maps them into actions to be performed by the model. In a web application, user inputs are HTTP GET and POST requests. A controller selects the next view to display based on the user interactions and the outcome of the model operations.
Adhering to the MVC design pattern provides you with numerous benefits:
- Separation of design concerns: Because of the decoupling of presentation, control, and data persistence and behavior, the application becomes more flexible; modifications to one component have minimal impact on other components. You can, for example, create new views without needing to rewrite the model.
- More easily maintainable and extensible: Good structure can reduce code complexity. As such, code duplication is minimized.
- Promotes division of labor: Developers with different skill sets are able to focus on their core skills and collaborate through clearly defined interfaces.
Happy coding!!!!