Should sorting logic be placed in the model, the view, or the controller?

Viewed 15055

I have a drop down list that displays values from a table to the end user. I would like to have these values be sorted alphabetically.

According to proper MVC design, at what layer should I place my sorting logic: the model, the view, or the controller?

EDIT: In response to LarsH's question, "Do you mean code that determines what sort order is desired? or code that performs the sort?", I was originally referring to the code that determines what sort order is desired.

12 Answers
Related