File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes Propertie Files in J2EE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Propertie Files in J2EE" Watch "Propertie Files in J2EE" New topic

Propertie Files in J2EE

Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 195
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.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
"very large J2EE applications"

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.
I agree. Here's the link:
subject: Propertie Files in J2EE
It's not a secret anymore!