Enum or a properties file for URLs? -


i looking suggestions on best practice declaring urls. property files or enum? edit : use java programming language.

use hardwired constants in java code when don't want users / deployers / testers / tests changing them.

use properties file when want possibility.

the point changing hard-wired constant in application's source code entails editing source code, rebuilding , redeploying. contrast, changing properties file may simple firing notepad.

constants - when don't mind re-compiling application each time change value. sort of irony here. why change if has been called constant :)

properties file - when want luxury of changing value , maybe restarting application pick change.


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -