A journey from MVC to VIPER is a try to leverage different application architectures (as well as some concepts on top of MVC) to build more clean and readable software in Cocoa. Most of the described techniques can be successfully used while dealing with legacy codebase.
19. Controllers
Use Cases
Entities
Presenters
Gateways
UI
DB
External
Interfaces
Devices
The Clean Architecture
Enterprise Business Rules
Application Business Rules
Interface Adapters
Frameworks & Drivers
Web
Controller
Use Case
Interactor
Presenter
Use Case
Output Port
Use Case
Input Port
Flow of control
<I>
<I>
http://blog.8thlight.com
23. Controllers
Use Cases
Entities
Presenters
Gateways
UI
DB
External
Interfaces
Devices
The Clean Architecture
Enterprise Business Rules
Application Business Rules
Interface Adapters
Frameworks & Drivers
Web
Controller
Use Case
Interactor
Presenter
Use Case
Output Port
Use Case
Input Port
Flow of control
<I>
<I>
http://blog.8thlight.com
34. • encapsulate small pieces of business logic
• use case approach (form validation, login user)
• hookable via &
• reusable
Intentions
Architecture is about Intent “Uncle Bob”
IBOutlet IBAction
43. User Story #90.10 - Login
• A. When I as a user open the app the first time I
enter the “main login” page, where I need to login
with my username (email address) and password.
• B. When I tap the “login button” while online and no
errors occur I’m moved to initial page with users
profile.
44. User Story #90.10 - Login
• A. When I as a user open the app the first time I
enter the “main login” page, where I need to login
with my username (email address) and password.
• B. When I tap the “login button” while online and
no errors occur I’m moved to initial page with users
profile.