SlideShare a Scribd company logo
Codeigniter framework
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
CODEIGNITER FRAMEWORK
Mohammed Shafrin
shafrin1125@gmail.com
www.facebook.com/shafrin1
125
twitter.com/username
in.linkedin.com/in/shafrin
+919961654585
MOTIVATION
• PHP, for small sites this works very well. HTML files
can be easily extended with dynamic content from the
database, form processing, etc.
• When sites grow, you might have realized that across
multiple pages lots of code repetition occurs. This is a
problem when you need to change certain parts of a
page, that affects many or all pages.
• Furthermore, its hard to introduce new developers to
code someone else has written. It takes a long time to
get familiar with the code.
MOTIVATION…
• Enterprise class (big) web applications need structure,
one HTML file per page with PHP code is not
optimal => things get confusing, hard to work in
teams, etc.
• Web Application Frameworks provide such a
structure which introduce separation of concern, etc.
• Most common for Web application development are
frameworks that are based on the Model-View-
Controller design pattern.
MODEL – VIEW – CONTROLLER (MVC)
• “Separation of concerns” of Logic and Presentation.
• Controller: Handles all incoming HTTP requests,
passes data to the views.
• Models: Encapsulate Business Logic, such as
interaction with the database.
• For PHP we introduce CodeIgniter.
CODEIGNITER
• CodeIgniter is a PHP-based MVC framework that
helps structure your code and make redundant tasks
less tedious.
• There are countless similar PHP frameworks, the
most popular ones being CakePHP and symfony.
Ruby on Rails is famous in the Ruby world.
• CodeIgniter is very light weight. It doesn„t force any
convention but provides
• many commonly required features through a set of
build in libraries.
CODEIGNITER - FEATURES
• Model-View-Controller Based System
• Extremely Light Weight, does not force any
convention
• Full Featured database classes with support for
several platforms
• Custom Routing
• Form and Data Validation
• Security
APPLICATION FLOW CHART
APPLICATION FLOW CHART…
1. The index.php serves as the front controller,
initializing the base resources needed to run
CodeIgniter.
2. The Router examines the HTTP request to
determine what should be done with it.
3. If a cache file exists, it is sent directly to the
browser, bypassing the normal system execution.
APPLICATION FLOW CHART…
4. Security, Before the application controller is loaded,
the HTTP request and any user submitted data is
filtered for security.
5. The Controller loads the model, core libraries,
plugins, helpers, and any other resources needed to
process the specific request.
6. The finalized View is rendered then sent to the web
browser to be seen. If caching is enabled, the view is
cached first so that on subsequent requests it can be
served.
GETTING STARTED
• Directory Structure of CodeIgniter:
• Index.php - recieves all requests
and routes to the right controllers
classes and actions, parameters are
included in the URL.
• /system - contains all CodeIgniter
classes and libraries provided by
the framework
• /application - this is where your
application code is located,
including the model, view and
controller classes
CONTROLLERS
• Take incoming HTTP requests
and process them
• Must be the same filename as the
capitalized class name
• Must extend the main Controller
class of CodeIgniter
• Each class function represents an
controller action, which is
rendering a HTML page
• “index” is the default action
ROUTING REQUESTS
• Per default CodeIgniter maps URL to
controller actions:
/index.php/controller/action
• The default controller is “welcome”
and the default action is “index”.
• Custom routing can be configured
through:
/application/config/routes.php
VIEWS
• Are HTML pages or page fragments
• Those are load and sent by the
Controller to the Browser by the use
of the following code in den Ctrl:
$this->load->view(‘blog_view‘);
• There is no application logic in the
views, only display logic (to some
degree)
• <?= is short form for <?php echo
HELPERS
• Helper functions are located in
/application/helpers/
• These are small PHP functions that
provide shortcuts, to outsource often
used code
• For example formatting, text, url or
form helpers
• Needs to be loaded through:
$this->load->helper(‘name’);
LIBRARIES
• Libraries are similar to helpers
• The also need to be loaded through:
$this->load->library('classname');
• The difference is that they
encapsulate more complex
functionality, such as image
processing, form validation handling,
caching, etc.
• Libraries allow to dynamically extend
CodeIgniters functionality and
extendability
DATABASE HANDLING
• CodeIgniter provides a simple way to
access the database.
• It encapsulates the underlying
database (MySQL, Oracle, etc)
• The connection handling is done by
CodeIgniter and configured through:
/application/config/database.php
• Provides security through automatic
escaping of inserted data, avoids
Cross-Side Scripting (CSS) attacks
MODEL
• The Model represents your
data structures.
• Typically your model classes
will contain functions that
help you retrieve, insert, and
update information in your
database.
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Ad

