What is the model-view-Controller?
Model-view-Controller (MVC) is a type of software architecture and design pattern that segments every element of the program into well-defined areas of functionality. In the model inspection architecture, the model deals with all the logic of the internal program that handles, saves, loads and otherwise processes and calculates data. The aspect of the view is responsible for displaying information from the model for the user and also provides a way to provide the user to enter the program. The controller takes the input from the point of view, evaluates or otherwise processes it and interacts with the model to change the data or status of the program, which is ultimately displayed by the user via the view. Although the design of the-viewer-controller requires the program to encapsulate functionality, these three sections still have to communicate in some way and are generally dependent on each other, unlike other more aggressive design formulas.
quite often is the pattern of the model of vision in applications that manage the graphical user rozhrAni (Gui). Using the MVC pattern, different visual elements of GUI are processed in terms of, recording and processing, where and what the user clicks, is solved by a controller and in fact changes information or load information. Depending on the exact application design, each MVC formula can have a mechanism for interaction with other components, such as the model is able to directly learn to refresh the screen or the view to tell the driver to restore the screen and not to accept the new input. Unlike some design formulas that occupy a strict approach with the black box, the program control programs tend to be a bit more flexible, although some implementations can make it difficult to change or debug the MVC Modularly program.
In some cases, the pattern-view-view-controller formula may not contain only one of each component. One example is an application that has multiple views, such as multiple monitors or display that can be seen on several client devices. In aMultiple views and controls can be used that allows many users to access the database, all respond to one model. However, it is more common for designing systems that maintain one to one ratio ratio for model control components.
Although the model control components have mutual relying, it may be much easier to modify certain parts of the system that use a MVC pattern than if no formula was used, especially in the case of non -object applications. If the application uses call back or listeners and observers to implement interactions between components, each component can be changed without affecting the other two. This means that a new GUI without a model or controller could be implemented. However, it should be noted that fundamental changes in the model control system may require a small amount of re -coding for each individual component.