Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

text messages

 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another question on ways people have done something... text messages (like for messages to the user).
1) Just put them in the code
2) Have one big constants java file with the messages
3) Text file like an ApplicationResources.properties file (we use them with our struts code)
Thanks again,
 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am wondering as well. Indeed i used the properties file and constant java file approach. The constants file contains all static final keys to the properties file (Including methods for getAllProperties, saveProperties(properties) and getProperty(key, default))
If properties are not there then obviously the default is returned, which is hardcoded.
But i am not sure on this approach, seems like a lot of overhead. On the other hand, it is very easy to change the message or to add another error code and message.
Like i said i am not sure so i am also interested how other people have done this.
 
Robin Underwood
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it's OK to leave text messages in the code. That's what Sun did in its Data class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic