Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Just a suggestion, but maybe make a framework out of it. (Framework as in iOS frameworks. Haven't worked with Android, yet). Or maybe a NetworkManager superclass with lots of APIManager subclasses, divided by category, that contain functions that make the calls. (The NetworkManager is there just so you don't have to write the logic to actually make the request and parse the data).
-
Never mind me, already got my answer here: https://developer.android.com/topic...
Thanks for your help @notSoSerious :) -
@gitpush I would combine both those functionalities in the same class and name it "NetworkInterface" or something just so that the classes don't look too small 😝. But each of us have different preferences. So long as it works, and you think future you will be able to understand it, you're good👍.
-
@notSoSerious I hope future me understands present me lol it is for a side project, lets hope for the best :D
Related Rants
rant == false && help == true
I usually don't like posting non rant stuff here but I need help.
How do you usually design your service communication class?
I am working on a mobile app which contains talking to a REST service, I usually put all network calls in one class. Down side if it becomes a big class it becomes a pain to maintain. Any thoughts?
For a backend service I usually go with Repository design and it is working out well for me. But for mobile Apps I'd like to see if there is a better approach
undefined
help
android
ios
rest
structure