During my development process I’ve picked up different methodologies on how to implement certain parts of our mobile app. However, I think learning different methodologies can be a double edged sword and I need some help on best practices. In our mobile app we pull our list of locations from our API and display them in a collection view with minimal data(name and city/state). Once you tap a location it then pushes the user to a new page to display all of the locations data. This is where I need some advice.
When the user pushes to the new page, I have a create page variable for the id of the location. Then when the new page loads, an API request is made for the specific locations data based on the id. After that I bind the information to the individual fields. Works fine. However, some things like displaying a pin on a map or creating location object become have to be done in the 200 response of the API call. I guess it’s no big deal but I was wondering if the better way would be to pass everything needed as a device variable to the information page or is the way that I’m doing it the recommended way?
I feel like the way that I’m doing it is better but I’m just not sure of any advantages of one way over the other. I’m probably like most of the developers using Dropsource in that I have enough coding knowledge to make me dangerous and I also don’t enough to also make me dangerous.
Thanks in advance for the feedback.