CodeIgniter Prepared : Nguyen Tien Chinh & Bùi Cát Hưng 14/01/2010
Porpuse :  Introduction new other PHP framework.   Compare other Php Framework. Setup and Deploys project.   Attendees :  Technology members. Duration : 45’
After the seminar, attendees will achieve : -Understand what is CodeIgniter framework -Architect of CI -Deploy a project with it
Introduction  to CodeIgniter.  Structure and architect  Overview CI .  Demo
Introduction to CodeIgniter What is CodeIgniter. Architecture. Advantages and Disavantages
CodeIgniter is an Application Development Framework - a toolkit - for people who build web sites using PHP.  CodeIgniter is open source. Was built by EllisLab. The first public version of CodeIgniter was released on February 28, 2006.  What is CodeIgninter
CodeIgniter Feature  Runs on PHP 4 Light Weight Fast Uses M-V-C Clean URLs Packs a Punch Extensible Friendly Community of Users Thoroughly Documented
MVC model
Its architecture.
Advantages of CodeIgniter Helpers and libraries. Support PHP 4 or PHP. Exceptional performance. Lightweight. Very fast. Clear document.
Disadvantages of Codeigniter ORM  is not  available Modules  Auth Module  Ajax
 
Introduction  to CodeIgniter.  Core of Framework.  Overview CI   Demo
Core CI Libraries Helpers Document
Libraries Benchmarking Class   Calendar Class   Cart Class   Config  Class   Database Class   Email Class   Encryption Class   File Uploading Class   Form Validation Class   FTP Class   HTML Table Class   Image Manipulation Class
Libraries Input and Security Class   Loader Class   Language Class   Output Class   Pagination Class   Session Class   Trackback  Class   Template Parser Class   Typography Class   Unit Testing Class   URI Class   User Agent Class   XML-RPC Class   Zip Encoding Class
Helpers Array Helper   Compatibility Helper   Cookie Helper   Date Helper   Directory Helper   Download Helper   Email Helper   File Helper   Form Helper   HTML Helper
Helpers Inflector Helper   Language Helper   Number Helper   Path Helper   Security Helper   Smiley Helper   String Helper   Text Helper   Typography Helper   URL Helper   XML  Helpe
Introduction  to CodeIgniter.  Core of Framework.  Overview CI   Demo
Overview CI framwork CodeIgniter URLs URI Routing Controllers  Models  Views  Auto-loading Resources Security Managing your Applications
CodeIgniter URLs segment-based example.com/ class / function / ID   query string example.com/index.php?c=controller&m=method  Adding a URL Suffix example.com/index.php/products/view/shoes.html
URI Routing Wildcards $route['product/:num'] = "catalog/product_lookup";  Regular Expressions $route['products/([a-z]+)/(\d+)'] = "$1/id_$2";
Controllers class News extends Controller { function News() { parent::Controller(); } function index() { $data['tpl_view'] = 'news/index'; $data['active_tab'] = 'news'; $this->load->view('layout',$data); } Function otherFunction($para1, $para2){ // process data and set view here } }
Models class NewsDAO extends Model { function NewsDAO () { parent::Model(); } function verifyUser($username,$password){ $this->db->select('id,username'); $this->db->from('admin'); $this->db->where('username', $username); $this->db->where('password', $password); $this->db->where('active', 'Yes'); $this->db->limit(1); $Q = $this->db->get(); return $Q; } Function otherFunction($para1, $para2){ // process data} }
Views <?php   $this- >load->view('header'); ?> <!-- Set view for Project --> <?php   $this- >load->view ($tpl_view ); ?> <!-- End set view  --> <?php   $this- >load->view('footer'); ?>
Auto-loading Resources libraries, helpers, and plugins to be initialized automatically every time the system runs. $autoload['libraries'] = array('database', 'session', 'validation');   $autoload['helper'] = array('url');
Managing your Applications to have multiple sets of applications that share a single CodeIgniter installation FrontEnd. BackEnd.  … ..
Security URI Security GET, POST, and COOKIE Data XSS Filtering Validate the data Escape all data before database insertion
Directory structure of CI +System - Application  ( Working with project here ) -Codeigniter -Helper -Libraries -Database -Language
+Application -Controller -  News.php -Model -  NewsDAO.php -View News.php
Compare other PHP framework CodeIgniter vs Cake? CodeIgniter vs Zend Framework. http:// www.phpframeworks.com/index.php
Compare other PHP framework EDP : Event Driven Programming.New! ORM : Indicates whether the framework supports an object-record mapper, usually an implementation of ActiveRecord.  Documentation / User Guide ? Result Benchmark CodeIgniter:  58.51  CakePHP:  37.46 29.67  Symfony:  22.78
Introduction  to CodeIgniter.  Core of Framework.  Overview CI   Demo
Bonus Template Library Link download: http:// www.williamsconcepts.com/ci/codeigniter/libraries/template/download. html Introduction template library. Demo template library
References http://www.codeigniterdirectory.com http:// codeigniter.com/user_guide http://www.phpframeworks.com Professional CodeIgniter - book
Thanks for your attend

Codeigniter

  • 1.
    CodeIgniter Prepared :Nguyen Tien Chinh & Bùi Cát Hưng 14/01/2010
  • 2.
    Porpuse : Introduction new other PHP framework. Compare other Php Framework. Setup and Deploys project. Attendees : Technology members. Duration : 45’
  • 3.
    After the seminar,attendees will achieve : -Understand what is CodeIgniter framework -Architect of CI -Deploy a project with it
  • 4.
    Introduction toCodeIgniter. Structure and architect Overview CI . Demo
  • 5.
    Introduction to CodeIgniterWhat is CodeIgniter. Architecture. Advantages and Disavantages
  • 6.
    CodeIgniter is anApplication Development Framework - a toolkit - for people who build web sites using PHP. CodeIgniter is open source. Was built by EllisLab. The first public version of CodeIgniter was released on February 28, 2006. What is CodeIgninter
  • 7.
    CodeIgniter Feature Runs on PHP 4 Light Weight Fast Uses M-V-C Clean URLs Packs a Punch Extensible Friendly Community of Users Thoroughly Documented
  • 8.
  • 9.
  • 10.
    Advantages of CodeIgniterHelpers and libraries. Support PHP 4 or PHP. Exceptional performance. Lightweight. Very fast. Clear document.
  • 11.
    Disadvantages of CodeigniterORM is not available Modules Auth Module Ajax
  • 12.
  • 13.
    Introduction toCodeIgniter. Core of Framework. Overview CI Demo
  • 14.
    Core CI LibrariesHelpers Document
  • 15.
    Libraries Benchmarking Class Calendar Class Cart Class Config Class Database Class Email Class Encryption Class File Uploading Class Form Validation Class FTP Class HTML Table Class Image Manipulation Class
  • 16.
    Libraries Input andSecurity Class Loader Class Language Class Output Class Pagination Class Session Class Trackback Class Template Parser Class Typography Class Unit Testing Class URI Class User Agent Class XML-RPC Class Zip Encoding Class
  • 17.
    Helpers Array Helper Compatibility Helper Cookie Helper Date Helper Directory Helper Download Helper Email Helper File Helper Form Helper HTML Helper
  • 18.
    Helpers Inflector Helper Language Helper Number Helper Path Helper Security Helper Smiley Helper String Helper Text Helper Typography Helper URL Helper XML Helpe
  • 19.
    Introduction toCodeIgniter. Core of Framework. Overview CI Demo
  • 20.
    Overview CI framworkCodeIgniter URLs URI Routing Controllers Models Views Auto-loading Resources Security Managing your Applications
  • 21.
    CodeIgniter URLs segment-basedexample.com/ class / function / ID query string example.com/index.php?c=controller&m=method Adding a URL Suffix example.com/index.php/products/view/shoes.html
  • 22.
    URI Routing Wildcards$route['product/:num'] = &quot;catalog/product_lookup&quot;; Regular Expressions $route['products/([a-z]+)/(\d+)'] = &quot;$1/id_$2&quot;;
  • 23.
    Controllers class Newsextends Controller { function News() { parent::Controller(); } function index() { $data['tpl_view'] = 'news/index'; $data['active_tab'] = 'news'; $this->load->view('layout',$data); } Function otherFunction($para1, $para2){ // process data and set view here } }
  • 24.
    Models class NewsDAOextends Model { function NewsDAO () { parent::Model(); } function verifyUser($username,$password){ $this->db->select('id,username'); $this->db->from('admin'); $this->db->where('username', $username); $this->db->where('password', $password); $this->db->where('active', 'Yes'); $this->db->limit(1); $Q = $this->db->get(); return $Q; } Function otherFunction($para1, $para2){ // process data} }
  • 25.
    Views <?php $this- >load->view('header'); ?> <!-- Set view for Project --> <?php $this- >load->view ($tpl_view ); ?> <!-- End set view --> <?php $this- >load->view('footer'); ?>
  • 26.
    Auto-loading Resources libraries,helpers, and plugins to be initialized automatically every time the system runs. $autoload['libraries'] = array('database', 'session', 'validation'); $autoload['helper'] = array('url');
  • 27.
    Managing your Applicationsto have multiple sets of applications that share a single CodeIgniter installation FrontEnd. BackEnd. … ..
  • 28.
    Security URI SecurityGET, POST, and COOKIE Data XSS Filtering Validate the data Escape all data before database insertion
  • 29.
    Directory structure ofCI +System - Application ( Working with project here ) -Codeigniter -Helper -Libraries -Database -Language
  • 30.
    +Application -Controller - News.php -Model - NewsDAO.php -View News.php
  • 31.
    Compare other PHPframework CodeIgniter vs Cake? CodeIgniter vs Zend Framework. http:// www.phpframeworks.com/index.php
  • 32.
    Compare other PHPframework EDP : Event Driven Programming.New! ORM : Indicates whether the framework supports an object-record mapper, usually an implementation of ActiveRecord. Documentation / User Guide ? Result Benchmark CodeIgniter: 58.51 CakePHP: 37.46 29.67 Symfony: 22.78
  • 33.
    Introduction toCodeIgniter. Core of Framework. Overview CI Demo
  • 34.
    Bonus Template LibraryLink download: http:// www.williamsconcepts.com/ci/codeigniter/libraries/template/download. html Introduction template library. Demo template library
  • 35.
    References http://www.codeigniterdirectory.com http://codeigniter.com/user_guide http://www.phpframeworks.com Professional CodeIgniter - book
  • 36.