这是一篇学习Clean架构的笔记,MVP本身是属于展现层的逻辑,对于小型项目可能方便很多,但是对于大型项目来说MVP并不足以使代码优化、依然会代码冗余。所以分层和模块化才是方向,clean架构就指出了这种架构的设计方式,所有本篇文章就做些clean架构的学习笔记。
原文: architecting-android-the-clean-way the-clean-architecture
quality software could be : not only about satisfying requirements, also should be robust, maintainable, testable, and flexible enough to adapt to growth and change.
the detail is :
Independent of FrameWorkTestableIndependent of UIIndependent of DatabaseIndependent of any external agencyEach layer uses its own data model so this independence can be reached.(the project uses datamapper to acheive the indepenices. 具体实施中还待商榷,毕竟同样的model类型再次创建费劲。在确保可测试情况下应该重复创建。 ).
扩展阅读: 说说Android的MVP模式
新闻热点
疑难解答