Giter Site home page Giter Site logo

reactivecocoademo's Introduction

ReactiveCocoaDemo

Demo 概述

该Demo主要用来测验MVVM模式的分层,使APP更方便维护,测试 以及练习ReactiveCocoa相关API

首页 - 点击‘Load’,请求web service,加载数据,渲染表格

列表页 - 点击‘Add’,填写表单,验证,添加数据

涉及概念:

关于ReactiveCocoa,有时并不会减少你的代码量,相反,会使代码 相对难以理解(习惯就好了),而且也难以调试(可以给每个Signal 设置setNameWithFormat来方便调试)。

它可以减少代码的复杂度(复杂项目比较适用),结合MVVM模式使你的APP更好的分层,让每个VC的VM可以进行单元测试,因为VC里只有页面逻辑,VM里包含所有业务逻辑,VM也可以直接当成MODEL,VM是testable的。

  • FRP
  • MVVM
  • RACCommand
  • RACSignal
  • RAC绑定宏
  • flattenMap
  • map
  • filter
  • rac_signalForSelector
  • RACDelegateProxy

参考资料:

ReactiveCocoa on Github

Ray's blog

Using RACCommand

PS: 用xcode6 bete测试kiwi会crash,改用xcode5

reactivecocoademo's People

Contributors

ddaajing avatar

Watchers

James Cloos avatar Top John avatar  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.