Struts Framework Flashcards
Explain MVC
Model View Controller. Software architectural pattern for implementing user interfaces on computers. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.
What was MVC traditionally used for?
GUIs
What is the central component of MVC?
Model
What’s model?
The model directly manages the data, logic and rules of the application.
What’s view?
A view can be any output representation of information, such as a chart or a diagram. Multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants.
What’s controller?
Accepts input and converts it to commands for the model or view.
Describe interactions between parts in MVC
1) A model stores data that is retrieved according to commands from the controller and displayed in the view.
2) A view generates new output to the user based on changes in the model.
3) A controller can send commands to the model to update the model’s state (e.g. editing a document). It can also send commands to its associated view to change the view’s presentation of the model (e.g. by scrolling through a document).