3 ms·
I generally agree with this sentiment. VIPER is terrible except for maybe 1% of projects - and those projects I envision having thousands of developers, dealin
by mephitix 9y ago
I generally agree with this sentiment.
VIPER is terrible except for maybe 1% of projects - and those projects I envision having thousands of developers, dealing with legacy code, and fragile infrastructure.
I've seen companies actively avoid auto-layout and storyboards because "it messes up during merges", so then they turn to ridiculous code-based layout which makes it impossible for designers to work with. However all those storyboard format issues were resolved back in XCode 6 (or maybe even XCode 5). I think XCode 7 introduced storyboard references which allowed devs to work on decoupled storyboards without any possibility of conflicts.
Anyway what I've landed on for production apps is something closer to MVVM: Using Swift's protocol extensions for dependency injection without any frameworks, and having a view interface over the controller for testing business logic. There are other small tweaks, but for the most part, no crazy frameworks, no fighting the system.
I don't agree with the idea that you HAVE to use MVC. You should try out some of these ideas if you have the time/resources and see what works, what doesn't. Make the call based on team/time to market/skills/performance requirements/reliability requirements/etc.
If I'm writing a quick prototype app i'm going M(assive)VC all the way.
- jobu 9y agoVIPER reminds me of the "Enterprise Code" meme. Take a look at the FizzBuzz Enterprise Edition if you're not familiar: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition/tree/master/src/main/java/com/seriouscompany/business/java/fizzbuzz/packagenamingpackage/interfaces https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
- sAuronas 9y agoMVP sans the third-party frameworks works pretty well and is easy to read, maintain and test. I prefer it to MVC, for sure, but if you really wanted to... you could still write lightweight view controllers using a lot of abstraction (and don’t forget to inject your dependencies). I have nothing against VIPER, et al, but I think the author makes some really good points on complexity and the inability to understand your system when you have to rely on some of these architectural patterns.