I am trying to get my head wrapped around OOP after programming in more procedural languages for a number of years.My question: What is the best practice for handling variable values outside of source code? For example, I have file directory values and regex patterns that may need to be manually changed from time to time. I would like to avoid changing these values directly in the source code. I am thinking of creating a text file that will hold key/value pairs. I would then create an object to set these values so that they can be referenced by any methods in my code.Is this the right approach or am I violating any OOP principles?Thanks
Best practice for handling variable values outside of source code?
object oriented
Your approach does not violate any OOP principles.If it is the right approach is unanswerable, because there is no the right approach. I can tell you that it is a right approach, but there are always other approaches possible. That said, if it works for you, stick with it.