Sitemap
2 min readMay 28, 2018

Hello Viktor:

First thank you for your commentaries. I’ll try to explain the reason the url of the API is in a configuration file.

The first thing you should know to understand my reason is that I’m assuming that we are in a big enterprise environment. What I’m trying to say is that the people who implement and maintain the application are different people than those who develop the application. In that environment, a change in the code means, at least, a process of quality control, an increase in the version and an implementation process that, if we are lucky and the company has a really good process of continuous implementation, could lead hours or, what is more common in my experience, could take days. In those environments, having constants in code that depend on other commercial systems that we can not control and, in addition, with values that are critical, is something we can not allow.

Imagine that, we are in this environment and Marvel decide to change the url of their public API. If the url of the API would be in a service inside the app, according what I have seen in the enterprise world what would happen it will be something like that:

  1. The app is down and the system administrator is getting a 404 error because the url are bad so they open a critical ticket for the Product Manager department.
  2. The Product Manager which takes the ticket see the problem and looks for a team who can solve it.
  3. The team receives the ticket and, as it is critical, a developer leaves what he is doing and begins to code the solution
  4. As it is a critical ticket and the change is quite obvious, the revision of the code is omitted but the QA process can not be avoided. The developer sends the ticket to the quality guys to verify that the solution solves the problem.
  5. The QA guys check the automated test, the linter and prove the solution. Everything is green so they increment the version and send the new code to the deploy process.
  6. As this change is critical, the rest of the deployment processes are delayed and the deployment of the new version of the application is initiated.

However, if the data is in a text configuration file, the system team can change it by their own with no deploy process and no increment of version. At the end, in that case, that the data is the url of the API is irrelevant. Which is important is that we are not the owners of that data and we can not control if it changes or not.