Welcome Guest, Not a member yet? Register   Sign In
Beginner confused with CI 2.0 Pagination
#4

(This post was last modified: 06-15-2015, 01:19 AM by RogerMore.)

CodeIgniter is based on the MVC (Model-View-Controller) development pattern. This pattern dictates that data, html and logic should be separated, but with CI it is possible to derive from the pattern. You can put database queries in a view if you really want, but it's certainly not the best way of doing things.
So here it goes...
Models are classes with methods to retrieve, insert and change your data.
A view is a (part of a) webpage.
The controller hold most of the logic, where you call a method of the model to retrieve your data, which you can give to a view to display it on a webpage.

There is a section in the documentation about this which you can find at:
http://www.codeigniter.com/user_guide/overview/mvc.html

Hope this clarifies things.

-Roger
Reply


Messages In This Thread
RE: Beginner confused with CI 2.0 Pagination - by RogerMore - 06-15-2015, 01:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB