© Fanie Reynders 2018
Fanie ReyndersModern API Design with ASP.NET Core 2https://doi.org/10.1007/978-1-4842-3519-5_6

6. The Configuration Model

Fanie Reynders1 
(1)
Odijk, The Netherlands
 

There’s a saying that goes: “Don’t code hard, hardcode instead.” Terrible, I know. Almost all applications have configuration data. Some of them are neatly saved in a configuration file, and others are just hardcoded in a quick and dirty fashion. By using configuration, we make our code much more reusable and can quickly alter the way it works without our having to think about it.

Configuration data should live outside the application. If you feel the urge to hardcode something, stop and think about the impact it may have on the scalability of the application in ...

Get Modern API Design with ASP.NET Core 2: Building Cross-Platform Back-End Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.