[eluser]PG-Tips[/eluser]
Hi,
I'm new to MVC and Codeigniter and am wondering about a best practice and if anyone can advise.
As an example, I have three pages, which have content stored in a db.
-About us
-Contact (with HTML form and response)
-News
Before CI and MVC I would likely only have had one HTML view and I would have either stored some HTML in a db record or would have built some HTML on the fly in my functions page.
As I understand MVC, the idea is to have HTML only in the views pages, (correct?) but doing so for the above means I end up with 3 views pages instead of one, and as the differences between the pages are trivial in terms of formatting this seems like a lot of updating to do if ever I need to modify my page appearances.
So the question is, is it correct/better to have lots of view pages than to do a bit of HTML generation in the controller or store HTML in the database? I find it hard to see any advantage in the example above, but the term MVC would suggest that it is.
Many thanks,
Pat