Introduction to CodeIgniter - Funkatron

5 downloads 190 Views 12MB Size Report
Why not CakePHP or Zend. Framework or Limonade or. Symfony or Solar or Kohana or Zoop or Yii or Akelos or. PHP on Trax o
Introduction to CodeIgniter Ed Finkler • http://funkatron.com • @funkatron codeworks09

Thee Agenda Why CodeIgniter? The CI MVC Model CI Basics Running CI out of the box Making a basic web app Making a web api

http://www.flickr.com/photos/alternatewords/2332580309/

Why CodeIgniter?

Why not CakePHP or Zend Framework or Limonade or Symfony or Solar or Kohana or Zoop or Yii or Akelos or PHP on Trax or Prado or Seagull?

Because you've gotta pick one, dammit

All of them have value

That being said, CI is… Easy to understand Simple doesn't require advanced OOP Doesn't force lots of conventions Plays well with others Quick to get up and running Good docs and great community Backed by invested entity (http://ellislab.com)

CodeIgniter MVC Implementation

More like "Passive View Pattern" Controller

View

http://short.ie/5o7eg4

Model

CI application flow

Stolen from CI user guide

App components Front controller

Helper

Routing

Plugin

Security

Scripts

Controller

View

Model

Caching

Library

Front controller

index.php

Routing http://domain.com/index.php/controller/method/param

class Search extends Controller { public function single($id) { // [...] } }

Security

Filtering or blocking unsafe input

Controller The core of everything