ZoranPandovski / design-patterns

:briefcase: Design patterns written in different programming languages :triangular_ruler:
368 stars 310 forks source link

Implemented MVC design pattern in java programming #455

Closed ankit-tiwari-tietoevry closed 2 years ago

ankit-tiwari-tietoevry commented 2 years ago

I have implemented MVC design patterns using Java programming language.

Model: The Model contains only pure application data, it contains no logic describing how to present the data to a user. Here we have a student entity/class which contains properties. View: The View presents the model’s data to the user. The view knows how to access the model’s data, but it does not know what this data means or what the user can do to manipulate it. Here we have StudentView class where we access the student properties we had defined in the model. Controller: The Controller exists between the view and the model. It listens to events triggered by the view (or another external source) and executes the appropriate reaction to these events. Here we have a Student controller which acts as a layer between the model and the view.