What is MVC architecture QT?

What is MVC architecture? How is it organized?
The MVC Architecture
MVC lies at the core of most of the programming languages.Model, View, Controller architecture, usually just called MVC.

MVC benefits include:
Isolation of business logic from the user interface
Ease of keeping code DRY
Making it clear where different types of code belong for easier maintenance

Models
A model represents the information (data) of the application and the rules to manipulate that data, In most cases, one table in your database will correspond to one model in your application. Most of the application’s business logic will be concentrated in the models.
In Qt, the standard interface for model is defined by the QAbstractItemModel class.

Views
Views represent the user interface of your application.
Views handle the job of providing data to the web browser or other tool that is used to make requests from your application.
In Qt, the standard interface for model is defined by the QAbstractItemView class.

The separation of content and presentation is achieved by the use of a standard model interface provided by QAbstractItemModel, a standard view interface provided by QAbstractItemView,

Controllers – in Qt more responsible feature (Delegates)
Controllers provide the “glue” between models and views. Generally controllers are responsible for processing the incoming requests from the web browser, interrogating the models for data, and passing that data on to the views for presentation.
In Qt, the standard interface for controlling delegates is defined in the QAbstractItemDelegate class.

No comments:

 
Top Blogs