Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CodeIgniter: From Zero to Blog in 15 minutes

CodeIgniter: From Zero to Blog in 15 minutes

This is a guide on using CodeIgniter to create a MVC application, using a blog as the basic lesson

Avatar for David Duggins

David Duggins

August 12, 2012

Other Decks in Programming

Transcript

  1. http://www.weatheredwatcher.com We are making a few assumptions: • You already

    have a LAMP stack setup • You are somewhat familiar with PHP
  2. Model • The Model is a class based representation of

    the Data. • Contains Methods for dealing with the data • In CodeIgniter it is optional • But why?
  3. Controller • The Controller is what passes data between the

    view and the model • It is a class based representation of your site • Controllers contain methods for dealing with each page. • Not all methods will display a page!
  4. View • The view is the part of the application

    that the user sees • It is a graphical presentation layer
  5. View <div id="container"> <h1>Welcome to Our Blog</h1> <div id="body"> <?php

    foreach($results as $entry): ?> <h3><?=$entry->title; ?></h3> <?=$entry->entry; ?> <?php endforeach; ?> </div> </div>