Skip to content

Commit a4610e3

Browse files
authored
Update README.md
1 parent 7c106c7 commit a4610e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ MVVM involves a data binding approach to make code short and reduce view handlin
3333
<br>
3434
**Choice of a correct architecture** for the project involves the understanding of the modules which needs to be developed. Some functionalities works great on MVC, some with Mvp and some with Mvvm. It is quite difficult to debug projects made on MVVM which doesn't have one sided data flow due to data binding and live data. If an application receives continuous data from a source, needs a regular UI update and has majorly(80–90%) one sided communication(eg: sending logs from electronic devices to android app) like solar-cell, inverters, or any device's status monitoring can work well with MVVM due to **live data** - UI update. Debugging these MVVM applications can be easy as **major flow of data is one sided**.
3535

36-
MVP is a good approach for writing android projects when we are concerned about testing the bussiness logic w.r.t unit testing via JAVA test frameworks(Not Android). Since **JAVA test framework** will only resolve java dependencies and a clean presenter layer is free from android related dependencies like context, sharedpreferences, or any other **com.android.*** package. Drawback of MVP is that it ends up writting **20-25% extra code** with the same functionality written in MVC or MVVM. Mvp is good if you are really interested in test cases and unit testing of modules.
36+
MVP is a good approach for writing android projects when we are concerned about testing the business logic w.r.t unit testing via JAVA test frameworks(Not Android). Since **JAVA test framework** will only resolve java dependencies and a clean presenter layer is free from android related dependencies like context, sharedpreferences, or any other **com.android.*** package. Drawback of MVP is that it ends up writing **20-25% extra code** with the same functionality written in MVC or MVVM. Mvp is good if you are really interested in test cases and unit testing of modules.
3737
For MVP using java test kits just make instance of presenter and run test functions.
3838
<br> <br>
3939
eg: **new Presenter().testSomeFunction()**.

0 commit comments

Comments
 (0)