Giter Club home page Giter Club logo

lsarchitecture's Introduction

对于iOS架构模式之争的一些思考

这里写这么一篇文章不是为了激化这个争论,只是谈谈自己的个人想法,望各路大神高抬贵手,大家和气生财。

之前写过一篇《iOS MVVM+RAC 从框架到实战》,这篇文章的评论有褒有贬,自己当时也是因为经验所限,虽说只是写了个引子,但是能对一些新人有所启发,自己也会很开心的,虽然各路大神都觉得很low吧。

这里,我想说不要局限于MVC、MVVM、MVP等等一些架构模式之中,万变不离其宗,真正适用于项目的架构才是最好的架构。

在我看来,无论哪种架构,都是以MVC为基准,然后不断的调整重构、不断的划分职责,细化得来的。所以,能够掌握如何划分职责,将视图、逻辑、数据三者连接起来,易用并方便维护,那么就可以了,无所谓什么模式。

在真正的项目中,哪有这么纯粹的项目,这只是一种划分代码的**,运用得当才能更匹配项目,让项目更有质量有速度的编写下去!每个正式项目的具体架构表现绝对是各种设计模式辅助,划分代码的**在各个地方均有体现,而不是仅仅关注的UI层数据逻辑的处理。

关于《iOS MVVM+RAC 从框架到实战》中最后一小节中干掉基类的做法(Runtime + category),已经有所实现, 也按照自己想法,在一切从简的基础上,写了一个新的列表展示,有兴趣的同学可以看一眼,这里就不介绍了,毕竟大神众多,否则文章又变得又臭又长了...

主要参考项目中的 CodeStandard文件夹(测试代码) 及 GeneralBase文件夹(UI的扩展及Model相关的基类)

喜欢的话就点个赞支持一下,不喜欢的话那就抱歉浪费了您的时间,您笑笑也就过去了,和气生财嘛!

lsarchitecture's People

Contributors

wanglongshuai avatar

Watchers

James Cloos avatar Blackfire Gao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.