Might not be a very consequential question, but…
I have a bunch of mostly-static pages: Contact, About, Terms of Use, and about 7-8 more.
Should each of these have their own controllers, or should I just have one action for each?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just consider each item individually. If you think that there is even the slightest chance that the action/view could be required to be more than just static data then break it up now or else you will have to worry about breaking links in the future that your customers/visitors/search engines have saved/indexed and now you will need to possibly maintain some redirects etc.
If you are sure that it will never change (ha who says never) then use one controller with many actions/views. Eg:
This will save your project from a lot of clutter for very basic data assuming that you will have a lot of other code. If the majority of you code is just these pages though you should break it up because there is nothing to clutter up anyways.