Dependency from Gateway to Framework in Clean Architecture

放肆的年华 提交于 2019-12-06 07:44:08

Yes, it breaks the rules.

Framework vendors don’t care about it though, on the contrary, they strive from having our applications vendor locked to their frameworks.

Therefore we should choose our tech stack, including framework, according to the project requirements. If it is a requirement that we create a prototype quickly, we need to choose a framework that helps us do RAD. If the requirements tell us that the business concept is established and the application will live for a long time, we need to choose a framework that allows us to keep our application decoupled from the framework and other tools, so that we can easily update and/or swap tools, including the framework.

For example Symfony allows us to have controllers coupled or decoupled to the framework. When it comes to ORMs we also have that problem, where Propel forces us to have entities extending the Propel entities, while Doctrine allows us to have entities completely unaware of the ORM.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!