When using the VIPER pattern, what are examples in source code of the downside impacts of applying the VIPER pattern to only some views & view-controllers but not all? Conversely, what are examples in source code of the upside advantages of applying the VIPER pattern to only some views & view-controllers but not all?
Asked
Active
Viewed 82 times
0
-
The short answer is: yes. The main purpose of VIPER software architecture is to make the source code for an entire app/executable/product/product-line to be compartmentalized to have non-UI portions, UI portions that are portable across all UIs, different navigation for dissimilar families of UIs (e.g., single-screen mobile devices as one family; windowed desktop computers as a different family; dual-screen mobile devices as a different family), UI portions that are highly specific to one vendor's UI technology. – Andreas ZUERCHER Nov 29 '20 at 16:35
-
And given that most UIs are walled gardens of incompatible underlying API presentations and underlying programming languages, when we say UI here, we also mean 1) the lack of XAML on non-Microsoft platforms, 2) the de facto lack of Swift on non-Apple platforms, 3) the lack of native programming languages' UI on Android but JVM-languages for UI bridging over to native languages (or in Xamarin Android: native UI bridging to JVM to invoke UI), 4) the lack of COM-based full .NET UI framework on non-Microsoft platforms, 5) the lack of .dylib-based Swift/Objective-C framework on non-Apple platforms. – Andreas ZUERCHER Nov 29 '20 at 16:37
-
Taming those disparate walled gardens is what VIPER is all about in VIPER's full fruition (although VIPER could conceivably be utilized within a single walled garden to insulate the app from Apple's or Google's or Microsoft's changes to the framework over the years without any interest in inter-walled-garden portability, merely intra-walled-garden future-proofing). – Andreas ZUERCHER Nov 29 '20 at 16:37
1 Answers
1
Basically, VIPER module can be one screen or the whole user story of your application — think of authentication, which can be one screen or several related ones. How small are your “LEGO” blocks supposed to be? — It’s up to you.

Catherine
- 654
- 5
- 15