SlideShare a Scribd company logo
Web Application Development
using MVC Framework Kohana




                Arafat Rahman
            Web Application Developer
                       Solution Arena
                http://arafatbd.net
Framework ?
Provides

    Generic
    functionality

    Some key features

    Reusable

    Well-defined

    Specialized by user
Why Kohana (KO3)

    Its MVC

    Its HMVC

    Very fast framework

    Strict PHP 5.2 - OOP and extremely DRY

    Many common components

    Simple routing structure
MVC ?

Model-View-Controller
MVC
HMVC ?

Hierarchical Model View Controller
MVC and HMVC
Setting up Kohana (KO3)
Setting up Kohana
Configuration
application/bootstrap.php


Kohana::init(array(
'base_url'       => '/kohana/',
));
Configuration (cont.)
Delete

    /install.php
Requesting a Controller

/index.php/<controller>/<action>

example:
/index.php/topic/view/123
Hello, world!
Hello, world! (cont.)
http://localhost/kohana/index.php/welcome
Hide index.php
How to hide index.php


http://kerkness.ca/wiki/doku.php?
  id=removing_the_index.php
Hello, world! (cont.)
http://localhost/kohana/welcome
Database Config
application/bootstrap.php
Database Config (cont.)
application/config/database.php
Database Config (cont.)
application/config/database.php
Create Table: topics
CREATE TABLE `kohana`.`topics` (
`topic_id` INT( 11 ) NOT NULL
 AUTO_INCREMENT PRIMARY KEY ,
`title` VARCHAR( 250 ) NOT
 NULL ,
`description` TEXT NOT NULL ,
`date` DATETIME NOT NULL
) ;
Reading Database Records
application/classes/controller/topic.php
Reading Database Records
application/classes/controller/topic.php
try {
    $data['topics'] = DB::select()
               ->from('topics')
               ->order_by('date', "DESC")
               ->execute()
               ->as_array();
     $this->request->response =
    View::factory('list', $data);
}
Reading Database Records
application/view/list.php
Reading Database Records
application/view/list.php
Reading Database Records
application/view/list.php
Inserting New Records
application/classes/controller/topic.php




http://localhost/kohana/topic/new_topic
Inserting New Records (cont.)
http://localhost/kohana/topic/new_topic
Inserting New Records (cont.)
application/classes/controller/topic.php
Inserting New Records (cont.)
application/classes/controller/topic.php
Inserting New Records (cont.)
application/classes/controller/topic.php
Update Records
http://localhost/kohana/topic/index
Update Records (cont.)
application/classes/controller/topic.php
Update Records (cont.)
application/classes/controller/topic.php
Update Records (cont.)
http://localhost/kohana/topic/edit/1
Update Records (cont.)
application/classes/controller/topic.php
Update Records (cont.)
application/classes/controller/topic.php
Model and ORM
        Object Relational Mapping (ORM)

application/classes/model/topic.php

class Model_Topic extends ORM {
     ...
}
HMVC
In a View
<?php echo $content;?><br/>
<?php echo
 Request::factory('topic/featured')
  ->execute()->response;
?>
HMVC (cont.)
In a Controller
$data['featured'] =
 Request::factory('topic/featured')
  ->execute()->response;
References

    Kohana Documentation
http://kohanaframework.org/documentation

    Unofficial documentaion
http://kerkness.ca/wiki/doku.php
Questions ?
Again, I am

Arafat Rahman
http://arafatbd.net

More Related Content

What's hot (19)

PPT
Tomcat Configuration (1)
nazeer pasha
 
PPT
Tomcat
Venkat Pinagadi
 
ODP
REST API Laravel
John Dave Decano
 
PDF
Passing java arrays in oracle stored procedure from mule esb flow
Priyobroto Ghosh (Mule ESB Certified)
 
PDF
Oracle api gateway installation as cluster and single node
Osama Mustafa
 
PDF
Mid term &amp; final- preparation- student-review(Oracle)
than sare
 
PDF
Oracle olap-installation
Amit Sharma
 
PPTX
Mule esb :Data Weave
AnilKumar Etagowni
 
PPT
Auxiliary : Tomcat
webhostingguy
 
PDF
Apache Tomcat 8 Application Server
mohamedmoharam
 
PPTX
Cake php
Jyotisankar Pradhan
 
PDF
Tomcat Optimisation & Performance Tuning
lovingprince58
 
PPTX
Mule Esb Data Weave
Mohammed246
 
PPTX
RoR guide_p1
Brady Cheng
 
PPT
Lect06 tomcat1
Phuc Truong Ba
 
PPT
5-WebServers.ppt
webhostingguy
 
PPT
MuleSoft ESB Object Store
akashdprajapati
 
PPT
Knowledge Sharing : Java Servlet
Fahmi Jafar
 
PDF
Servlets
Sharon Cek
 
Tomcat Configuration (1)
nazeer pasha
 
REST API Laravel
John Dave Decano
 
Passing java arrays in oracle stored procedure from mule esb flow
Priyobroto Ghosh (Mule ESB Certified)
 
Oracle api gateway installation as cluster and single node
Osama Mustafa
 
Mid term &amp; final- preparation- student-review(Oracle)
than sare
 
Oracle olap-installation
Amit Sharma
 
Mule esb :Data Weave
AnilKumar Etagowni
 
Auxiliary : Tomcat
webhostingguy
 
Apache Tomcat 8 Application Server
mohamedmoharam
 
Tomcat Optimisation & Performance Tuning
lovingprince58
 
Mule Esb Data Weave
Mohammed246
 
RoR guide_p1
Brady Cheng
 
Lect06 tomcat1
Phuc Truong Ba
 
5-WebServers.ppt
webhostingguy
 
MuleSoft ESB Object Store
akashdprajapati
 
Knowledge Sharing : Java Servlet
Fahmi Jafar
 
Servlets
Sharon Cek
 

Viewers also liked (8)

PDF
Prototyping for tiny fingers
Julio Pari
 
PDF
Rettig onprototyping
Julio Pari
 
PDF
Algoritmica i clase03 practica 3 solucionario
Julio Pari
 
PDF
Spredfast pocketguide-final
Julio Pari
 
PDF
Algoritmica i clase06 ejercicio apuntadores
Julio Pari
 
DOCX
Kohana bootstrap - modal form
Julio Pari
 
PDF
Amazon dynamo-sosp2007
Julio Pari
 
PDF
Jdeveloper 11g
Julio Pari
 
Prototyping for tiny fingers
Julio Pari
 
Rettig onprototyping
Julio Pari
 
Algoritmica i clase03 practica 3 solucionario
Julio Pari
 
Spredfast pocketguide-final
Julio Pari
 
Algoritmica i clase06 ejercicio apuntadores
Julio Pari
 
Kohana bootstrap - modal form
Julio Pari
 
Amazon dynamo-sosp2007
Julio Pari
 
Jdeveloper 11g
Julio Pari
 
Ad

Similar to 003 web-apps-using-kohana-arafat-rahman-101107191139-phpapp02 (20)

PPS
Web Application Development using MVC Framework Kohana
Arafat Rahman
 
ODP
CodeIgniter PHP MVC Framework
Bo-Yi Wu
 
PDF
Introduction To CodeIgniter
Muhammad Hafiz Hasan
 
PDF
Intro to Laravel 4
Singapore PHP User Group
 
ODP
Codegnitorppt
sreedath c g
 
ODP
Exploring Symfony's Code
Wildan Maulana
 
PDF
Refreshing mule cache using oracle database change notification
Priyobroto Ghosh (Mule ESB Certified)
 
PDF
Rapid Development With CakePHP
Edureka!
 
PPT
Introduction To Code Igniter
Amzad Hossain
 
PDF
Building Restful Web App Rapidly in CakePHP
Edureka!
 
PPT
2310 b 15
Krazy Koder
 
PPT
2310 b 15
Krazy Koder
 
PDF
Zend Framework Quick Start Walkthrough
Bradley Holt
 
DOCX
Spring review_for Semester II of Year 4
than sare
 
PPS
Simplify your professional web development with symfony
Francois Zaninotto
 
PPT
Developing Java Web Applications
hchen1
 
PPTX
PHP 7 - A look at the future
Radu Murzea
 
PPTX
PHP7 - A look at the future
Radu Murzea
 
PDF
Build powerfull and smart web applications with Symfony2
Hugo Hamon
 
PPTX
ASP.NET 4.0 Cache Extensibility
akrakovetsky
 
Web Application Development using MVC Framework Kohana
Arafat Rahman
 
CodeIgniter PHP MVC Framework
Bo-Yi Wu
 
Introduction To CodeIgniter
Muhammad Hafiz Hasan
 
