SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Codeigniter
Top 5 PHP frameworks of 2017
1. Laravel
2. Symfony
3. CodeIgniter
4. CakePHP
5. Zend Framework
Php Frameworks Version
CodeIgniter
CodeIgniter is a lightweight web application framework written in PHP that adopts
the model-view-controller approach to development
Download link: https://codeigniter.com/download
UserGuide link: https://codeigniter.com/userguide2/
Why use a framework?
Web application frameworks provide basic building blocks needed by applications
– Database connections
– Business logic
– Form handling
– Separation of concerns
– Easier testing (unit tests)
Why use CodeIgniter?
– Feature rich
– Lightweight
– Open source
– Well-supported by an active community
– Excellent “by example” documentation
– Easy to configure
– Supports multiple databases
Model-View-Controller
Model – representation of the data Model
View – rendering of the data suitable for interaction with the user.
Controller – the “traffic cop” that passes model data to the views and vice versa.
This separation of concerns allows for greater flexibility, reuse of code, and
overall preservation of the developer’s sanity
Controller
A class containing one or more related methods (custom PHP functions)
Typical uses: – Request a set of data from the model by sending arguments
– Send a payload of data to a view (web page)
– Receive a data payload from a view
– Apply business logic to make decisions
– Pass data to the model for inclusion in a database
View
Code that displays information to the user
Views can be:
– Web pages with PHP code snippets inserted
– Web pages with forms to gather user input
– Other output (CSV, PDF, etc.)
Model
A class containing one or more related (custom PHP functions) methods,
Typical uses: – Create
– Read
– Update
– Delete
CodeIgniter Classes
CI’s built-in classes contain the basic functionality that are frequently used by web
applications
The most-used classes are:
– Database
– Input
– Loader
– URI
– Validation
Database Class
– Generates queries using the Active Record Pattern
– Automatic escaping of input values
– Provides method “chaining” for easy query building
– $this->load->database(); // database class load here.
– $this->db->get(‘usermaster’); // Fetch data from usermaster table.
Input Class
Provides access to user input and other data:
– Form fields (POST)
– Cookies
– Server variables
– $this->input->post(‘fieldname’);
Loader Class
Makes various resources available:
– Databases
– Views
– Helpers
– Plugins
$this->load->view(‘viewname’);
URI Class
Provides access to specific parts of the URI string
Useful for building RESTful URIs
$this->uri->segment(n);
Validation Class
Helps validate user form input
– Required fields
– Required string formatting (length, regexp)
– Enables success and failure messages on form submittal
Other Classes
Benchmarking Calendaring
Email Encryption
File uploading FTP
HTML Table Image Manipulation
Language (internationalization) Output
Pagination Session
Trackback Unit testing
XML-RPC Zip encoding
Thanks!!!!!

Weitere ähnliche Inhalte

Was ist angesagt?

WT - Web Browser
WT - Web BrowserWT - Web Browser
WT - Web Browser
vinay arora
 
Web application-for-financial-and-economic-data-analysis3
Web application-for-financial-and-economic-data-analysis3Web application-for-financial-and-economic-data-analysis3
Web application-for-financial-and-economic-data-analysis3
Mike Taylor
 
OpenIDM: An Introduction
OpenIDM: An IntroductionOpenIDM: An Introduction
OpenIDM: An Introduction
ForgeRock
 
Build your silver light application
Build your silver light applicationBuild your silver light application
Build your silver light application
Pranay Rana
 
2 Magma Introduction
2 Magma Introduction2 Magma Introduction
2 Magma Introduction
vegamario
 
SharePoint 2010 Web Application Architecture_ Ayman El-Hattab,MVP
SharePoint 2010 Web Application Architecture_ Ayman El-Hattab,MVPSharePoint 2010 Web Application Architecture_ Ayman El-Hattab,MVP
SharePoint 2010 Web Application Architecture_ Ayman El-Hattab,MVP
Ayman El-Hattab
 

Was ist angesagt? (19)

Case Study for Web Based CMS News & Media Portal
Case Study for Web Based CMS News & Media PortalCase Study for Web Based CMS News & Media Portal
Case Study for Web Based CMS News & Media Portal
 
WT - Web Browser
WT - Web BrowserWT - Web Browser
WT - Web Browser
 
CUST-3 Document Management with Share
CUST-3 Document Management with ShareCUST-3 Document Management with Share
CUST-3 Document Management with Share
 
OpenIDM - An Introduction
OpenIDM - An IntroductionOpenIDM - An Introduction
OpenIDM - An Introduction
 
Web application-for-financial-and-economic-data-analysis3
Web application-for-financial-and-economic-data-analysis3Web application-for-financial-and-economic-data-analysis3
Web application-for-financial-and-economic-data-analysis3
 
Course Scheduler
Course SchedulerCourse Scheduler
Course Scheduler
 
Mule esb-connectors
Mule esb-connectorsMule esb-connectors
Mule esb-connectors
 
Php.Mvc Presentation
Php.Mvc PresentationPhp.Mvc Presentation
Php.Mvc Presentation
 
Mule mule management console
Mule  mule management consoleMule  mule management console
Mule mule management console
 
OpenIDM: An Introduction
OpenIDM: An IntroductionOpenIDM: An Introduction
OpenIDM: An Introduction
 
