Offline Development Strategy

Hello everyone.

In my development process, I usually do this:

  • Create the app with hardcoded data
  • When the api is ready, update the app to consume data from the server

The problem I face after the the implementation to consume data from the server, I usually become dependent with the api. For example, I need to ask api dev to create user with specific role for example, or asking qa team to create certain data (sometimes I don’t really understand how to work with the dashboard), etc.

I could use fake data by commenting some lines and then create the object I need, after that I remove the hardcoded lines and call the api to get real data. But, I think it’s not ideal, especially when the data I need depend on other data. There must be a better way of doing it. Could help with a solution with this problem?

Thank you in advanced.

Hi @lobothijau,
You are on the right track with the strategy you use. You could also consider using tools like a mock server or running a simple Flask/express/Vapor service that returns data to you instead of hardcoded data.

I am not sure I understand your question well,

But, I think it’s not ideal, especially when the data I need depend on other data. There must be a better way of doing it.

Other than that, I think you are doing well

What I mean is that when I need an object, sometimes I need to make other object. If the other object are too many, thatn I need to write more hardcoded values. I read about mockwebserver, but it seems only for testing.

Creating a mock server with express seems like a better solution, because sometimes we need to change app implementation but the api is not ready yet.

This topic was automatically closed after 166 days. New replies are no longer allowed.