Analisis Dependency Injection dan Model-View-Presenter Pada Aplikasi Berbasis Android

Kartarina Kartarina(1*),Apriliansyah Apriliansyah(2)
(1) Universitas Bumigora
(2) Universitas Bumigora
(*) Corresponding Author
DOI : 10.35889/progresif.v18i1.781

Abstract

Abstrak. Coupling merupakan salah satu indikator kualitas perancangan perangkat lunak terstruktur dan berorientasi objek. Coupling yang ketat akan sulit dirawat sehingga langkah awal mengendalikan Coupling yang baik adalah dengan menerapkan Design Pattern. Eksperimen penerapan Design Pattern membuktikan bahwa design pattern tidak menjamin pengkodean dapat lepas dari Design Smell. Masalah Coupling pada objek yang berkaitan dengan sumber data adalah ketika objek membutuhkan referensi objek Android Context. Android mengumumkan penggunaan Hilt sebagai standar dalam otomatisasi Dependency Injection. Penerapan MVP dapat membantu pengiriman referensi objek Android Context ke Model. Penelitian ini bertujuan menganalisis lebih lanjut untuk mengetahui hasil komparasi metrik kopling objek dari penerapan Dependency Injection secara manual dan otomatisasi pada aplikasi Android. Penelitian ini menghasilkan, otomatisasi penambahan jumlah kopling kelas pada View dan mengurangi kopling kelas pada Presenter. Selain itu, manfaat dari penerapan Dependency Injection secara otomatisasi mengurangi tanggung jawab Class pada Presenter dan menghilangkan Design Smell atau desain yang kompleks, walau begitu, penerapan Dependency Injection secara otomatisasi mempengaruhi pola MVP yang menggunakan Dependency Injection secara manual.

Kata kunci: Coupling; Design Pattern; Dependency Injection; Model-View-Presenter

 

Abstract. Coupling is one indicator of the quality for structured and object-oriented software design. Tight couplings will be difficult to maintain so the first step when controlling a good coupling is to apply a Design Pattern. Experiments on the application of Design Patterns prove that design patterns do not guarantee that coding can be separated from Design Smell. Coupling problem with objects related to data sources is that when the object requires an Android Context object reference. Android announced the use of Hilt as standard in Dependency Injection automation. Implementing MVP can help pass Android Context object references to Models. This aims to analyze further to find out the results of the comparison of object coupling metrics from the manual and automated application of Dependency Injection on Android applications. The results of the research, automatic increasing the number classes of coupling on the View and reduce class coupling on the Presenter. In addition, the benefits of implementing Dependency Injection automatically reduces class responsibility on Presenter and Design Smell or complex designs, however, automated Dependency Injection implementation affects the MVP pattern that uses Dependency Injection manually.

Keywords: Coupling; Design Pattern; Dependency Injection; Model-View-Presenter

References


M. Fowler. "Reducing coupling". IEEE Softw. vol. 18, no.4, pp.102–4, 2001

H. Melton, E. Tempero." An empirical study of cycles among classes in Java". Empir Softw Eng. vol.12, no.4, pp.389–415,2007.

T.D. Oyetoyan, D.S.Cruzes, R. Conradi. "A study of cyclic dependencies on defect profile of software components". J Syst Softw. vol.86, no.12, pp.3162–82, 2013

B. Walter, T. Alkhaeir. "The relationship between design patterns and code smells: An exploratory study". Inf Softw Technol. vol. 74, pp.127–42, 2016

M. Aniche, G. Bavota, C. Treude, M.A. Gerosa, A. van Deursen. "Code smells for Model-View-Controller architectures". Empir Softw Eng. vol. 23, no.4, pp.2121–57, 2018

A.D. Dennis, R.M. Roth, B.H. Wixom. "Systems Analysis and Design: An Object-Oriented Approach with UML". 2015.

R.C. Martin. "Agile Software Development: Principles, Patterns, and Practices". 2014.

Smartphone Market Share.

Google. Android @ Google I/O: 3 things to know in Modern Android Development.

Dependency Injection.

A.C. Baramuli, A. Nugroho, A.A. Setiyanti. "Implementasi Model View Presenter dan Object Relational Mapping NHibernate pada Aplikasi eStop Card berbasis Web (Studi Kasus: PT. XYZ Jakarta)". J Inform. vol. 8, no. 2, pp. 189-208, 2013

G. Prabowo, H. Suryotrisongko, A. Tjahyanto. "A Tale of Two Development Approach: Empirical Study on The Maintainability and Modularity of Android Mobile Application with Anti-Pattern and Model-View-Presenter Design Pattern". In: Proceedings - 2nd 2018 International Conference on Electrical Engineering and Informatics, ICELTICs 2018. IEEE; pp. 149–54, 2018.

B. Rizki, P. Surya, A.P. Kharisma, N. Yudistira. "Perbandingan Kinerja Pola Perancangan MVC , MVP , dan MVVM Pada Aplikasi Berbasis Android ( Studi kasus : Aplikasi Laporan Hasil Belajar Siswa SMA BSS )". JPTIIK (Jurnal Pengemb Teknol Inf dan Ilmu Komputer). vol. 4, no. 11, pp. 4089–95, 2020;

S.R. Chidamber, C.F. Kemerer. "A Metrics Suite for Object Oriented Design". IEEE Trans Softw Eng. vol. 20, no. 6, pp.476–93, 1994

W. Yusuf. "Metode Statistik". Yogyakarta: Gadjah Mada University Press, 2015


How To Cite This :

Refbacks

  • There are currently no refbacks.