MVC is a means of organizing a dynamic website. The design pattern has been around since 1979 when it was first described by the Norwegian, Trygve Reenskaug. Here's an outline of the different types of files:
Models are objects, which represent the underlying data. They hover above the database and access it as required. They can also perform operations on data to add meaning to it.
Views show the state of the model. They are responsible for displaying information to the end user. (Although they are normally HMTL views, they might be any form of interface. They might be views specially adapted for small PDA screens or WAP telephones, for example.)
Controllers offer options to change the state of the model. They are responsible for consulting models. They provide the dynamic data to views.
CI has subfolders for models, views
, and controllers
. Each file within them is a .php
file, usually in the form of a class that follows certain naming conventions.
CI helps you to follow...