Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [configuration]

Configuration is an arrangement of functional units according to their nature, number, and chief characteristics.

0
votes
1answer
46 views

How can I keep a web application easy to self host while still breaking it up in to multiple smaller components

I am working on an open source web application that I will be hosting on my own server and I estimate most users will use that but I also want to easily allow users to run the application themself. ...
0
votes
3answers
54 views

Looking for best practices of storing configurations that will be read/write frequently

I'm writing a couple small python scripts to do tasks and act as 'bots' in some applications that will all read/write things for configuration and some very low-level logging of information; Whats the ...
3
votes
1answer
65 views

Auto-Initializable Objects Pattern

I'm working on a system where we consistently apply "patterns" or approaches such as Dependency Injection. I'd rather not expose the current underlying technology as not to get biased solutions, ...
5
votes
2answers
458 views

Should a class be responsible for its own configuration

In my workplace I am seeing an issue which I feel is wrong, but I am open to the idea that maybe the way I do it is wrong. A minor example would be a class accepting configuration //pull config from ...
3
votes
2answers
61 views

Environment configuration vs domain detection

We are developing an angular 5 application that must run in different environments (dev, qa, int, uat, prod), and connect to different APIs depending on the environment. We have traditionally have ...
1
vote
3answers
146 views

Where to store application configuration

Until now for each of our applications we store application configuration in the same repository as the code that uses the configuration. We have environment specific yml files (dev, test, .., prod) ...
2
votes
1answer
139 views

Where to store config settings in a text file and when in a database?

I have several web applications. All of them have config files. I'm trying to figure out when it's appropriate to store data in a config file and when in database in json or free format? For instance, ...
0
votes
1answer
92 views

Make Docker-based SPA configurable

I have a single page app (Vue JS) that is built and released as docker image. The docker image is based on the official Nginx Docker image and serves the SPA as static content. Until now, there was ...
-1
votes
1answer
36 views

When should you use config transforms rather than compiler directives?

I'm currently working on an application which uses compiler directives to vary settings between environments. Would it be worth refactoring these to use settings in the web.config which will be ...
0
votes
1answer
38 views

CORS handling in application or infrastructure?

What are the cons and the pro for handling CORS in infrastructure or application ? I mean is it better to setup CORS on my nginx/apache/tomcat ? or to handle it by coding in my application ? I have ...
-2
votes
1answer
68 views

What to name my config classes

What name should I give classes which are just for configuration? For example, when using JAX-RS, every application is required to have an Application class which extends the superclass javax.ws.rs....
0
votes
3answers
270 views

What are “orthogonal” environment variables? [12-factor app]

I was reading the 12-factor app while thinking about the design of a personal project. I like a lot of what I read, but the following paragraph confused me: In a twelve-factor app, env vars are ...
-4
votes
2answers
114 views

How to read configuration text files in Java [closed]

I have made a textual minesweeper game (here you can find the program). I want to initialize some data by the help of a file. The file should be readable for humans and easy to modify with a simple ...
1
vote
4answers
115 views

Dealing with settings that will change on a per-environment basis?

We have a bunch of appSettings in our ASP.NET web application, not to mention connection strings, that change on a per-environment basis. Not just for different environments to which the web ...
4
votes
4answers
1k views

Binary data formats, how to make ensure you can read different format versions?

On our project we have this data format that we use to process and record data on. As of late our application changed so that many of the data formats parameters have become obsolete. Currently we ...
0
votes
0answers
55 views

Variable/config/secrets management options

I'm currently transitioning my app from Heroku to a more custom environment (to scale beyond what Heroku can offer) and I'm looking for a solution for configuration and environment variables. Here is ...
1
vote
1answer
66 views

How to manage development credentials vs generic (example) ones?