Intro to Laravel 4
Singapore PHP User Group
 
Codegnitorppt
sreedath c g
 
Exploring Symfony's Code
Wildan Maulana
 
Refreshing mule cache using oracle database change notification
Priyobroto Ghosh (Mule ESB Certified)
 
Rapid Development With CakePHP
Edureka!
 
Introduction To Code Igniter
Amzad Hossain
 
Building Restful Web App Rapidly in CakePHP
Edureka!
 
2310 b 15
Krazy Koder
 
2310 b 15
Krazy Koder
 
Zend Framework Quick Start Walkthrough
Bradley Holt
 
Spring review_for Semester II of Year 4
than sare
 
Simplify your professional web development with symfony
Francois Zaninotto
 
Developing Java Web Applications
hchen1
 
PHP 7 - A look at the future
Radu Murzea
 
PHP7 - A look at the future
Radu Murzea
 
Build powerfull and smart web applications with Symfony2
Hugo Hamon
 
ASP.NET 4.0 Cache Extensibility
akrakovetsky
 
Ad

More from Julio Pari (20)

PPTX
Evento - Virtual Lab Despliegue de aplicaciones en Kubernetes #Ibm virtual la...
Julio Pari
 
PDF
Links kubernetes - Evento - Virtual Lab Despliegue de aplicaciones en Kubernetes
Julio Pari
 
DOCX
Comandos - Evento - Virtual Lab Despliegue de aplicaciones en Kubernetes
Julio Pari
 
DOCX
Indice General Tesis Sistemas UPC
Julio Pari
 
PPTX
Arquitectura Web FISI UNMSM
Julio Pari
 
PDF
Jelastic Enterprise
Julio Pari
 
DOCX
Marketing Examen Parcial Profesor Osorio
Julio Pari
 
DOCX
Ingenieria Software Examen Parcial 2013 2 Profesor Cordero
Julio Pari
 
PDF
Documento de Arquitectura
Julio Pari
 
DOCX
Solucion Examen Parcial Sistemas Digitales UNMSM FISI
Julio Pari
 
DOCX
Práctica de Inventarios - Investigación Operativa II
Julio Pari
 
PDF
Armas silenciosas para guerras tranquilas
Julio Pari
 
PDF
UML Java
Julio Pari
 
DOCX
Formato de presentación de Proyecto UNMSM FISI
Julio Pari
 
DOCX
Cuento para nuestro hijo y nuestra hija
Julio Pari
 
DOCX
Ingeniería de Software Examen Parcial
Julio Pari
 
DOCX
Sistemas Distribuidos Examen Parcial
Julio Pari
 
PDF
Php07 consultas bd
Julio Pari
 
PDF
Php06 instalacion my_sql
Julio Pari
 
PDF
Php05 funciones usuario
Julio Pari
 
Evento - Virtual Lab Despliegue de aplicaciones en Kubernetes #Ibm virtual la...
Julio Pari
 
Links kubernetes - Evento - Virtual Lab Despliegue de aplicaciones en Kubernetes
Julio Pari
 
Comandos - Evento - Virtual Lab Despliegue de aplicaciones en Kubernetes
Julio Pari
 
Indice General Tesis Sistemas UPC
Julio Pari
 
Arquitectura Web FISI UNMSM
Julio Pari
 
Jelastic Enterprise
Julio Pari
 
Marketing Examen Parcial Profesor Osorio
Julio Pari
 
Ingenieria Software Examen Parcial 2013 2 Profesor Cordero
Julio Pari
 
Documento de Arquitectura
Julio Pari
 
Solucion Examen Parcial Sistemas Digitales UNMSM FISI
Julio Pari
 
Práctica de Inventarios - Investigación Operativa II
Julio Pari
 
Armas silenciosas para guerras tranquilas
Julio Pari
 
UML Java
Julio Pari
 
Formato de presentación de Proyecto UNMSM FISI
Julio Pari
 
Cuento para nuestro hijo y nuestra hija
Julio Pari
 
Ingeniería de Software Examen Parcial
Julio Pari
 
Sistemas Distribuidos Examen Parcial
Julio Pari
 
Php07 consultas bd
Julio Pari
 
Php06 instalacion my_sql
Julio Pari
 
Php05 funciones usuario
Julio Pari
 

003 web-apps-using-kohana-arafat-rahman-101107191139-phpapp02