4. What is Framework??
A PHP framework is a basic platform that allows us to
develop web applications.
Benefits of using Framework:
Its easy to handle the complex problems easily.
Standardization
Security
Extensibility
Fast Loading
Reusable of code
Increase Flexibility
6. Introduction
PHP Web Application Frameworks
Open Source
Rapid Development up to 50%
Originally Released in 2006
Recommended by Rasmus Lerdof
7. Why choose codeigniter
Light Weight
Fast Performance
Little Configuration
Little Server Requirements
Easy to Understand
No installation Necessary
Built in Security tools
Database Abstraction
8. Why use Framework (LikeCodeigniter )
Reusability
Avoid Copy/Paste
Reuse codes in multiple projects
Maintainability
Anyone can extend or edit your application
15. Codeigniter Classes
CI’s built-in classes contain the basic functionality that are frequently
used by web applications.
The most-used classes are 5:
Database
Input
Loader
URI
Validation
16. Database Class
Codeigniter provides a simple way to access the database.
Generates queries using the Active Record(insert, update and
retrieve with minimal scripting ) Pattern.
Provides method “chaining” for easy query building
$this->db.->where(‘name’,$name);
17. Input Class
The Input Class serves two purposes:
It pre-processes global input data for security.
It provides some helper methods for fetching input data and pre-processing it.
Input Filtering
Security Filtering
XSS Filtering( prevent cross-site scripting attacks)
Assessing form data
$this->input->post();
$this->input->get();
$this->input->cookie();
$this->input->server();
18. Loader Class(Theseelementscanbelibraries(classes))
Loader, as the name suggests, is used to load elements. These elements can
be libraries (classes) View files, Drivers, Helpers, Models, or your own files
like.
Databases
Views
Helpers (small php functions)
Plugins (is a piece of software that acts as an add-on to a web browser and
gives the browser additional functionality.)
$this->load->view(‘viewname’);
19. URI(UniformResourcesIdentifier) Class
The URI Class provides methods that help you retrieve information from
your URI strings.
Provides access to specific parts of the URI string.
Typically there is a one-to-one relationship between a URI string and its
corresponding controller class/method.
$this->uri->segment(n);
20. Validation Class
Helps validate user form input
Required fields
Required string formatting (length,)
Enables success and failure messages on form submittal
form submittal
21. Creating Libraries
Libraries are similar to helpers.
You can create entirely new libraries.
You can extend native libraries.
You can replace native libraries.