Can you show me three controllers please?
Posted: Wed Oct 21, 2009 3:30 pm
Just curious, many of us who use MVC frameworks commonly implement our controllers quite differently, assuming we try and separate concerns by keeping models, views and controller code separate.
Would you be willing to show me 2 or 3 controller action methods, from one of your projects?
Specifically I'd like to see one that generates a complex view, one that creates a record in a database and post's back to original form and lastly, if possible, an action which builds the form to submit requests to the previous action.
Hopefully this isn't asking much, but I'd like to get a feel for what controllers look on average and possibly avoid pitfalls I am probably making in my own controllers.
psudo code is fine but make it realistic, please.
Cheers,
Alex
Would you be willing to show me 2 or 3 controller action methods, from one of your projects?
Specifically I'd like to see one that generates a complex view, one that creates a record in a database and post's back to original form and lastly, if possible, an action which builds the form to submit requests to the previous action.
Hopefully this isn't asking much, but I'd like to get a feel for what controllers look on average and possibly avoid pitfalls I am probably making in my own controllers.
psudo code is fine but make it realistic, please.
Cheers,
Alex