SlideShare a Scribd company logo
5
Most read
7
Most read
18
Most read
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

More Related Content

PPT
Introduction To CodeIgniter
PPTX
Elementor - WordPress WYSIWYG Page Builder
PPTX
PDF
A Basic Django Introduction
PPT
Introduction to the Web API
PPT
Introduction To Dotnet
PPTX
HTTP Request Header and HTTP Status Code
PDF
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
Introduction To CodeIgniter
Elementor - WordPress WYSIWYG Page Builder
A Basic Django Introduction
Introduction to the Web API
Introduction To Dotnet
HTTP Request Header and HTTP Status Code
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms

What's hot (20)

PDF
Intro to Wordpress
PPTX
Introduction to Web development
PPTX
Basic WordPress for Beginner ppt
PPTX
Web services SOAP
PPTX
PPTX
Full stack web development
PDF
Fundamentals of Web Development For Non-Developers
PDF
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
PDF
Lecture-1: Introduction to web engineering - course overview and grading scheme
ODP
Introduction to Swagger
PDF
WEB I - 01 - Introduction to Web Development
PPTX
WordPress Webinar Training Presentation
PPTX
Ajax
PPT
Introduction to CSS
PPTX
Http request and http response
PDF
JavaScript - Chapter 15 - Debugging Techniques
PPTX
Front-end development introduction (HTML, CSS). Part 1
PPTX
Introduction to Web Development
Intro to Wordpress
Introduction to Web development
Basic WordPress for Beginner ppt
Web services SOAP
Full stack web development
Fundamentals of Web Development For Non-Developers
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
Lecture-1: Introduction to web engineering - course overview and grading scheme
Introduction to Swagger
WEB I - 01 - Introduction to Web Development
WordPress Webinar Training Presentation
Ajax
Introduction to CSS
Http request and http response
JavaScript - Chapter 15 - Debugging Techniques
Front-end development introduction (HTML, CSS). Part 1
Introduction to Web Development
Ad

Similar to Codeigniter framework (20)

PDF
Codeigniter
PPTX
Seminar.pptx
PDF
Code for Startup MVP (Ruby on Rails) Session 1
PDF
How to become a Rational Developer for IBM i Power User
PPTX
Best Practices for Building WordPress Applications
PPTX
They why behind php frameworks
PPT
Code igniter overview
PPTX
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
PDF
Headless cms architecture
PPTX
Php Web Frameworks
PPTX
Modular PHP Development using CodeIgniter Bonfire
PPTX
AIR - Framework ( Cairngorm and Parsley )
PDF
Presentation 1 Web--dev
PPTX
Codeigniter
PPTX
Building and managing applications fast for IBM i
PPTX
Profiling and Tuning a Web Application - The Dirty Details
PPT
Top 10 web application development frameworks 2016
PPT
introduction to php notes for engineering students.ppt
PDF
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
PPTX
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Codeigniter
Seminar.pptx
Code for Startup MVP (Ruby on Rails) Session 1
How to become a Rational Developer for IBM i Power User
Best Practices for Building WordPress Applications
They why behind php frameworks
Code igniter overview
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Headless cms architecture
Php Web Frameworks
Modular PHP Development using CodeIgniter Bonfire
AIR - Framework ( Cairngorm and Parsley )
Presentation 1 Web--dev
Codeigniter
Building and managing applications fast for IBM i
Profiling and Tuning a Web Application - The Dirty Details
Top 10 web application development frameworks 2016
introduction to php notes for engineering students.ppt
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Ad

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

PPTX
Agile methodology and scrum development
PDF
Acquiring new skills what you should know
PDF
Baabtra.com programming at school
PDF
99LMS for Enterprises - LMS that you will love
PPTX
Chapter 6 database normalisation
PPTX
Chapter 5 transactions and dcl statements
PPTX
Chapter 4 functions, views, indexing
PPTX
PPTX
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
PPTX
Chapter 1 introduction to sql server
PPTX
Chapter 1 introduction to sql server
Agile methodology and scrum development
Acquiring new skills what you should know
Baabtra.com programming at school
99LMS for Enterprises - LMS that you will love
Chapter 6 database normalisation
Chapter 5 transactions and dcl statements
Chapter 4 functions, views, indexing
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 1 introduction to sql server
Chapter 1 introduction to sql server

Recently uploaded (20)

PDF
Classroom Observation Tools for Teachers
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
master seminar digital applications in india
PPTX
Lesson notes of climatology university.
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Cell Structure & Organelles in detailed.
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Presentation on HIE in infants and its manifestations
Classroom Observation Tools for Teachers
human mycosis Human fungal infections are called human mycosis..pptx
Final Presentation General Medicine 03-08-2024.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial disease of the cardiovascular and lymphatic systems
master seminar digital applications in india
Lesson notes of climatology university.
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
GDM (1) (1).pptx small presentation for students
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
VCE English Exam - Section C Student Revision Booklet
Cell Structure & Organelles in detailed.
202450812 BayCHI UCSC-SV 20250812 v17.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
01-Introduction-to-Information-Management.pdf
Pharma ospi slides which help in ospi learning
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Presentation on HIE in infants and its manifestations

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