Welcome to the second installment of the series entitled “Building a blogger with the Code Igniter PHP framework.” Made up of four comprehensive tutorials, this series walks you through the development of a database-driven blogger by means of this useful package. It complements the corresponding theoretical concepts with numerous code samples.
Code Igniter is a powerful PHP framework that allows you to build object-oriented web applications very quickly, by using the Model-View-Controller approach. Indeed, this software package comes equipped with a robust set of classes and helpers that will let you develop anything that you can think of, from simple web form processors to full-blow database-driven programs.
So, if you’re interested in learning how to take advantage of the impressive capabilities of Code Igniter, and develop a MySQL-based blog application, then don’t hesitate -- start reading this article now!
With the preliminaries out of our way, it’s time to briefly review the topics that were discussed in the previous tutorial. As you’ll surely recall, during that article I demonstrated how to build a basic blog application with Code Igniter, which only required us to code two files, namely the corresponding controller class and a simple view file.
In this initial stage, the controller in question had a rather limited functionality, since it was only capable of displaying a bunch of blog entries that were previously stored in a MySQL table. Logically, the blog application in its current incarnation needs to incorporate some additional capacities, such as providing users with the ability to post comments on each particular entry, improve its visual presentation, and so forth.
But as you may guess, all of these characteristics will be introduced progressively in successive chapters. Nevertheless, in this second article of the series, I’ll be explaining how provide the controller class built in the preceding tutorial with the capability for paginating blog entries.
This specific process will require using the pagination class that comes included with Code Igniter, so don’t waste more time; start reading the next few lines. Fun is already guaranteed!