MVC Right separation for functional component
I am building a Web application that allow people to subscribe to certain classes which are divided by semesters.
In one of my interface I have a list of all activities that act as a summary in the backend interface. I was looking to group them by semester and browse through a sequential navigation.
My problem is, where should I put my code since I want it to be easy to maintain and I want to respect the right MVC structure.
Here are my Ideas:
Get the param value in the controller, get the previous and next semester through an
action helper, send the data to the view and then display itor
Get the param value in the controller, sent it to the view, let the view (through a
view helper) find the previous and next semester and then display it
I have a class that is able to find the sem开发者_如何转开发esters through calculation (so it's not in my models)
The first option. Your question is unclear to me, but your first option sounds the closest to what I would do.
精彩评论