MVCPatternDemo, our demo class, will use StudentController to demonstrate use of MVC pattern. StudentView will be a view class which can print student details on console and StudentController is the controller class responsible to store data in Student object and update view StudentView accordingly. We are going to create a Student object acting as a model. It controls the data flow into model object and updates the view whenever data changes. View - View represents the visualization of the data that model contains.Ĭontroller - Controller acts on both model and view. It can also have logic to update controller if its data changes. Model - Model represents an object or JAVA POJO carrying data. This pattern is used to separate application's concerns.
You can start your new project right away from this. MVC Pattern stands for Model-View-Controller Pattern. A simple Java swing project based on Model View Controller design patterns.