Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Block based KVO: Block-KVO vs THObserversAndBinders vs KVOController [closed]

Block-KVO vs THObserversAndBinders vs KVOController.

What are the pros and cons of each? Which one is better and why?

UPDATE: In the end, I'm leaning towards using Objective-Chain for processing KVO. ReactiveCocoa is an option too, but maybe too overboard for this.

like image 854
Ricardo Sanchez-Saez Avatar asked Jul 10 '14 16:07

Ricardo Sanchez-Saez


1 Answers

First of all, let me just say that this is a prime example of a subjective question that probably should not be asked here—you're clearly a well established member here and I'm sure you knew that already.

But since you asked, I'll try to answer your subjective question as unsubjectively as possible—while it's not the best question for Stack Overflow, it is a good question overall, and I'm sure a few Googlers will end up here looking for an answer, subjective or not!


First of all, if your only/main complaint about KVO is the syntax (as you mentioned in a comment on your question), don't go for Objective-Chain or its inspiration, ReactiveCocoa. While they have an incredible amount of usefulness, neither is worth their weight or complexity just for a more accessible KVO syntax.

Of the three libraries you mentioned to begin with, the one that pops out the most is KVOController—between the straightforward syntax and being upfront about thread safety, you can let the large number of GitHub stars speak for themselves. This is my recommendation of the three options originally posted.

The other options, which also seem lightweight and feature great syntax, do have their own merits as well—Block-KVO is the only option of the three to sport the MIT license instead of BSD, so if that's a preference of necesity for your project, keep that in mind—and THObserversAndBinders, despite not being updated since late 2013, features great documentation and a lack of Facebook ownership, if that's your thing too.


Hopefully that should give you an objective list to help you choose your best option—and be sure to keep it less open next time :)

like image 124
username tbd Avatar answered Sep 18 '22 02:09

username tbd