Mule anypoint enterprise security
Mule  anypoint enterprise securityMule  anypoint enterprise security
Mule anypoint enterprise security
 
Build your silver light application
Build your silver light applicationBuild your silver light application
Build your silver light application
 
Securing mule
Securing   muleSecuring   mule
Securing mule
 
2 Magma Introduction
2 Magma Introduction2 Magma Introduction
2 Magma Introduction
 
Web 2.0 Introduction
Web 2.0 IntroductionWeb 2.0 Introduction
Web 2.0 Introduction
 
Oracle Forms Introduction
Oracle Forms IntroductionOracle Forms Introduction
Oracle Forms Introduction
 
OPENIDM: DID YOU JUST SAAS ME?
OPENIDM: DID YOU JUST SAAS ME?OPENIDM: DID YOU JUST SAAS ME?
OPENIDM: DID YOU JUST SAAS ME?
 
Refined Search With Minimal Clicks Toolbar
Refined Search With Minimal Clicks ToolbarRefined Search With Minimal Clicks Toolbar
Refined Search With Minimal Clicks Toolbar
 
SharePoint 2010 Web Application Architecture_ Ayman El-Hattab,MVP
SharePoint 2010 Web Application Architecture_ Ayman El-Hattab,MVPSharePoint 2010 Web Application Architecture_ Ayman El-Hattab,MVP
SharePoint 2010 Web Application Architecture_ Ayman El-Hattab,MVP
 

Ähnlich wie Codeignitor

Ähnlich wie Codeignitor (20)

Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
CodeIgniter
CodeIgniterCodeIgniter
CodeIgniter
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP Yii
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introduction
 
PHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterPHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniter
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Having fun with code igniter
Having fun with code igniterHaving fun with code igniter
Having fun with code igniter
 
contentDM
contentDMcontentDM
contentDM
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
 
Application development and emerging technologies.pptx
Application development and emerging technologies.pptxApplication development and emerging technologies.pptx
Application development and emerging technologies.pptx
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API framework
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API frameworkSFScon 2020 - Nikola Milisavljevic - BASE - Python REST API framework
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API framework
 
Fwdtechseminars
FwdtechseminarsFwdtechseminars
Fwdtechseminars
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Introduction to Yii & performance comparison with Drupal
Introduction to Yii & performance comparison with DrupalIntroduction to Yii & performance comparison with Drupal
Introduction to Yii & performance comparison with Drupal
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
codeigniter
codeignitercodeigniter
codeigniter
 

Kürzlich hochgeladen

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Kürzlich hochgeladen (20)

Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

Codeignitor

  • 2. Top 5 PHP frameworks of 2017 1. Laravel 2. Symfony 3. CodeIgniter 4. CakePHP 5. Zend Framework
  • 4. CodeIgniter CodeIgniter is a lightweight web application framework written in PHP that adopts the model-view-controller approach to development Download link: https://codeigniter.com/download UserGuide link: https://codeigniter.com/userguide2/
  • 5. Why use a framework? Web application frameworks provide basic building blocks needed by applications – Database connections – Business logic – Form handling – Separation of concerns – Easier testing (unit tests)
  • 6. Why use CodeIgniter? – Feature rich – Lightweight – Open source – Well-supported by an active community – Excellent “by example” documentation – Easy to configure – Supports multiple databases
  • 7. Model-View-Controller Model – representation of the data Model View – rendering of the data suitable for interaction with the user. Controller – the “traffic cop” that passes model data to the views and vice versa. This separation of concerns allows for greater flexibility, reuse of code, and overall preservation of the developer’s sanity
  • 8. Controller A class containing one or more related methods (custom PHP functions) Typical uses: – Request a set of data from the model by sending arguments – Send a payload of data to a view (web page) – Receive a data payload from a view – Apply business logic to make decisions – Pass data to the model for inclusion in a database
  • 9. View Code that displays information to the user Views can be: – Web pages with PHP code snippets inserted – Web pages with forms to gather user input – Other output (CSV, PDF, etc.)
  • 10. Model A class containing one or more related (custom PHP functions) methods, Typical uses: – Create – Read – Update – Delete
  • 11. CodeIgniter Classes CI’s built-in classes contain the basic functionality that are frequently used by web applications The most-used classes are: – Database – Input – Loader – URI – Validation
  • 12. Database Class – Generates queries using the Active Record Pattern – Automatic escaping of input values – Provides method “chaining” for easy query building – $this->load->database(); // database class load here. – $this->db->get(‘usermaster’); // Fetch data from usermaster table.
  • 13. Input Class Provides access to user input and other data: – Form fields (POST) – Cookies – Server variables – $this->input->post(‘fieldname’);
  • 14. Loader Class Makes various resources available: – Databases – Views – Helpers – Plugins $this->load->view(‘viewname’);
  • 15. URI Class Provides access to specific parts of the URI string Useful for building RESTful URIs $this->uri->segment(n);
  • 16. Validation Class Helps validate user form input – Required fields – Required string formatting (length, regexp) – Enables success and failure messages on form submittal
  • 17. Other Classes Benchmarking Calendaring Email Encryption File uploading FTP HTML Table Image Manipulation Language (internationalization) Output Pagination Session Trackback Unit testing XML-RPC Zip encoding