I am an amateur developper and would like to share some of my code via GitHub or GitLabs. The problem I am trying to resolve is that I have a configuration file with my real credentials (used during ...
2
votes
3answers
352 views

How to manage configuration and state in a program

At my company we have multiple C# programs that use Dictionaries in a config class to keep track of the configuration and state of the program. For example, bool isFoo = config.GetBool("Foo"); ...
-1
votes
2answers
168 views

Should I place #define in separate file?

I thinked at two techniques for my #define : Technique 1 SomeClass.h: #define SOME_BUFFER_LENGTH 256 class SomeClass { /* ... */ }; Technique 2 Config.h: #define SOME_BUFFER_LENGTH 256 #...
3
votes
3answers
2k views

Storing settings in a table in my SQLite database or separately?

I'm building an application which uses SQLite, and now want to add settings that are stored between sessions I'm considering if I'm going to store the settings in a config file or if I'm going to use ...
1
vote
2answers
522 views

Best practices for storing c++ program parameters

I'm currently developing a project which has multiple c++ programs communicating over IPC to each other. Each of these programs will rely on some parameters to run and these may be common to several ...
2
votes
2answers
159 views

Is it crazy to move deployment logic into test suite …?

We're using (and loving) the jest test framework. Most of our tests are nice compartmentalized good-code-hygiene style unit tests. However we've also written some service level tests (setting up ...
0
votes
1answer
101 views

For Qt, or C++, do modern standards or practices exist for designing Run Configuration files for your programs? [closed]

Backstory I am building a daemon that is to be run in the background on systems based on X11. As of right now, the settings are hardcoded, and that obviously needs to change. As such, I plan to ...
69
votes
6answers
14k views

How bad of an idea is it to use Python files as configuration files?

I've always used JSON files for configuration of my applications. I started using them from when I coded a lot of Java, and now I'm working mainly on server-side and data science Python development ...
2
votes
1answer
60 views

Should I place my app configurations in a JSON file or in a JS module?

I am building a JavaScript application where its behavior (some rules and logic) is configurable via JSON. The configurations are deploy only with a new version of the app. Currently my app, when ...
0
votes
2answers
74 views

How to use functions based on configuration?

let's say that I am working with an IoT device. The device can have many sensors, each of them has an address, i/o direction and a reading method. temperature=d2,input,digital humidity=d3,input,...
2
votes
0answers
83 views

Strategies to manage unruly system environments

In our IT dept we develop multiple systems in parallel, the systems are deployed to different environments, and they talk to each other using SOAP and REST. It's all ASP.NET but we're not in the cloud....
2
votes
1answer
468 views

Custom language with mixed markup and Python, parsing in Python

I need a system for creating Python subclasses in a simple manner, and I was thinking of using a (custom) config language similar to json, xml, etc. Here's the initial structure I thought of (one ...
1
vote
1answer
59 views

Who should read an external resource

I am often in the following situation: I have a config file, specifying the path to a resource file This config file gets parsed and the values (e.g., file path) are stored in a ConfigStore object A ...
0
votes
0answers
565 views

Best practices for configuration files in global (or globally required) variables

A common pattern I use on my nontrivial programs is to have a class that parses out a config file (usually YAML), and makes the items in the values in the config available as properties on the class. ...
6
votes
2answers
774 views

Should I configure my URLs with a leading and/or trailing slash?

Maybe too basic of a question but wanted to see if there is more to it than I am thinking. When configuring URLs (baseUrls, like https://my.app or relative URLs like /path/to/resource) either as a ...
1
vote
2answers
431 views

Creating a singleton to access static data

I have some properties in a property file that I referenced in a singleton so that I can access them easily from different parts of my application. For each property, I put the properties along with ...
10
votes
3answers
854 views

How to properly handle global parameters for unit testing in python?

We are implementing many algorithms which typically have lots of shared, publicly known and security-relevant parameters. Currently, we simply use a class holding all the parameters and two ...
3
votes
3answers
295 views

Is it fine to trap users in a dialog until they enter valid values into components? [closed]

Assume I have a modal dialog where I allow the user to change values of an encapsulated configuration through different UI components and I want to save the effort to implement a validation per ...
9
votes
2answers
291 views

Effectively tracking changes to configuration from dev to prod

This question takes a Spring Boot service as an example, but it could be any technology. Assuming the following: Environments (dev/QA/prod) are owned by different teams. This means dev must not have ...
5
votes
1answer
252 views

Deciding what values should be configurable

My application is a Java program that controls a robot (which is essentially a raspberry pi hooked up to a lot of devices). There are many devices on the robot that have semi constant address values ...
13
votes
5answers
690 views

Best practices for handling large number of structured configuration/property files

Imagine a system that has a large number of servers. Each of them has a number of settings: Some specific to the server Some specific to the region Some common across all of them Maybe you can have ...
3
votes
1answer
293 views

Configuring entity behavior DDD

In one of the products I work with we have an aggregation root with a lot of domain logic, and now I have a requirement to make one small piece of behavior configurable. To give an example, let's say ...
3
votes
2answers
281 views

How to write System requirements - not all architectures fulfill all requirements

We have a system that is largely configurable, that can be organized in different architectures, and I'm struggling to write its requirement specification. I'll give an example Module 1 does A Module ...
3
votes
6answers
249 views

Configuration object vs function

I'm designing a configurable api and I've seen a few ways to accept options from the caller. One is using an options object like so: var options = new MyApiConfigurationOptions { Option1 = true,...
0
votes
1answer
389 views

Does C# project with configuration file only seem to be an architecture flaw?

I have multiple related projects in one Visual Studio C# solution, which in general have similar architecture of WCF business logic services and ASP.NET clients. In order to host these services, I ...
1
vote
2answers
3k views

Is it a good programming practice to store java properties keys in ENUM for validation once application starts?

Sample Java properties file which is read by the properties class appl.component1.property1=value1 appl.component1.property1=value2 Custom class which extends the java.util.Properties class adding ...
4
votes
2answers
2k views

Should I use Lua for writing config files?

I heard that Lua is great for configuration files, so long as you are secure about it. Lua has been used as config files by programs such as awesome and (recently) conky. However, I also heard that ...
5
votes
5answers
584 views

What Semantic Version increment to use for a configuration file alteration?

Using Semantic Versioning, I have a product that is version 1.0.0. It has a configuration file entry shipped with the product that specifies an operation timeout value: myTimeout=1000 I need to ...
0
votes
1answer
56 views

What are data format providing structural information? [closed]

I have a built a toy server framework that provides very extensive configuration options. In configuration, one can for example define instances of modules with each providing generic options, such as ...
0
votes
0answers
42 views

Typical Practice for external application config

I have a C# cmdlet(1) that uses "ConfigurationManager.AppSettings" to get database connection strings necessary for some stored procedures used in the cmdlet(1). If another application instantiates an ...
8
votes
3answers
472 views

DI/IoC container vs factories: Where do I configure my application and why?

I am trying to figure out when to use the DIC/IoC registry for configuring my software and when to use factories, along with the reasoning behind either approach. I am using StructureMap as my DI ...
0
votes
2answers
241 views

Best Practice for supporting multiple login configs across Environments

This question has more to do with the structure and access of different configurations across a number of levels of development. What I mean by 'levels of development' is environments where the ...
1
vote
1answer
314 views

ASP.net using Resource (resx) for Configuration

Let me start with the fact that I'm prepared for this question to be closed as opinion based, but I am going to attempt to phrase it in such a way to keep it less based on opinions. The Short Version ...
1
vote
1answer
80 views

Why store app configuration in a data file instead of code esp. when using Continuous Integration?

Consider the following CI procedure is in place: Builds are only deployed (semi-)automatically. All changes are version-controlled. Configuration is fixed per environment. Why use data files (*....