lnt-nishantdande / Practice-Android

0 stars 0 forks source link

Clean up Retrofit dependency #1

Open nets-dev opened 3 years ago

nets-dev commented 3 years ago

Third party dependency (in this case Retrofit) must be managed cleanly. The template project contains API.kt and RetrofitAPI.kt to assist in managing Retrofit dependency and limit its use to the concrete RetrofitAPI implementation. If one chooses to replace RetrofitAPI concrete implementation with another concrete implementation e.g. using Ktor, the project should remain unaffected. Keep this in mind and try to clean up the dependency, starting with avoiding any retrofit import in API.kt or any file other than RetrofitAPI.kt file. Do you have any question on this? If not, can you confirm if you have understood the point? @lnt-nishantdande

lnt-nishantdande commented 3 years ago

@nets-dev Thank you for your comment. Please correct me if I am not wrong, I have to remove the Retrofit library dependency from the API.kt file and manage it inside the RetrofitAPI.kt file. So In the future, if suppose we want to implement another networking library we have to just replace the RetrofitAPI.kt file with the new file. Please let me know if I understood it correctly.

nets-dev commented 3 years ago

@lnt-nishantdande Yes, you got it 👍 Apply this change in a separate branch and create a pull request. Make sure to add nets-dev GitHub account as reviewer. We'll review the rest of the project and raise issues like this if necessary or ask questions in the code. Can you actively participate by replying to such comments promptly like you have done now?

lnt-nishantdande commented 3 years ago

@nets-dev I have modified the codebase as per the review comment. Please check and review the pull request from the below link - https://github.com/lnt-nishantdande/Practice-Android/pull/2