More Related Content

What's hot (20)

Vue.js
Vue.jsVue.js
Vue.js
Jadson Santos
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
Go4Guru
 
Introduccion a React
Introduccion a ReactIntroduccion a React
Introduccion a React
Santiago Rodríguez Paniagua
 
React – ¿Qué es React.js?
React – ¿Qué es React.js?React – ¿Qué es React.js?
React – ¿Qué es React.js?
Gorka Magaña
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.Net
Shivanand Arur
 
Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
Knoldus Inc.
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)
iFour Technolab Pvt. Ltd.
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
ravindraquicsolv
 
Introduction to Powershell Version 5
Introduction to Powershell Version 5Introduction to Powershell Version 5
Introduction to Powershell Version 5
Nishtha Kesarwani
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
DuckDuckGo
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
BG Java EE Course
 
Active Server Page(ASP)
Active Server Page(ASP)Active Server Page(ASP)
Active Server Page(ASP)
Keshab Nath
 
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersAn Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
Kostas Saidis
 
Nginx
NginxNginx
Nginx
Geeta Vinnakota
 
Session7-XSS & CSRF
Session7-XSS & CSRFSession7-XSS & CSRF
Session7-XSS & CSRF
zakieh alizadeh
 
POSTMAN.pptx
POSTMAN.pptxPOSTMAN.pptx
POSTMAN.pptx
RamaKrishna970827
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
Javier Antonio Humarán Peñuñuri
 
Simple server side cache for Express.js with Node.js
Simple server side cache for Express.js with Node.jsSimple server side cache for Express.js with Node.js
Simple server side cache for Express.js with Node.js
Gokusen Newz
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
Avanade Nederland
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
James Gray
 

Similar to Codeigniter framework (20)

Codeigniter
CodeigniterCodeigniter
Codeigniter
Joram Salinas
 
Seminar.pptx
Seminar.pptxSeminar.pptx
Seminar.pptx
Akshay Bhujbal
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
How to become a Rational Developer for IBM i Power User
How to become a Rational Developer for IBM i Power UserHow to become a Rational Developer for IBM i Power User
How to become a Rational Developer for IBM i Power User
Strongback Consulting
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
Taylor Lovett
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
Kirk Madera
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overview
umesh patil
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
TIMETOACT GROUP
 
Headless cms architecture
Headless cms architectureHeadless cms architecture
Headless cms architecture
Kevin Wenger
 
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
Shreyans Jasoriya
 
Modular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireModular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter Bonfire
Jeff Fox
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )
senthil0809
 
Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--dev
altsav
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
ShahRushika
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
Zend by Rogue Wave Software
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
Achievers Tech
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
iMOBDEV Technologies Pvt. Ltd.
 
introduction to php notes for engineering students.ppt
introduction to php notes for engineering students.pptintroduction to php notes for engineering students.ppt
introduction to php notes for engineering students.ppt
manju451965
 
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Perficient, Inc.
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Anupam Ranku
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
How to become a Rational Developer for IBM i Power User
How to become a Rational Developer for IBM i Power UserHow to become a Rational Developer for IBM i Power User
How to become a Rational Developer for IBM i Power User
Strongback Consulting
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
Taylor Lovett
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
Kirk Madera
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overview
umesh patil
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
TIMETOACT GROUP
 
Headless cms architecture
Headless cms architectureHeadless cms architecture
Headless cms architecture
Kevin Wenger
 
Modular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireModular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter Bonfire
Jeff Fox
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )
senthil0809
 
Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--dev
altsav
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
Zend by Rogue Wave Software
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
Achievers Tech
 
introduction to php notes for engineering students.ppt
introduction to php notes for engineering students.pptintroduction to php notes for engineering students.ppt
introduction to php notes for engineering students.ppt
manju451965
 
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Perficient, Inc.
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Anupam Ranku
 
Ad

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
baabtra.com - No. 1 supplier of quality freshers
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
baabtra.com - No. 1 supplier of quality freshers
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
baabtra.com - No. 1 supplier of quality freshers
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
baabtra.com - No. 1 supplier of quality freshers
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
baabtra.com - No. 1 supplier of quality freshers
 
Blue brain
Blue brainBlue brain
Blue brain
baabtra.com - No. 1 supplier of quality freshers
 
