markohlebar / BIND

Data Binding and MVVM for iOS
MIT License
354 stars 48 forks source link

Remove features that are not commonly used #15

Open markohlebar opened 9 years ago

markohlebar commented 9 years ago

It seems that the usage really boils down to BINDViewModel and BIND. In terms of simplifying the interface we should trim unnecessary features like shorthands BINDSL, BINDSR, BINDOS and BINDS which clutter the DSL and autocompletion.

benvium commented 9 years ago

I find myself using BINDO quite a lot, especially for marking computed properties as requiring updating.

For example:

[BINDO(self, quantity) observe:^(id observable, NSNumber *value, NSDictionary *observationInfo) {
            [self willChangeValueForKey:@"canDecrement"];
            [self didChangeValueForKey:@"canDecrement"];
        }];
...
- (BOOL)canDecrement {
    return self.selectedItem.quantity > MIN_AMOUNT;
}

.. though I'm sure the above could be achieved in a different way.

markohlebar commented 9 years ago

@benvium good shout! BINDO is pretty useful I agree. I think shorthands are a waste of space though :) I don't want to be precious about features and maintain stuff that nobody uses.