When implementing the VIPER pattern as described in objc.io, should care be taken to hide ReactiveCocoa as an implementation detail?

The tutorial on http://www.objc.io/issues/13-architecture/viper/#using-viper-to-build-modules was very instructive, and while none of this is groundbreaking, I thought it was well done.

The author suggested that the glue between the layers should be a library ReactiveCocoa

. I downloaded this via CocoaPods

but I am a bit stuck. I cannot find an example ReactiveCocoa

+ of the VIPER template.

My question is, should I a) not expose the classes ReactiveCocoa

in my interfaces, b) expose them because of their relevance, or c) not worry about it?

Compare a and b examples of my DetailsViewInteractorInputOutput.h

/* Eg A */

@protocol DetailsViewInteractorInput<NSObject>

- (void)requestDetails;

@end

/* Eg B */

@protocol DetailsViewInteractorInput<NSObject>

- (RACSignal *)requestDetails;

@end

/* Eg A */

@protocol DetailsViewInteractorOutput<NSObject>

- (void)foundDetails:(MyDetails *)details;

@end

/* Eg B */

@protocol DetailsViewInteractorOutput<NSObject>

- (RACSignal *)foundDetails;

@end

      

+3


source to share





All Articles