Software Testing
Code Coverage Tutorial: Branch, Statement, Decision, FSM
What is Code coverage? Code coverage is a measure which describes the degree of which the source...
The Model-View-Controller (MVC) framework is an architectural pattern that separates an application into three main logical components Model, View, and Controller. Hence the abbreviation MVC. Each architecture component is built to handle specific development aspect of an application. MVC separates the business logic and presentation layer from each other. It was traditionally used for desktop graphical user interfaces (GUIs). Nowadays, MVC architecture has become popular for designing web applications as well as mobile apps.
In this tutorial, you will learn more about-
Three important MVC the components are:
Let's see each other this component in detail:
A View is that part of the application that represents the presentation of data.
Views are created by the data collected from the model data. A view requests the model to give information so that it resents the output presentation to the user.
The view also represents the data from chats, diagrams, and table. For example, any customer view will include all the UI components like text boxes, drop downs, etc.
The Controller is that part of the application that handles the user interaction. The controller interprets the mouse and keyboard inputs from the user, informing model and the view to change as appropriate.
A Controller send's commands to the model to update its state(E.g., Saving a specific document). The controller also sends commands to its associated view to change the view's presentation (For example scrolling a particular document).
The model component stores data and its related logic. It represents data that is being transferred between controller components or any other related business logic. For example, a Controller object will retrieve the customer info from the database. It manipulates data and send back to the database or use it to render the same data.
It responds to the request from the views and also responds to instructions from the controller to update itself. It is also the lowest level of the pattern which is responsible for maintaining data.
Let's see Model View Controller from daily life:
In this case,
View= You Waiter= Controller Cook= Model Refrigerator= Data
Let see one more example,
Car driving mechanism is another example of the MVC model.
Car runs from engine take fuel from storage, but it runs only using mentioned user interface devices.
Here, is a list of some popular MVC frameworks.
Here, are major benefits of using MVC architecture.
Parameter | 3-Tier Architecture | MVC Architecture |
Communication | This type of architecture pattern never communicates directly with the data layer. | All layers communicate directly using triangle topology. |
Usage | 3-tier: widely used in web applications where the client, data tiers, and middleware a run on physically separate platforms. | Generally used on applications that run on a single graphical workstation. |
What is Code coverage? Code coverage is a measure which describes the degree of which the source...
What is Exploratory Testing? EXPLORATORY TESTING is a type of software testing where Test cases...
Testing Maturity Model in Software Testing Testing Maturity Model (TMM) in Software Testing is a...
Every year, many new Code Editors are launched, and the developer finds it challenging to choose...
What is Static Testing? Static Testing is a type of software testing in which software application is...
What is BI Testing? BUSINESS INTELLIGENCE (BI) is the process of gathering, cleansing, analyzing,...