SlideShare a Scribd company logo
Benefit of CodeIgniter  PHP Framework Appleboy (Bo-Yi Wu) 2010.09.19
吳柏毅  (Bo-Yi Wu) – Software Engineer Gemtek  - Wireless Broadband Anywhere  ( 正文科技 ) Android Linux Kernel Driver, Switch Router embedded Linux CodeIgniter  繁體中文手冊翻譯 CodeIgniter  繁體中文網站及討論區 PHP Plurk API (Google Code) About Me
Evolution of Web Development index.php about.php news.php links.php contact.php product.php 剛開始設計網站的時候……… ..
Evolution of Web Development index.php page.php header.php news.php footer.php 當你知道每個網頁都有共同的  header  跟  footer  部份
Evolution of Web Development index.php Controller Model View 當你使用  PHP Framework  設計網站時……
Why use Framework ?
Why use Framework ? A web application framework Dynamic websites Libraries for database access Template frameworks Session management Pagination function Often promote code reuse Many more …….
MVC Architecture WEB SERVER ROUTES Controller View MODEL LAYOUT Database Client BROWSER
MVC View  (views/showProduct.php) <html> <body> <p>Product Count:<?=$count?></p> </body> </html> Controller  (controllers/product.php) function showProduct($id) { $this->load->model(“product”); $count = $this->product->getCount($id); $data[‘count’] = $count; $this->load->view(“showProduct”, $data); } Model  (controllers/product.php) function getCount($id) { $this->db->where(“id”, $id); $this->db->from(“my_product”); $query = $this->db->get(); return $->num_rows(); } View Controller Model
Public Web Framework
Why Choose CodeIgniter Small ( 非常小 ) Fast ( 非常快速,想用什麼就  load  什麼 ) Simple ( 非常簡易 ) Customer 管理者可於幾分鐘內安裝好  CI Framework 對於初學者有豐富線上中文文件 Cleaner Code ( 方便學習如何寫  Framework)
What is CodeIgniter???? An Open Source Web Application Framework Nearly Zero Configuration MVC (Model View Controller) Architecture DB Object Templating Caching Modules Helper Validation
How to install CodeIgniter ?
Requirtment Windows, FreeBSD, Linux...... Apache, lighttpd, Nginx PHP PHP 4.3.2 or Higher.... Database MySQL, MySQLi, MS SQL, Postgres, SQLite...
wget  http://codeigniter.com/ ....... unzip CodeIgniter_1.7.2.zip edit  application/config/config.php application/config/database.php You can see http://localhost/ci/index.php
Application Flow Of CodeIgniter
CodeIgniter URL http://localhost/ news.php ? mode=edit & id=10 http://localhost/index.php/ news / edit / 10
CodeIgniter Directory system user_guide  (English Document) index.php 設定網站  Application  目錄 ,  及  CodeIgniter  核心目錄
CodeIgniter System Directory Application Cache Codeigniter Database .............. Conroller, Model, Views
CodeIgniter Application Directory Config ->  系統相關設定檔 Controllers ->  放置個人  Controller Errors -> CI error message Helpers -> CI Helpers Hooks  Language ->  多國語系 Libraries ->  個人常用函式 Models -> Database  相關語法 Views ->  畫面
Controller class  News  extends Controller {  function __construct() { parent::Controller(); } function  index (){ echo “welcome CodeIgniter”; } } Should be placed under “application/controllers”
Controller class  News  extends Controller {  function __construct() { parent::Controller(); } function  index (){ } function  edit ( $id ){ echo “news id is ” . $id; } } url: http://localhost/ news / edit / 10
Views Should be placed under “application/views/index.php” <html> <title> My First CodeIgniter Project</title> <body> <h1>Welcome to My CodeIgniter</h1> </body> </html>
Views Calling a VIEW from Controller $this->load->view(‘index’); Data Passing to a VIEW from Controller function index() { $data = array( ‘ full_name’ => ‘appleboy’, ‘ email’ => ‘appleboy.tw@gmail.com’ ); $this->load->view(‘index’, $data); }
Views <html> <title> ..::Personal Info::.. </title> <body> Full Name :  <?=$full_name;?> <br /> E-mail  :  <?=$email;?> <br /> </body> </html>
Models Models Should be placed Under “application/models/” class  News_model  extends Model { function Mlb_model() { parent::Model(); }  function  get_news ($id) { $this->db->select(‘news_id, news_name'); $this->db->from('project_news'); $query = $this->db->get(); return $query->result_array(); }  }
Loading a Model inside a Controller $this->load->model(‘news_model’); $data = $this-> news_model -> get_news ();
CodeIgniter Libraries Database ( 支援多種資料庫型態 ) File Uploading ( 檔案上傳 ) Pagination ( 分頁 ) Input and Security (SQL Injection) Session Form Valitation ( 表單驗證 )
How to load  Libraries?
$this->load->library(‘ class name’ );  $this->load->library(‘ validation’ );
CodeIgniter Helpers Url helper site_url() base_url() anchor() mailto() auto_link() Download helper force_download()
How to load  helper?
$this->load->helper(‘helper name’);  $this->load->helper(‘download’);
Auto-loading Resources Core classes found in the &quot; libraries &quot; folder  Helper files found in the &quot; helpers &quot; folder  Plugins found in the &quot; plugins &quot; folder  Config files found in the &quot; config &quot; folder  Language files found in the &quot; language &quot; folder  Models found in the &quot; models &quot; folder
application/config/autoload.php   $autoload [' libraries '] = array(); $autoload [' helper '] = array(); $autoload [' plugin '] = array();
CodeIgniter Online Resource CodeIgniter Wiki ( 超多經典範例及外掛 ) 繁體中文線上文件 ( http://goo.gl/RwaC ) 繁體中文討論區 ( http://goo.gl/CfJi ) Google CodeIgniter ........
Thank You

More Related Content

What's hot (20)

Codegnitorppt
CodegnitorpptCodegnitorppt
Codegnitorppt
sreedath c g
 
PHP & MVC
PHP & MVCPHP & MVC
PHP & MVC
Chris Weldon
 
Require js
Require jsRequire js
Require js
Nirbhay Kundan
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP framework
Dinh Pham
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
Boyan Mihaylov
 
Angular js for beginners
Angular js for beginnersAngular js for beginners
Angular js for beginners
Munir Hoque
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
Sakthi Bro
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
Introduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksIntroduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC Frameworks
Gerald Krishnan
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
Spring Framework 101
Spring Framework 101Spring Framework 101
Spring Framework 101
Matthew McCullough
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
AngularJS in 60ish Minutes
AngularJS in 60ish MinutesAngularJS in 60ish Minutes
AngularJS in 60ish Minutes
Dan Wahlin
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
Require.JS
Require.JSRequire.JS
Require.JS
Ivano Malavolta
 
Step by Step - AngularJS
Step by Step - AngularJSStep by Step - AngularJS
Step by Step - AngularJS
Infragistics
 
JavaScript Patterns and Principles
JavaScript Patterns and PrinciplesJavaScript Patterns and Principles
JavaScript Patterns and Principles
Aaronius
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
Sathish VJ
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP framework
Dinh Pham
 
Angular js for beginners
Angular js for beginnersAngular js for beginners
Angular js for beginners
Munir Hoque
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
Sakthi Bro
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
Introduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksIntroduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC Frameworks
Gerald Krishnan
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
AngularJS in 60ish Minutes
AngularJS in 60ish MinutesAngularJS in 60ish Minutes
AngularJS in 60ish Minutes
Dan Wahlin
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
Step by Step - AngularJS
Step by Step - AngularJSStep by Step - AngularJS
Step by Step - AngularJS
Infragistics
 
JavaScript Patterns and Principles
JavaScript Patterns and PrinciplesJavaScript Patterns and Principles
JavaScript Patterns and Principles
Aaronius
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
Sathish VJ
 

Viewers also liked (6)

Connections and Contexts: The Birth, Growth and Death of Online Learning Comm...
Connections and Contexts: The Birth, Growth and Death of Online Learning Comm...Connections and Contexts: The Birth, Growth and Death of Online Learning Comm...
Connections and Contexts: The Birth, Growth and Death of Online Learning Comm...
Richard Schwier
 
Research Methods for Identifying and Analysing Virtual Learning Communities
Research Methods for Identifying and Analysing Virtual Learning CommunitiesResearch Methods for Identifying and Analysing Virtual Learning Communities
Research Methods for Identifying and Analysing Virtual Learning Communities
Richard Schwier
 
ID as Social Process
ID as Social ProcessID as Social Process
ID as Social Process
Richard Schwier
 
La familia apuntes interactivos
La familia apuntes interactivosLa familia apuntes interactivos
La familia apuntes interactivos
ELLsinEducation
 
Pronunciation chapter 4
Pronunciation chapter 4Pronunciation chapter 4
Pronunciation chapter 4
ELLsinEducation
 
Spn ch 4 #5 listening orientation
Spn ch 4 #5 listening orientationSpn ch 4 #5 listening orientation
Spn ch 4 #5 listening orientation
ELLsinEducation
 
Connections and Contexts: The Birth, Growth and Death of Online Learning Comm...
Connections and Contexts: The Birth, Growth and Death of Online Learning Comm...Connections and Contexts: The Birth, Growth and Death of Online Learning Comm...
Connections and Contexts: The Birth, Growth and Death of Online Learning Comm...
Richard Schwier
 
Research Methods for Identifying and Analysing Virtual Learning Communities
Research Methods for Identifying and Analysing Virtual Learning CommunitiesResearch Methods for Identifying and Analysing Virtual Learning Communities
Research Methods for Identifying and Analysing Virtual Learning Communities
Richard Schwier
 
La familia apuntes interactivos
La familia apuntes interactivosLa familia apuntes interactivos
La familia apuntes interactivos
ELLsinEducation
 
Spn ch 4 #5 listening orientation
Spn ch 4 #5 listening orientationSpn ch 4 #5 listening orientation
Spn ch 4 #5 listening orientation
ELLsinEducation
 
Ad

Similar to Benefit of CodeIgniter php framework (20)

CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
Bo-Yi Wu
 
You must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryYou must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular Library
Bo-Yi Wu
 
Introduction to Codeigniter
Introduction to Codeigniter Introduction to Codeigniter
Introduction to Codeigniter
Zero Huang
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
Amzad Hossain
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
Muhammad Hafiz Hasan
 
Benefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkBenefits of the CodeIgniter Framework
Benefits of the CodeIgniter Framework
Toby Beresford
 
Codeigniter simple explanation
Codeigniter simple explanation Codeigniter simple explanation
Codeigniter simple explanation
Arumugam P
 
CodeIgniter & MVC
CodeIgniter & MVCCodeIgniter & MVC
CodeIgniter & MVC
Jamshid Hashimi
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
ShahRushika
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
EmmanuelMasyenene1
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overview
umesh patil
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
Joram Salinas
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
schwebbie
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
Chirag Parmar
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
minhrau111
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
Yesha kapadia
 
Codeigniter, a MVC framework for beginner
Codeigniter, a MVC framework for beginnerCodeigniter, a MVC framework for beginner
Codeigniter, a MVC framework for beginner
aminbd
 
Code igniter development
Code igniter developmentCode igniter development
Code igniter development
Mobiloitte
 
PHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterPHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniter
KHALID C
 
Introduction to codeigniter
Introduction to codeigniterIntroduction to codeigniter
Introduction to codeigniter
Harishankaran K
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
Bo-Yi Wu
 
You must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryYou must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular Library
Bo-Yi Wu
 
Introduction to Codeigniter
Introduction to Codeigniter Introduction to Codeigniter
Introduction to Codeigniter
Zero Huang
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
Amzad Hossain
 
Benefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkBenefits of the CodeIgniter Framework
Benefits of the CodeIgniter Framework
Toby Beresford
 
Codeigniter simple explanation
Codeigniter simple explanation Codeigniter simple explanation
Codeigniter simple explanation
Arumugam P
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overview
umesh patil
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
schwebbie
 
Codeigniter, a MVC framework for beginner
Codeigniter, a MVC framework for beginnerCodeigniter, a MVC framework for beginner
Codeigniter, a MVC framework for beginner
aminbd
 
Code igniter development
Code igniter developmentCode igniter development
Code igniter development
Mobiloitte
 
PHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterPHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniter
KHALID C
 
Introduction to codeigniter
Introduction to codeigniterIntroduction to codeigniter
Introduction to codeigniter
Harishankaran K
 
Ad

More from Bo-Yi Wu (20)

Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
Bo-Yi Wu
 
用 Go 語言打造多台機器 Scale 架構
用 Go 語言打造多台機器 Scale 架構用 Go 語言打造多台機器 Scale 架構
用 Go 語言打造多台機器 Scale 架構
Bo-Yi Wu
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
Bo-Yi Wu
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
Bo-Yi Wu
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
Bo-Yi Wu
 
Drone 1.0 Feature
Drone 1.0 FeatureDrone 1.0 Feature
Drone 1.0 Feature
Bo-Yi Wu
 
Drone CI/CD Platform
Drone CI/CD PlatformDrone CI/CD Platform
Drone CI/CD Platform
Bo-Yi Wu
 
GraphQL IN Golang
GraphQL IN GolangGraphQL IN Golang
GraphQL IN Golang
Bo-Yi Wu
 
Go 語言基礎簡介
Go 語言基礎簡介Go 語言基礎簡介
Go 語言基礎簡介
Bo-Yi Wu
 
drone continuous Integration
drone continuous Integrationdrone continuous Integration
drone continuous Integration
Bo-Yi Wu
 
Gorush: A push notification server written in Go
Gorush: A push notification server written in GoGorush: A push notification server written in Go
Gorush: A push notification server written in Go
Bo-Yi Wu
 
用 Drone 打造 輕量級容器持續交付平台
用 Drone 打造輕量級容器持續交付平台用 Drone 打造輕量級容器持續交付平台
用 Drone 打造 輕量級容器持續交付平台
Bo-Yi Wu
 
用 Go 語言 打造微服務架構
用 Go 語言打造微服務架構用 Go 語言打造微服務架構
用 Go 語言 打造微服務架構
Bo-Yi Wu
 
Introduction to Gitea with Drone
Introduction to Gitea with DroneIntroduction to Gitea with Drone
Introduction to Gitea with Drone
Bo-Yi Wu
 
運用 Docker 整合 Laravel 提升團隊開發效率
運用 Docker 整合 Laravel 提升團隊開發效率運用 Docker 整合 Laravel 提升團隊開發效率
運用 Docker 整合 Laravel 提升團隊開發效率
Bo-Yi Wu
 
用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務
Bo-Yi Wu
 
用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot
Bo-Yi Wu
 
A painless self-hosted Git service: Gitea
A painless self-hosted Git service: GiteaA painless self-hosted Git service: Gitea
A painless self-hosted Git service: Gitea
Bo-Yi Wu
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
Bo-Yi Wu
 
用 Docker 改善團隊合作模式
用 Docker 改善團隊合作模式用 Docker 改善團隊合作模式
用 Docker 改善團隊合作模式
Bo-Yi Wu
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
Bo-Yi Wu
 
用 Go 語言打造多台機器 Scale 架構
用 Go 語言打造多台機器 Scale 架構用 Go 語言打造多台機器 Scale 架構
用 Go 語言打造多台機器 Scale 架構
Bo-Yi Wu
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
Bo-Yi Wu
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
Bo-Yi Wu
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
Bo-Yi Wu
 
Drone 1.0 Feature
Drone 1.0 FeatureDrone 1.0 Feature
Drone 1.0 Feature
Bo-Yi Wu
 
Drone CI/CD Platform
Drone CI/CD PlatformDrone CI/CD Platform
Drone CI/CD Platform
Bo-Yi Wu
 
GraphQL IN Golang
GraphQL IN GolangGraphQL IN Golang
GraphQL IN Golang
Bo-Yi Wu
 
Go 語言基礎簡介
Go 語言基礎簡介Go 語言基礎簡介
Go 語言基礎簡介
Bo-Yi Wu
 
drone continuous Integration
drone continuous Integrationdrone continuous Integration
drone continuous Integration
Bo-Yi Wu
 
Gorush: A push notification server written in Go
Gorush: A push notification server written in GoGorush: A push notification server written in Go
Gorush: A push notification server written in Go
Bo-Yi Wu
 
用 Drone 打造 輕量級容器持續交付平台
用 Drone 打造輕量級容器持續交付平台用 Drone 打造輕量級容器持續交付平台
用 Drone 打造 輕量級容器持續交付平台
Bo-Yi Wu
 
用 Go 語言 打造微服務架構
用 Go 語言打造微服務架構用 Go 語言打造微服務架構
用 Go 語言 打造微服務架構
Bo-Yi Wu
 
Introduction to Gitea with Drone
Introduction to Gitea with DroneIntroduction to Gitea with Drone
Introduction to Gitea with Drone
Bo-Yi Wu
 
運用 Docker 整合 Laravel 提升團隊開發效率
運用 Docker 整合 Laravel 提升團隊開發效率運用 Docker 整合 Laravel 提升團隊開發效率
運用 Docker 整合 Laravel 提升團隊開發效率
Bo-Yi Wu
 
用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務
Bo-Yi Wu
 
用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot
Bo-Yi Wu
 
A painless self-hosted Git service: Gitea
A painless self-hosted Git service: GiteaA painless self-hosted Git service: Gitea
A painless self-hosted Git service: Gitea
Bo-Yi Wu
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
Bo-Yi Wu
 
用 Docker 改善團隊合作模式
用 Docker 改善團隊合作模式用 Docker 改善團隊合作模式
用 Docker 改善團隊合作模式
Bo-Yi Wu
 

Recently uploaded (20)

Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Peter Bittner
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...
pranavbodhak
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
Dr. Jimmy Schwarzkopf
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 ADr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr. Jimmy Schwarzkopf
 
Introducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRCIntroducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRC
Adtran
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
AI Trends - Mary Meeker
AI Trends - Mary MeekerAI Trends - Mary Meeker
AI Trends - Mary Meeker
Razin Mustafiz
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
The case for on-premises AI
The case for on-premises AIThe case for on-premises AI
The case for on-premises AI
Principled Technologies
 
Evaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical ContentEvaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical Content
Paul Groth
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Peter Bittner
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...
pranavbodhak
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
Dr. Jimmy Schwarzkopf
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 ADr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr. Jimmy Schwarzkopf
 
Introducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRCIntroducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRC
Adtran
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
AI Trends - Mary Meeker
AI Trends - Mary MeekerAI Trends - Mary Meeker
AI Trends - Mary Meeker
Razin Mustafiz
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
Evaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical ContentEvaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical Content
Paul Groth
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 

Benefit of CodeIgniter php framework

  • 1. Benefit of CodeIgniter PHP Framework Appleboy (Bo-Yi Wu) 2010.09.19
  • 2. 吳柏毅 (Bo-Yi Wu) – Software Engineer Gemtek  - Wireless Broadband Anywhere ( 正文科技 ) Android Linux Kernel Driver, Switch Router embedded Linux CodeIgniter 繁體中文手冊翻譯 CodeIgniter 繁體中文網站及討論區 PHP Plurk API (Google Code) About Me
  • 3. Evolution of Web Development index.php about.php news.php links.php contact.php product.php 剛開始設計網站的時候……… ..
  • 4. Evolution of Web Development index.php page.php header.php news.php footer.php 當你知道每個網頁都有共同的 header 跟 footer 部份
  • 5. Evolution of Web Development index.php Controller Model View 當你使用 PHP Framework 設計網站時……
  • 7. Why use Framework ? A web application framework Dynamic websites Libraries for database access Template frameworks Session management Pagination function Often promote code reuse Many more …….
  • 8. MVC Architecture WEB SERVER ROUTES Controller View MODEL LAYOUT Database Client BROWSER
  • 9. MVC View (views/showProduct.php) <html> <body> <p>Product Count:<?=$count?></p> </body> </html> Controller (controllers/product.php) function showProduct($id) { $this->load->model(“product”); $count = $this->product->getCount($id); $data[‘count’] = $count; $this->load->view(“showProduct”, $data); } Model (controllers/product.php) function getCount($id) { $this->db->where(“id”, $id); $this->db->from(“my_product”); $query = $this->db->get(); return $->num_rows(); } View Controller Model
  • 11. Why Choose CodeIgniter Small ( 非常小 ) Fast ( 非常快速,想用什麼就 load 什麼 ) Simple ( 非常簡易 ) Customer 管理者可於幾分鐘內安裝好 CI Framework 對於初學者有豐富線上中文文件 Cleaner Code ( 方便學習如何寫 Framework)
  • 12. What is CodeIgniter???? An Open Source Web Application Framework Nearly Zero Configuration MVC (Model View Controller) Architecture DB Object Templating Caching Modules Helper Validation
  • 13. How to install CodeIgniter ?
  • 14. Requirtment Windows, FreeBSD, Linux...... Apache, lighttpd, Nginx PHP PHP 4.3.2 or Higher.... Database MySQL, MySQLi, MS SQL, Postgres, SQLite...
  • 15. wget http://codeigniter.com/ ....... unzip CodeIgniter_1.7.2.zip edit application/config/config.php application/config/database.php You can see http://localhost/ci/index.php
  • 16. Application Flow Of CodeIgniter
  • 17. CodeIgniter URL http://localhost/ news.php ? mode=edit & id=10 http://localhost/index.php/ news / edit / 10
  • 18. CodeIgniter Directory system user_guide (English Document) index.php 設定網站 Application 目錄 , 及 CodeIgniter 核心目錄
  • 19. CodeIgniter System Directory Application Cache Codeigniter Database .............. Conroller, Model, Views
  • 20. CodeIgniter Application Directory Config -> 系統相關設定檔 Controllers -> 放置個人 Controller Errors -> CI error message Helpers -> CI Helpers Hooks Language -> 多國語系 Libraries -> 個人常用函式 Models -> Database 相關語法 Views -> 畫面
  • 21. Controller class News extends Controller { function __construct() { parent::Controller(); } function index (){ echo “welcome CodeIgniter”; } } Should be placed under “application/controllers”
  • 22. Controller class News extends Controller { function __construct() { parent::Controller(); } function index (){ } function edit ( $id ){ echo “news id is ” . $id; } } url: http://localhost/ news / edit / 10
  • 23. Views Should be placed under “application/views/index.php” <html> <title> My First CodeIgniter Project</title> <body> <h1>Welcome to My CodeIgniter</h1> </body> </html>
  • 24. Views Calling a VIEW from Controller $this->load->view(‘index’); Data Passing to a VIEW from Controller function index() { $data = array( ‘ full_name’ => ‘appleboy’, ‘ email’ => ‘[email protected]’ ); $this->load->view(‘index’, $data); }
  • 25. Views <html> <title> ..::Personal Info::.. </title> <body> Full Name : <?=$full_name;?> <br /> E-mail : <?=$email;?> <br /> </body> </html>
  • 26. Models Models Should be placed Under “application/models/” class News_model extends Model { function Mlb_model() { parent::Model(); } function get_news ($id) { $this->db->select(‘news_id, news_name'); $this->db->from('project_news'); $query = $this->db->get(); return $query->result_array(); } }
  • 27. Loading a Model inside a Controller $this->load->model(‘news_model’); $data = $this-> news_model -> get_news ();
  • 28. CodeIgniter Libraries Database ( 支援多種資料庫型態 ) File Uploading ( 檔案上傳 ) Pagination ( 分頁 ) Input and Security (SQL Injection) Session Form Valitation ( 表單驗證 )
  • 29. How to load Libraries?
  • 30. $this->load->library(‘ class name’ ); $this->load->library(‘ validation’ );
  • 31. CodeIgniter Helpers Url helper site_url() base_url() anchor() mailto() auto_link() Download helper force_download()
  • 32. How to load helper?
  • 33. $this->load->helper(‘helper name’); $this->load->helper(‘download’);
  • 34. Auto-loading Resources Core classes found in the &quot; libraries &quot; folder Helper files found in the &quot; helpers &quot; folder Plugins found in the &quot; plugins &quot; folder Config files found in the &quot; config &quot; folder Language files found in the &quot; language &quot; folder Models found in the &quot; models &quot; folder
  • 35. application/config/autoload.php $autoload [' libraries '] = array(); $autoload [' helper '] = array(); $autoload [' plugin '] = array();
  • 36. CodeIgniter Online Resource CodeIgniter Wiki ( 超多經典範例及外掛 ) 繁體中文線上文件 ( http://goo.gl/RwaC ) 繁體中文討論區 ( http://goo.gl/CfJi ) Google CodeIgniter ........