Professional Documents
Culture Documents
CodeIgniter Framework
& Ahmad Arif
23 April 2016
About Me
Pendidikan
1998-2004 SDN 1 Kertamulya, Karawang
2004-2007 SMPN 2 Rengasdengklok, Karawang
2007-2010 SMAN 1 Rengasdengklok, Karawang
2010-2014 Informatika Universitas Jenderal Achman Yani
2015-???? Informatika Institut Teknologi Bandung
Minat
Programming Game Technology
Machine Learning Entertainment
Etc
Artificial Intelligent
What is framework?
https://github.com/kenjis/php-framework-benchmark
Model-View-Controller
Model merepresentasikan data
View menyajikan data untuk interaksi dengan user
Controller mengontrol model dan data supaya bisa
saling berinteraksi
CodeIgniter Classes
CIs built-in classes berisi fungsi dasar yang sering
digunakan oleh aplikasi web
Beberapa kelas yang sering digunakan:
Database
Input
Loader
URI
Validation
Database Class
Tools
Apache HTTP Server
MySQL Database XAMP, WAMP, MAMP, LAMPP
PHP
Browser
Code Editor
Notepad Atom
Notepad++ PHP Storm
Sublime Etc
Getting Started
To Do List
Installation
Controller
View
Model
RESTful API
Controller
<?php
class BlogController extends CI_Controller {
public function index() {
echo 'Hello World!';
}public function page($index) {
echo 'Page: !' . $index;
}
public function comments() {
} echo 'Look at this!';
}
}
View
index.php
<html>
<head>
<title>My Blog</title>
</head>
<body>
<h1>Welcome to my Blog!<h1>
</body>
</html>
$tableName = blog;
$this->db->insert($this->tableName, $data);
}
}
Model
class Blog extends CI_Model {
...
$this->db->where(id, $id);
$this->db->update($this->tableName, $data);
}
}
Model
...
}
Model
class Blog extends CI_Model {
...
}
Using Model
...
$title = $this->input->post(title);
$content = $this->input->post(content);
$this->Blog->insert($title, $content);
}
}
RESTful API
Tools
Postman
Code Editor
To Do List
Format JSON/XML
Routing
Cache setting
References
https://codeigniter.com
https://google.com
https://github.com/ahmadarif
Tank You