protocol oriented programming
TRANSCRIPT
![Page 1: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/1.jpg)
Arif Akbarul HudaCoding | Writing | Sharing
2013-now QISCUS & Univ. Amikom Yogykarta
Twitter : @omayibMedium : www.medium.com/@omayib
The P.O.P implementation
Modular is Better
![Page 2: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/2.jpg)
Functionality
Reliability
Usability Efficiency
Maintainability
0
5
10
The High Quality Software Criteria(ISO 9126-1 software quality model)
*i was ignore the Portability factor
![Page 3: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/3.jpg)
Maintainability
“Maintainability is impacted by code readability or complexity as well as
modularization” ..
“Also the ability to verify (or test) a system, i.e. testability, is one of the
subcharacteristics of maintainability. “
![Page 4: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/4.jpg)
5 Principlesto meet maintainability criteria
![Page 5: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/5.jpg)
Loose coupled is better
![Page 6: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/6.jpg)
The Reality
![Page 7: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/7.jpg)
With a simple case
![Page 8: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/8.jpg)
Reality
Inside a UIViewController …
● Managing data from local remote● Managing data from local cache● Managing TableView and its DataSource● Managing UIViewController‘s state● Managing progressViewHUD‘s state● Managing other...
![Page 9: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/9.jpg)
Reality you are breakfest with a spagetthi code
![Page 10: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/10.jpg)
View
Controller
Model
XxProgressHUD.show()
XxProgressHUD.hide()XxProgressHUD.show()
Decentralized : A Bad Practice
![Page 11: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/11.jpg)
![Page 12: Protocol oriented programming](https://reader031.vdocuments.us/reader031/viewer/2022030318/5a688e077f8b9a4a258b5ed1/html5/thumbnails/12.jpg)