RAC features functional programming and responsive programming. It was largely absorbed. NET Reactive extensions design and implementation. Reactivecocoa trying to solve any problem
Reactivecocoa attempts to address the following 3 issues:
- Too many dependencies between state and state during the development of traditional iOS
- The problem with traditional MVC architecture: The controller is more complex and can be tested poorly
- Provides a unified messaging mechanism
Unified Messaging Mechanism
In iOS development, almost every line of code is in a corresponding event, such as clicking a button, receiving a network message, changing the property (via KVO), or changing the user's location (via Corelocation). But these events are handled in different ways, including KVO, Notification, delegation, block, and Target-action. REACTIVECOCOA defines a standard interface for events, allowing you to use some basic tools to make it easier to connect, filter, and combine. So that all the various message passing mechanisms can be done with RAC
Because the memory management of the Objective-c language is based on reference counting, in order to avoid circular reference problems, if you want to reference self in block, you need to use @weakify(self) and @strongify(self) to avoid strong references. In addition, you should pay attention to the nesting level of blocks in use, improper misuse of multi-layered nesting blocks may bring disaster to the maintainability of the program.
Resources:
Http://www.cocoachina.com/ios/20150123/10994.html
http://www.devtang.com/blog/2014/02/11/reactivecocoa-introduction/
REACTIVECOCOA-functional programming and responsive programming