Persistence Factories Architectural Design Pattern

被引:0
|
作者
Ortiz Fuentes, Jorge D. [1 ]
Herranz Nieva, Angel [1 ]
机构
[1] Univ Politecn Madrid, Madrid, Spain
来源
关键词
Software Architecture; Architectural design pattern; Design pattern; Mobile app; Desktop application; Persistence; Kotlin; Swift;
D O I
10.1007/978-3-031-16697-6_12
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Each screen of the user interface of a mobile or desktop application coordinates one or more use cases. Each one of those use cases may need to access different entities of the persistent data. It is a common practice to inject a provider for each of those entities of the model. Thus, the more use cases the view deals with, the more entity providers need to be injected. If we extend that to all the views of the application, the complexity increases and the impact in maintainability of the application is huge. In this paper we present an architectural design pattern to address this problem, as well as an analysis of its merits. The main idea behind the architectural pattern is that use cases take care of requesting the required entity providers from a unique element that is the persistence factory. Therefore use cases are created with the required entity provider(s) injected, allowing the other components of the architecture to be completely decoupled from the implementation of the persistence and simplifying the dependency injection process. The included code snippets compare our solution with most used industrial alternatives.
引用
收藏
页码:167 / 177
页数:11
相关论文
共 50 条