Structuring several mostly-static pages in ASP.NET MVC -
might not consequential question, but...
i have bunch of mostly-static pages: contact, about, terms of use, , 7-8 more.
should each of these have own controllers, or should have 1 action each?
thanks in advance.
just consider each item individually. if think there slightest chance action/view required more static data break or else have worry breaking links in future customers/visitors/search engines have saved/indexed , need possibly maintain redirects etc.
if sure never change (ha says never) use 1 controller many actions/views. eg:
http://yoursite.com/home/contact http://yoursite.com/home/terms http://yoursite.com/home/about etc...
this save project lot of clutter basic data assuming have lot of other code. if majority of code these pages though should break because there nothing clutter anyways.
Comments
Post a Comment