125-132
The performance analysis of applications written using MVP and MVC
Authors: Coşkun Aygun, Emre Kazan
Number of views: 690
Model View Controller (MVC) is an architectural pattern introduced at the end of the 70s. The aim of MVC is the interaction of components in the view layer among themselves and with the rest of the system as well as the placements of these components. It is described as the separation of business logic from user interface code. In this way, if we want to make any changes to the view layer, we can do easily without causing any problems or changes to business logic. Model View Presenter (MVP) is the structure that retrieves user interface code (flow between pages, functioning within the user interface, etc.) in view class and carries into a different Presenter class. Thus, it can be operated and tested independently from the creation and rendering of code user interface related to the presentation.
In the present study, two applications have been written using Model View Presenter (MVP) and Model View Controller (MVC) with the same requirements. To compare applications written using MVP and MVC, JMeter and speedy framework monitoring comparing tools and analysis results have been presented. MVP has been found to be more advantageous than MVC. In addition, during the encoding process by way of mocking the layers in model class, the necessity of acquisition of model data has been eliminated. The development process has been maintained without the need for database, network connection, file access, etc. And thanks to the mocking of view classes, testing of applications during the development and the creation of user interface has been unnecessary. Changes in the user interface can be made in a much easier and safe manner. After all, the changes to be made here will not affect the process in any way.
The advantage of MVP over MVC can be summarized as the ease of testability and less code dependency.