reactivecocoa   422

« earlier    

RxSwift Primer: Part 5 — Liss is More
Together, in my RxSwift primer series, we’ve: Learned what Rx is all about Begun to convert a simple sample app to use Rx Eliminated stored state Learned how to…
IFTTT  Instapaper  reactivecocoa 
january 2017 by broderboy
Binding to a UITableView from a ReactiveCocoa ViewModel
There's a binding helper object which handles much of the logic, and the important part is that for this particular implementation, managing that object that is the VC's responsibility (the VM exposes an observable array of cell view models).
uitableview  uitableviewcell  mvvm  collections  viewmodel  reactivecocoa  reactiveprogramming 
august 2016 by cdzombak
ReactiveCocoa 3.0 - Signal Producers and API clarity
Signal producers are used to represents operations or tasks, where the act of starting the signal producer initiates the operation. Whereas signals represents a stream of events which occur regardless of whether observers have been added or not. Signal producers are a good fit for network requests, whereas signals work well for streams of UI events.
reactivecocoa  reactiveprogramming  signal  signalproducer 
august 2016 by cdzombak
ReactiveViewModel/ at master · ReactiveCocoa/ReactiveViewModel
Although it seems similar to MVC (except with a "view model" object in place of the controller), there's one major difference — the view owns the view model. Unlike a controller, a view model has no knowledge of the specific view that's using it.

This seemingly minor change offers huge benefits:

• View models are testable. Since they don't need a view to do their work, presentation behavior can be tested without any UI automation or stubbing.
• View models can be used like models. If desired, view models can be copied or serialized just like a domain model. This can be used to quickly implement UI restoration and similar behaviors.
• View models are (mostly) platform-agnostic. Since the actual UI code lives in the view, well-designed view models can be used on the iPhone, iPad, and Mac, with only minor tweaking for each platform.
• Views and view controllers are simpler. Once the important logic is moved elsewhere, views and VCs become dumb UI objects. This makes them easier to understand and redesign.

In short, replacing MVC with MVVM can lead to more versatile and rigorous UI code.

## What's in a view model?

A view model is like an adapter for the model that makes it suitable for presentation. The view model is also where presentation behavior goes.

For example, a view model might handle:

• Kicking off network or database requests
• Determining when information should be hidden or shown
• Date and number formatting
• Localization

However, the view model is not responsible for actually presenting information or handling input — that's the sole domain of the view layer. When the view model needs to communicate something to the view, it does so through a system of data binding.
mvvm  software_architecture  reactiveprogramming  reactivecocoa 
august 2016 by cdzombak
ashfurrow/C-41: C-41 is an application to help people develop film at home by providing a series of "recipes" for photographers to use.
C-41 is an application to help people develop film at home by providing a series of "recipes" for photographers to use.

The app demonstrates how to use Core Data, unit tests, ReactiveCocoa, and Model-View-ViewModel. Pull requests are welcome.
coredata  software_architecture  reactivecocoa  mvvm  testing  is:repo 
august 2016 by cdzombak
Cocoa Samurai: Basic MVVM with ReactiveCocoa
In the MVVM pattern the View Model encapsulates data/properties that the view can bind to and any validation logic and actions that can be performed.
mvvm  reactivecocoa  reactiveprogramming  software_architecture 
august 2016 by cdzombak
ReactiveCocoa and MVVM, an Introduction · Sprynthesis
06 Dec 2014 MVC Anyone who has been developing software for a decent length of time is familiar with MVC. It stands for Model View Controller, and is a proven…
ios  reactivecocoa  designpatterns  mvvm  mvc  apple_iphone_development  cocoa  cocoadev  develop 
february 2016 by evilkarlothian
Asynchronous error handling – Crunchy Development
In a previous article, I talked about error handling in Swift using throw. But what happens when you deal with asynchronous workflows, where throw can’t really…
promise  reactivecocoa  reactiveprogramming  result  rxswift  swift 
february 2016 by evilkarlothian

« earlier    

related tags

afnetworking  apple_iphone_development  arch  bdd  blog  brewfactory  cocoa  cocoadev  collections  comparison  concurrency  core-data  coredata  designpatterns  develop  developer  development  diagrams  expecta  flattenmap  flux  frp  functional  functionalprogramming  himotoki  ifttt  instapaper  interactive  introduction  ios  iosdev  is:repo  lang:swift  littlebitesofcocoa  map  migration  model-view-view-model  models  mvc  mvvm  objective-c  opensource  osx  programming  promise  rac  raywenderlich  react  reactive-cocoa  reactive  reactiveobjc  reactiveprogramming  result  rx  rxjava  rxswift  sample  signal  signalproducer  software_architecture  story  swift  swiftlang  switchtolatest  talk  testing  transition  tutorial  twitter  twitterdev  uikit  uitableview  uitableviewcell  unit-tests  video  view  viewmodel  visualization  xpc  zapier 

Copy this bookmark: