SlideShare a Scribd company logo
CodeIgniter Framework
Internet Engineering
Hamid Mozaffari
Hossein Mobasher
Overview
●
MVC
●
URI Patterns
●
Application Flow
●
MVC Design with CodeIgniter
●
Controller
●
Model
●
View
●
Library
●
Helper
●
An Example!
MVC
•Built on MVC
•MVC stands for Model View Controller
•Models encapsulate data and the manipulation thereof.
•Views handle presentation of the Models.
•Controllers handle:
•Routing
•external libraries
•Deciding which Model it’s going to send to which View.
Super Object
•CodeIgniter works by building a “super object” on every call.
•This makes the flow very easy to follow.
URI Patterns
•URI’s are Uniform Resource Identifier
•CodeIgniter uses the URI to determine what action to perform with
the request.
http:// www.example.com /blog/index.php /view /10
http://www.example.com/index.php/blog/view/10
URL Domain File Controller Method (action) Parameters
Application Flow
•Controller objects are created
•This loads any libraries / helpers needed as well as any Models
you intend to reference
•Corresponding named function (action) is called and given any
parameters present
•This function typically loads views which are then displayed
MVC Design with CodeIgniter
●
You could write all your logic in Views if you wanted to.
•You can completely disregard Models.
Controllers
•Controllers get called in response to a URL route
•Controllers should take any given parameters and use them to
create a Model.
•This Model then gets passed to the View.
Models
•Models are objects.
•Active Record gives Models database connectivity and query ability.
•DataMapper is has additional features if you need them.
Views
•A view takes information passed to it and splices those values into
the HTML document.
•Views are modular, you can load multiple views for any given
request.
•You can load views from other views.
Libraries
•Libraries allow you to interface with external classes.
•Session management
•reCaptcha
•API’s
•Calendar, Encryption, Forms, Profilers, URI, Validation, etc.
Helpers
•Globally available functions.
•Use them in Controllers, Views, or Models.
An Example

More Related Content

PPT
Code igniter overview
PPTX
4. Introduction to ASP.NET MVC - Part I
PDF
Codeigniter Training Part2
PPTX
Very basic of asp.net mvc with c#
PDF
PPTX
Single page application 03
PPTX
Asp.net mvc 6 with sql server 2014
PDF
Introduction to VIPER Architecture
Code igniter overview
4. Introduction to ASP.NET MVC - Part I
Codeigniter Training Part2
Very basic of asp.net mvc with c#
Single page application 03
Asp.net mvc 6 with sql server 2014
Introduction to VIPER Architecture

What's hot (19)

PDF
iOS viper presentation
PPTX
Valentine with Angular js - Introduction
PPTX
Angularjs Basics
PPTX
Angular 2 with typescript
PPTX
Mvc Brief Overview
PDF
Dot net interview questions and asnwers
PPTX
Moq 的進階用法
PDF
CraftCamp for Students - Introduction to AngularJS
PPTX
ASP.NET MVC Best Practices malisa ncube
PPTX
Sitecore MVC (London User Group, April 29th 2014)
PPTX
Module2
PDF
Knockout Introduction
PPTX
PresentationPatterns_v2
PPTX
Angular js for Beginnners
PPTX
Testing Everything for ASP.NET MVC Applications
PPTX
Sitecore MVC (User Group Conference, May 23rd 2014)
PPTX
Sitecore MVC: Converting Web Forms sublayouts
PPT
Introduction to ASP.NET MVC
PPTX
Introduction to Ember.js
iOS viper presentation
Valentine with Angular js - Introduction
Angularjs Basics
Angular 2 with typescript
Mvc Brief Overview
Dot net interview questions and asnwers
Moq 的進階用法
CraftCamp for Students - Introduction to AngularJS
ASP.NET MVC Best Practices malisa ncube
Sitecore MVC (London User Group, April 29th 2014)
Module2
Knockout Introduction
PresentationPatterns_v2
Angular js for Beginnners
Testing Everything for ASP.NET MVC Applications
Sitecore MVC (User Group Conference, May 23rd 2014)
Sitecore MVC: Converting Web Forms sublayouts
Introduction to ASP.NET MVC
Introduction to Ember.js
Ad

Viewers also liked (13)

PPTX
Intimacy
PDF
UCloud
ODP
PDF
WMA Risk Survey 2016
PPTX
Desarrollo de la unidad didáctica
PDF
Live API Documentation
DOCX
Makalah psikologi
PPTX
Presentation
PDF
Association Rule Mining in Social Network Data
PDF
Advanced Java
PDF
Illustration and Graphic Design Portfolio
Intimacy
UCloud
WMA Risk Survey 2016
Desarrollo de la unidad didáctica
Live API Documentation
Makalah psikologi
Presentation
Association Rule Mining in Social Network Data
Advanced Java
Illustration and Graphic Design Portfolio
Ad

Similar to CodeIgniter (20)

PPTX
MVC + ORM (with project implementation)
PDF
Mastering asp.net mvc - Dot Net Tricks
PDF
ASP.NET MVC 2.0
PPTX
Getting started with MVC 5 and Visual Studio 2013
PPTX
MVC architecture by Mohd.Awais on 18th Aug, 2017
PPTX
E-Commerce Applications Development
PPTX
Introduction to ASP.Net MVC
PPT
Angular js
PPT
Angular js
PPTX
Spring Web Presentation 123143242341234234
PPTX
Using MVC with Kentico 8
PDF
MongoDB MEAN Stack Webinar October 7, 2015
PDF
Asp 1a-aspnetmvc
PDF
Aspnetmvc 1
PPTX
Fast Track introduction to ASP.NET MVC
PPTX
Modular PHP Development using CodeIgniter Bonfire
PDF
MVC Seminar Presantation
PDF
Asp 1-mvc introduction
PPTX
Asp.Net MVC 5 in Arabic
MVC + ORM (with project implementation)
Mastering asp.net mvc - Dot Net Tricks
ASP.NET MVC 2.0
Getting started with MVC 5 and Visual Studio 2013
MVC architecture by Mohd.Awais on 18th Aug, 2017
E-Commerce Applications Development
Introduction to ASP.Net MVC
Angular js
Angular js
Spring Web Presentation 123143242341234234
Using MVC with Kentico 8
MongoDB MEAN Stack Webinar October 7, 2015
Asp 1a-aspnetmvc
Aspnetmvc 1
Fast Track introduction to ASP.NET MVC
Modular PHP Development using CodeIgniter Bonfire
MVC Seminar Presantation
Asp 1-mvc introduction
Asp.Net MVC 5 in Arabic

CodeIgniter

  • 2. Overview ● MVC ● URI Patterns ● Application Flow ● MVC Design with CodeIgniter ● Controller ● Model ● View ● Library ● Helper ● An Example!
  • 3. MVC •Built on MVC •MVC stands for Model View Controller •Models encapsulate data and the manipulation thereof. •Views handle presentation of the Models. •Controllers handle: •Routing •external libraries •Deciding which Model it’s going to send to which View.
  • 4. Super Object •CodeIgniter works by building a “super object” on every call. •This makes the flow very easy to follow.
  • 5. URI Patterns •URI’s are Uniform Resource Identifier •CodeIgniter uses the URI to determine what action to perform with the request. http:// www.example.com /blog/index.php /view /10 http://www.example.com/index.php/blog/view/10 URL Domain File Controller Method (action) Parameters
  • 6. Application Flow •Controller objects are created •This loads any libraries / helpers needed as well as any Models you intend to reference •Corresponding named function (action) is called and given any parameters present •This function typically loads views which are then displayed
  • 7. MVC Design with CodeIgniter ● You could write all your logic in Views if you wanted to. •You can completely disregard Models.
  • 8. Controllers •Controllers get called in response to a URL route •Controllers should take any given parameters and use them to create a Model. •This Model then gets passed to the View.
  • 9. Models •Models are objects. •Active Record gives Models database connectivity and query ability. •DataMapper is has additional features if you need them.
  • 10. Views •A view takes information passed to it and splices those values into the HTML document. •Views are modular, you can load multiple views for any given request. •You can load views from other views.
  • 11. Libraries •Libraries allow you to interface with external classes. •Session management •reCaptcha •API’s •Calendar, Encryption, Forms, Profilers, URI, Validation, etc.
  • 12. Helpers •Globally available functions. •Use them in Controllers, Views, or Models.