When using custom entities (aka business entities, domain objects, business objects, entity objects) how should you get totals to display on a page? Take the hypothetical simple example of system that tracks users and the number of miles they have run on a given date.
pseudoclass RunEvent {
public Date;
public UserName;
public NumberOfMilesRun;
}
And you display a list of these in a gridview like:
6/1/08, Jen, 7 miles
6/1/08, Mark, 5 miles
6/2/08, Roger, 6 miles
etc.
If you want to display the total number of miles run, should you handle this in the database, in business classes, or in the UI layer?
...
Go to the complete details ...