4 ms·
The two really cool things about it is that it's declarative (you set up some rules in your -viewDidLoad: and you're done) and it's easy to reason about (e.g. h
by frankus 13y ago
The two really cool things about it is that it's declarative (you set up some rules in your -viewDidLoad: and you're done) and it's easy to reason about (e.g. how an output will vary based on inputs).
But at the same time it's just crying out for some sort interface-builder-style GUI that lets you wire everything up graphically.
My biggest gripe (beautifully illustrated by OP's post) is how un-Apple-like it is at a code level. If you're familiar with standard Cocoa patterns the second code block is quite a bit more understandable.
Finally, in defense of ReactiveCocoa, that code is probably a bit like writing "99 bottles of beer" recursively: it's useful because it's a (relatively) understandable example, not because it's a good use of that programming style. If you start having multiple interdependent network requests, then something like ReactiveCocoa probably starts to come into its own.
- memracom 13y agoInterestingly, it is on OS/X that people are still working on the GUI builder idea, not just for the interface but to entirely replace (or automatically write) the code for an app. Google for Marten IDE to see what I mean. It's a free download but warning... Prograph is a deep subject and if you are mainly an iOS app developer it may be too much, too soon.