Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Programming theory - where is the best place to put code?

 
Karina Guenther
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The 2 problems I have are:
1. need to set a default start date and calc and end date for my page.
I can put this as jsp function on the page or put it in java code. I'm using spring so if in the java code should it be in the controller or in the object as a getter / setter with a calculation?

2. drop down hard coded list of values:
should this be an enum list in the object or in the controller? I can also put the values in a properties file. Having them as a table look up is not an option for me at this time due to time and design constraints.

What does best practices suggest for each of these?

 
Karina Guenther
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh by the way - the end date needs to be 90 days after the start date. And it needs to be editable by the user
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic