If this is in the wrong place then please move it but I have a question about the use of propertie files in very large J2EE applications.
So I noticed where we are pulling a summarized view of another page and some of the field names didn’t match the full page view. I said something about why we weren’t using property files for field names…that was a mistake. I was told that we have 100’s, if not 1000’s of field names in the application and so that was just not a good idea.
Now I suspect that we may have 1000’s of fields but that many actually have the same name (such as ‘start date’, ‘name’, etc) so I suspect that we don’t have 1000’s of unique names…maybe I am wrong. In large scale applications do you guys recommend property files for field names?
I thought it would make maintenance easier as I only would have to change it once but I was told it would make maintenance much harder.
There are many types of applications that use the Java EE and J2EE APIs and do not have GUI components.
That said, for applications that do include a GUI, using one or more properties files to contain label names may be a good design technique. It basically depends upon how the GUI is designed. There are other factors as well when considering this technique. In some cases, when an application is small the extra steps associated with using a properties file may be viewed as "extra" work. When someone comes from this background, they may inappropriately preserve this perspective. For large applications, it typically is a best practice. Hard-coded label names in JSP pages is a sign of a questionable design.