5g
5g5g
5g
baabtra.com - No. 1 supplier of quality freshers
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
baabtra.com - No. 1 supplier of quality freshers
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
baabtra.com - No. 1 supplier of quality freshers
 
Ad

Recently uploaded (20)

Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 

Codeigniter framework

  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 4. MOTIVATION • PHP, for small sites this works very well. HTML files can be easily extended with dynamic content from the database, form processing, etc. • When sites grow, you might have realized that across multiple pages lots of code repetition occurs. This is a problem when you need to change certain parts of a page, that affects many or all pages. • Furthermore, its hard to introduce new developers to code someone else has written. It takes a long time to get familiar with the code.
  • 5. MOTIVATION… • Enterprise class (big) web applications need structure, one HTML file per page with PHP code is not optimal => things get confusing, hard to work in teams, etc. • Web Application Frameworks provide such a structure which introduce separation of concern, etc. • Most common for Web application development are frameworks that are based on the Model-View- Controller design pattern.
  • 6. MODEL – VIEW – CONTROLLER (MVC) • “Separation of concerns” of Logic and Presentation. • Controller: Handles all incoming HTTP requests, passes data to the views. • Models: Encapsulate Business Logic, such as interaction with the database. • For PHP we introduce CodeIgniter.
  • 7. CODEIGNITER • CodeIgniter is a PHP-based MVC framework that helps structure your code and make redundant tasks less tedious. • There are countless similar PHP frameworks, the most popular ones being CakePHP and symfony. Ruby on Rails is famous in the Ruby world. • CodeIgniter is very light weight. It doesn„t force any convention but provides • many commonly required features through a set of build in libraries.
  • 8. CODEIGNITER - FEATURES • Model-View-Controller Based System • Extremely Light Weight, does not force any convention • Full Featured database classes with support for several platforms • Custom Routing • Form and Data Validation • Security
  • 10. APPLICATION FLOW CHART… 1. The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter. 2. The Router examines the HTTP request to determine what should be done with it. 3. If a cache file exists, it is sent directly to the browser, bypassing the normal system execution.
  • 11. APPLICATION FLOW CHART… 4. Security, Before the application controller is loaded, the HTTP request and any user submitted data is filtered for security. 5. The Controller loads the model, core libraries, plugins, helpers, and any other resources needed to process the specific request. 6. The finalized View is rendered then sent to the web browser to be seen. If caching is enabled, the view is cached first so that on subsequent requests it can be served.
  • 12. GETTING STARTED • Directory Structure of CodeIgniter: • Index.php - recieves all requests and routes to the right controllers classes and actions, parameters are included in the URL. • /system - contains all CodeIgniter classes and libraries provided by the framework • /application - this is where your application code is located, including the model, view and controller classes
  • 13. CONTROLLERS • Take incoming HTTP requests and process them • Must be the same filename as the capitalized class name • Must extend the main Controller class of CodeIgniter • Each class function represents an controller action, which is rendering a HTML page • “index” is the default action
  • 14. ROUTING REQUESTS • Per default CodeIgniter maps URL to controller actions: /index.php/controller/action • The default controller is “welcome” and the default action is “index”. • Custom routing can be configured through: /application/config/routes.php
  • 15. VIEWS • Are HTML pages or page fragments • Those are load and sent by the Controller to the Browser by the use of the following code in den Ctrl: $this->load->view(‘blog_view‘); • There is no application logic in the views, only display logic (to some degree) • <?= is short form for <?php echo
  • 16. HELPERS • Helper functions are located in /application/helpers/ • These are small PHP functions that provide shortcuts, to outsource often used code • For example formatting, text, url or form helpers • Needs to be loaded through: $this->load->helper(‘name’);
  • 17. LIBRARIES • Libraries are similar to helpers • The also need to be loaded through: $this->load->library('classname'); • The difference is that they encapsulate more complex functionality, such as image processing, form validation handling, caching, etc. • Libraries allow to dynamically extend CodeIgniters functionality and extendability
  • 18. DATABASE HANDLING • CodeIgniter provides a simple way to access the database. • It encapsulates the underlying database (MySQL, Oracle, etc) • The connection handling is done by CodeIgniter and configured through: /application/config/database.php • Provides security through automatic escaping of inserted data, avoids Cross-Side Scripting (CSS) attacks
  • 19. MODEL • The Model represents your data structures. • Typically your model classes will contain functions that help you retrieve, insert, and update information in your database.
  • 20. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  翻译: