I want to get the sage battle-tested advice of the development community about where best to store application-wide settings. I know this has been discussed many times before, (such as here: http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/upsndowns?opendocument ) but I’m having trouble choosing the best option for my particular environment.
The scenario: I’m reworking four Domino applications to handle a changed corporate AD/LDAP schema. At present, the applications have lots of hard-coded references to LDAP DNs, and also to Domino server names, file paths, URLs, support e-mail addresses. All the applications have separate instances for development, test and production, inheriting from the same template, but running on different Domino 5.0.12 Wintel servers. (Yes, I know this is the 6/7 forum, but there’s only tumbleweed in the Domino R5 forum.) All client access, apart from occasional admin work, is via IE browsers.
The applications use a wide variety of code, and these hard-coded settings appear (in decreasing frequency) in LotusScript, Formula Language, Java, and JavaScript contexts.
The plan so far: This seemed like a good place for a profile document. The settings change only occasionally, they’re not user-specific, and when the company next needs to change them it would be good if this didn’t require a Domino developer to spend two weeks scanning the code for references and dependencies.
Some settings are the same across the four applications. Many others are similar (such as database file names) but each application instance would have its own setting. And a few are truly unique to a particular app.
My doubts: Taking these settings out of the code and putting them into data has its downside. They don’t get transferred with design updates, so while all the instances of a particular application can inherit the same settings, I would still need to maintain separate profiles for dev, test, prodn, etc. Also, if the profile were corrupted or removed, much of the application code would stop working.
This started me thinking that database-wide constants might be a better route, because they’re part of the design. But then that would require Designer access (and developer know-how) to modify them, and would be specific to one development language.
And I guess I could take this further and place the constants in an .lss file, which would mean the applications could share common settings, but then this would be tied to particular servers and add a risk of losing the .lss file during server rebuilds, etc.
This was where I started thinking that someone else must have come up with best practise for this scenario already.
So, where’s the best place for my settings, and does anyone see pros and cons for the various approaches beyond what I’ve worked out already?
Rupert Clayton
Chicago