Design Patterns / Application / Product Configuration Guidelines

I was wondering if there are any design patterns, recommendations or documented widsom / best practices for creating the structure, data and configuration files of the application. I understand that these issues have been partially addressed by some reports, but I hope that the following questions will suggest a topic from another aspect.

  • Basically, what kind of analysis goes to create a configuration structure?
  • What forces play, which need to be considered?
  • When the analysis / creation of the application configuration is performed; Is this an idea or a continuation of the main project activity (dictated by the design of the application) or is it interdependent with the main design and its own structuring / architecture forces?
  • What are the pros and cons for structuring configuration data in some way, and not in another.
  • What requirements do you need to consider or know (flexibility, the possibility of redefinition, lack of duplication, choice, ...)
  • What is the price paid when developing poor application configurations?

In particular, I am interested in developing a hierarchy of configuration settings.

Are there any real projects there with a sufficient level of complexity, whose configuration can be studied?

My question is not aimed at the format or type of files (whether to use the ini plane, or json, xml, ...), but how to get to the configurations first.

thank

+4
source share
3 answers

( , ) . , ; ( , UAT, ); , , . , :

  • , .
  • , .
  • , , .

, " , " . , " " . .

Config4 * ( : Config4 *), , "if-then-else" "include", = . 2 (HTML) 3 (HTML) Config4 * Getting Started Guide (PDF), API. , Murphy Law , , , Config4 * (, XML Java), Config4 * . , , , Config4 * .

- "" , , . , ${foo}, .

serverName  = "${serverName}"
listenPort  = "${serverPort}"
logDir      = "/data/logs/${serverName}";
idleTimeout = "5 minutes";
workingDir  = "/tmp";

, , , , , -to-run . , 2000 60 , 100 000 . , , 50 , , , , , . , Apache Velocity.

, , . , . , , . Config4 * ( 3 ). JSON. , , XML, , , .

0

( ), /. , , .

( , , ..). - ( ) , , , . , .

(, ). . , . 2 . - (, , ..), - - , (url, db password ..)

. . ,

0

, Ciaran McHale, , , . , . , - , . , , , - , : , . , , : , , , . , , , . , , : , .. , - . , . , Apache conf . , , , , , , : - , . - .

0
source

Source: https://habr.com/ru/post/1569184/


All Articles