Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes Programming theory - where is the best place to put code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Programming theory - where is the best place to put code?" Watch "Programming theory - where is the best place to put code?" New topic
Author

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

Karina Guenther
Ranch Hand

Joined: Sep 16, 2005
Posts: 50
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

Joined: Sep 16, 2005
Posts: 50
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
 
Consider Paul's rocket mass heater.
 
subject: Programming theory - where is the best place to put code?
 
Similar Threads
dynamic pagging
JSP without scriptlets
Date
Prototype and script.aculo.us ToC
Using a List for Field Population