My company is developing a
Java Servlet based program. I came in about halfway through the initial bare-bones development, so some things were already in place.
I'm a little at odds with my technical lead over the issue of property files.
She doesn't want me to hardcode SQL Select statements in my code (exp:
String query = "SELECT * FROM WHATEVER_FILE").
Instead she wants me to write the statement in an external properties file and do this:
PropertyResourceBundle prp = (PropertyResourceBundle) PropertyResourceBundle.getBundle("resources.whatever");
String query = prp.getString("WHATEVER_STATMENT");
I am under the impression that a PropertyResourceBundle creates a collection of Strings. Our properties file has over 110 key / value pairs.
Am I right in thinking that using a property file in this manner is creating a large chunk of objects that are memory-intensive, and it would be more efficient to just use a String in the code?
... and in actuality the properties file isn't even used in a dynamic manner. It's just her way of keeping all the select statements in one place.
thanks,