##RXRelay - Publish relay and behaviour relay comes through this
Segue navigation prevents decoupling and de modulisaration
Coordinator is a builder pattern type
- Protocols in RXSwift can be used to instantiate view Controller
- Driver is a property that always runs in the main thread - it will always replay the last value without error out
- Subjects are both observers and observables
- Reactive Functional Programming
3.## Functional Programming
- Immuntablity - Variables states cannot be changed against declarative/imperative/ object oriented programming
- Mutable state - issues around concurrency , race conditions, dead locks - something is waiting /depending on something
- First class and higher order functions - A function that can take a function and return another function. e.g filter, map , reduce .
- Pure function - Will always produce the same output when given the same input - the function creates zero side effects outside of it
- Rxswift = Notification Center + Delegate pattern + Grand Central Dispatch + Closures in an asynchronous manner
- Cocoa pod - Dependency manager used to integrate external Framework with your app
- Observables is also a sequence- can emit values - you can subscribe it to and get an event
- A tap is also an event that can be emitted from a sequence- The event will eventually finish / error out/ give up - The completed state of the observable
- The whole idea of observable is that I can subscribe to it to get events
- For example, I can subscribe to the value of a slider control and when some moves the slider, I can get the updated value
- Sequence emitting values, I get them
- let observable3 = Observable.of([1,2,3]) // of - observable will function on the array
- let observable4 = Observable.from([1,2,3,4,5]) // from -observable will function on the individual elements of the array rather than the wholearray
- Subscription makes observable useful - subscriptions are created on observables
- Subscription are to be disposed after use to prevent memory leak
- They are observable as well as the observer - They get an event and push it to the subscribers
Publish subjects
Behaviour Subjects
Replay subjects
variable (Depreciated)
Behaviour relay (New Form of Subjects
Weak self - a closure can be called at a point