Wherever possible, the names used in configuration files should match variable names used in the configuration class.  Take the following XML configuration file for example:

 <?xml version="1.0" encoding="UTF-8"?>

The model class that the values are loaded into has exactly the same names.

public class MyappConfig
    private boolean showAdvancedFeatures = true;
    private List<String> validDomains = new ArrayList<String>();
    private List<String> validIpRanges = new ArrayList<String>();

To ensure related entities can be easily correlated by developers, the same rule applies everywhere.

blog comments powered by Disqus