Is it acceptable to create large static resource files? For example:
public class Resources {
public static String STRING1 = "xxx";
public static String STRING2 = "xxx";
...
public static String STRINGN = "xxx";
}
I want to have a large file that will have a list of all of the strings that the application will use. Will this cause problems? I’m not entirely sure how static classes are held in memory, so I don’t know if this causes memory issues. Is it too “ugly” or not good form? Is there a better way to do it?
I would save language files and such things in the filesystem as plain text (or some special format). Then you can change the text, etc. easily. Then you can write a static class (LanguageFactory) to get your strings.
Example language file:
LanguageFactory: