MMVC Design Pattern for Client-Server Data Integrity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The MVC design pattern faces difficulties in client-server applications, particularly in determining the optimal placement of the model layer between the client and server platforms, leading to performance issues, data integrity concerns, and suboptimal software construction, especially when dealing with multiple servers and intermittent connections.
Innovation Solution
The MMVC design pattern splits the model into a server model and a client model, where the client model caches data from the server model, allowing for efficient data management and reduced server communication, with a controller mediating between the client and server models and views, using predetermined rules based on user and system factors.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the model is placed on the server platform, then data integrity is maintained, but application performance deteriorates due to required communication for each request or update
Solution Approach 1:
The model is segmented into two parts: server-model residing on the server platform and client-model on the client platform. The server-model maintains data integrity by communicating with the repository, while the client-model caches data locally to enable fast access and operations without continuous server communication, thus resolving the contradiction between data integrity and application performance.
2Productivity
If the model is placed on the client platform, then application performance improves, but data integrity is compromised and duplicated abstraction layers are created
Solution Approach 1:
The model is divided into server-model and client-model components. The client-model provides local data access for improved performance, while the server-model maintains the authoritative data source for integrity. This segmentation allows each component to fulfill its specific role without the drawbacks of placing the entire model on one platform.
Solution Approach 2:
The controller acts as an intermediary that coordinates between the client-model, server-model, and view. It manages data flow and synchronization, ensuring that the client-model operates efficiently while maintaining consistency with the server-model, thus preventing data integrity issues.
3Ease of operation
If the model is placed on the client platform, then local processing is enabled, but abstraction layers should be handled by the server platform resulting in suboptimal software construction
Solution Approach 1:
The model is segmented into client-model and server-model, where the client-model handles local processing requirements and the server-model manages abstraction layers. This clear division of responsibilities enables local processing while maintaining proper software construction by keeping abstraction layer management on the server platform.
4Reliability
If intensive communication between client and server is required, then data consistency is maintained, but application efficiency deteriorates
Solution Approach 1:
The client-model performs preliminary actions by caching data from the server-model locally. This allows the application to operate efficiently with cached data without requiring intensive communication with the server for every operation, while periodic synchronization maintains data consistency.
Solution Approach 2:
The controller serves as an intermediary that manages communication between client-model and server-model. It optimizes data transfer by only synchronizing when necessary, thus maintaining data consistency while minimizing communication overhead and improving application efficiency.
Data Source
AI summary
A multi-model-view-controller (MMVC) design pattern for generating client-server applications, which overcomes the disadvantages of the MVC design pattern. In an application generated according to the MMVC design pattern initial data is provided by the server model via the controller to the client model. Subsequent data is requested from the server model by the controller and passed to the client model. The initial and subsequent data are fetched according to predetermined rules. The predetermined rules can be based on personal details of the user, such as identity or role, on the server or client computing platforms, on the application, or other factors.


