![Page 1: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/1.jpg)
Software architecture. Letting go of MVCDD, the way to better software by Ursu Dan
Session 4/6 17:00 - 18:00
#Codeway
Dan Ursu, iOS Developer Yopeso
![Page 2: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/2.jpg)
MVC is a delivery mechanism. Not an application architecture
Models are NOT business objects
![Page 3: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/3.jpg)
But everyone said MVC* MVC for delivery. But what do we use
for an app architecture?
![Page 4: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/4.jpg)
What is architecture?
![Page 5: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/5.jpg)
Architectural decisions: - Spring - My SQL - Web System - Python - TomCat web server - Eclipse with it’s plugins
“Architecture is a set of irrevocable decisions which make the foundation of that project”
![Page 6: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/6.jpg)
Architecture screams it’s intention at you
![Page 7: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/7.jpg)
Q: So then, how should a scalable Architecture look like?
A: A good architecture is based on Use Cases.
![Page 8: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/8.jpg)
The use case is agnostic of the delivery mechanism
![Page 9: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/9.jpg)
So many objects?
![Page 10: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/10.jpg)
Wait, isn’t architecture the Database and the frameworks?A: If i show you a system which has a database in it’s center, what will that architecture tell you? What does the system do?
![Page 11: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/11.jpg)
Ok, ok reasonable. But systems do have databases. Where in your Use Case architecture do you put the database?
A: The Database is a detail, an annoying but present detail. The database is abstracted and used by Use Cases.
![Page 12: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/12.jpg)
Ok, i’m lost. How does this all look when combined?Use Cases(Interactors) are at the center. They do the real work using the
network, the database and entities. Everything else is a detail.
![Page 13: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/13.jpg)
![Page 14: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/14.jpg)
Aha! You forgot about MVC. No, not really. MVC jut asks the Interactor to do the heavy work and waits
for it’s response.
![Page 15: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/15.jpg)
Sir, it’s Wednesday and you didn’t say a word about iOS.
Ok. So here is an iOS app architecture for you. Based on Uncle Bob’s architecture. Meet VIPER. Completely TDDoable.
![Page 16: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/16.jpg)
*Sigh* Like I didn’t see enough diagrams already…
![Page 17: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/17.jpg)
Demo
![Page 18: Software architecture. Letting go of MVC | Dan Ursu | CodeWay 2015](https://reader034.vdocuments.site/reader034/viewer/2022042722/58a426781a28abec1a8b6d8f/html5/thumbnails/18.jpg)
More Information
Original Use Case Architecture presentationhttps://cleancoders.com/episode/clean-code-episode-7/show
Code sample for Viper Architecture http://www.objc.io/issue-13/viper.html https://github.com/mutualmobile/VIPER-TODO