SlideShare uma empresa Scribd logo
1 de 8
Using Code igniter for PHP application development
With many software frameworks available online nowadays, with many pros and cons on their side, it has
become very important to check out complete details of these frameworks before applying them. Amongst
the various kinds of software frameworks, the PHP Framework is more popular nowadays. Being simple to
work on and easy to use, PHP frameworks are soon becoming the catchword of software frameworks
Why we should use it?
One of the effective PHP Frameworks is the Code Igniter. Web applications with advanced features can be
readied using the Code Igniter. Simpler for the beginners, CI follows an MVC (Model View Controller)
pattern, thereby enabling in easy learning. Also, due to the usage of conventional PHP coding, the
existing codes can be ported using this PHP framework. Also the simplicity with which it works and
the speed that it has when compared to the other frameworks, is definitely considerable.
 Easy to install and use.
 Good for applications utilizing multiple platforms.
 Applications can be built quickly and easily.
 Simple to debug.
 Secured.
 Developer Friendly
 Its support every kind of 3rd
party tools
 The most important thing is you don’t need to be expert for use this but you can learn all
other programming logics easy and quick while using this
Why we should use it?
 Code igniter is a lightweight web application framework written in PHP that adopts the model-view-
controller approach to development
 Web Application frameworks provide basic building blocks needed by most application
o Database connections
o Business logic
o Form handling
 Some are the features which kind be missed with this documentation
o Feature Rich
o Lightweight
o Open Source
o Well-supported by an active community
o Excellent “by example” documentation
o Easy to configure
o Supports multiple database
In short, Code igniter is nice because it does what it needs to do and then gets out of the way.
Process of Codeigniter
The following graphic illustrates how data flows throughout the system:
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.
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.
Limitations
The first major issue with the framework is how it deals with retrieving and manipulating
data from the database.
• CodeIgniter's models are optional and serve no function other than code separation. There's no
integrated CRUD and its "Active Record" class is really just an alternative SQL syntax. It also
doesn't support table associations. So, you will be building many large queries essentially from
scratch.
• CodeIgniter lacks some essential libraries that are needed in most applications (i.e.
Authentication and ACL). You will need to rely on 3rd party libraries in many of your
applications.
• Since CodeIgniter lacks much of the automation, there are no strict conventions to follow.
This makes CodeIgniter a more flexible framework. Furthermore, its lack of features and
automation do give it an advantage when it comes to speed. Improving these limitations would
give a great boost to the CodeIgniter framework and make it more powerful. Although some of
the limitations are fixed via 3rd Party libraries or plugins it would be great to have them right out
of the box.
Developer Point of View
It’s a flexible, compact, and simple Model-View-Controller (MVC) framework for PHP. If you’re as
analytical as I am, you’re probably wondering why I’m using weasel words like flexible, compact and
simple, so I’m going to drill down a bit to explain. I’m not going to give you any textbook
explanations, either, just talk from the benefit of having written about 40 applications over the course
of the last 2 years.
Let’s go with the two most important things, at least for me as a developer: simple and compact.
Compact because it is cut down to a manageable footprint. CodeIgniter 1.7.2 weighs in at 1.6 MB
(as compared to 9MB for CakePHP). It contains various libraries and helpers to get you through all
the tedious crap you’ll encounter in every project–form helpers to build forms, HTML helpers to
replace the tedium of markup, and libraries for handling calendars, emails, ZIP downloads, basic
shopping carts, encryption, FTP, languages, caching, pagination, and lots more.
With CodeIgniter, use what you want, and ignore what you don’t. If there isn’t something already
built-in, reach out to the community to get what you need, or extend CodeIgniter with your own
helpers and libraries.
What about “simple”? Well, with most projects, you’ll be breaking your code into three easy-to-
understand areas.
You organize your application using controllers. The functions in your controller make up your
routes and paths. For example, if you have a path like this on your site:
/store/category/123
Then that means you have a store controller with a category() function inside it. That function takes
some kind of ID as an argument (in this case, “123″) and you can use that argument however you
like–but usually its passed along to a model function that queries what you want from a database.
Simple and straightforward. Oh, by the way, if you don’t want to take the time to sanitize every single
user input, you can adjust one config setting to have CodeIgniter do it for you.
I tend to create lots of different controllers to keep my applications well-organized, but there’s no
reason why you couldn’t just have one single controller for you project. CodeIgniter doesn’t really
care, but if you’re working with other developers, having more controllers makes it easier to split up
the work.
Anything having to do with data is put into models–I tend to use separate models for different
database tables, but you could flatten yours into just a few models. Some guys use a basic model
that allows them to get one, get many, and so on, and just extend that into every situation. Inside
each model are functions that do something specific with a database table. You could, for example,
have a function that specifically pulls out a single category, all categories, or some other
combination.
In no way do your model names have to match your database table names. Nor do your database
tables have to follow some kind of predesignated structure, with certain field names. This makes
CodeIgniter an ideal framework for use with legacy data schemas. CodeIgniter doesn’t care that
your key field is id or myID or foobarID, you tell it what you want in your model functions and it
works.
I’ve built some projects without any models at all–that’s right, CodeIgniter doesn’t really care. This is
a handy thing to know if you’re just mocking up a static prototype. Just place all your static content in
views and you’re done. Of course, you could put the static content into models, if you like. It’s up to
you.
One more note about your model functions. You can use CodeIgniter’s ActiveRecord functions to
avoid the use of SQL altogether, or you can use raw SQL if you like. You can also download an
object-relational mapping (ORM) library to abstract your data handling work even more, if that’s
more your speed. It’s up to you.
Everything the user sees on the screen is placed in views. Again, I tend to create a lot of views,
and organize them into various folders for each set of controllers, but you could do whatever you
wanted here. Adding client-side tools like jQuery is easy, too–just add a folder for your jQuery files
and reference them in your views, and voila, you’re done. Start using jQuery. CodeIgniter doesn’t
care.
There’s plenty more to CodeIgniter than that, of course–you can create custom libraries and helpers,
and store configuration details in their own files, too–but you don’t have to do much with any of that.
Just make a few config entries to find your server root and database install, and you’re ready to roll.
What does all this mean? Well, if you’ve worked on any non-MVC PHP project, you know that things
tend to get a bit messy. You end up with PHP files that contain SQL queries mixed in with your
HTML, and config items are thrown in for good measure. If you’re experienced enough, you know to
put your configuration strings into a global header include (for example) and to organize your
functions and classes into separate files. Add enough developers, enough late nights, and enough
crazy client requirements, and things start to slide into sloppy land.
But here’s the thing–CodeIgniter’s MVC approach forces you to think smart, to think long-term, if you
will, about your project, and start putting things in their proper places. Anything that deals with data
goes in the model. Anything the user sees in a browser goes in the view. Anything that pertains to
application structure or routes goes in the controller. If you need to refactor, you find yourself writing
libraries and helpers.
In fact, you’ll find very quickly that the controller provides an amazingly concise way to keep yourself
on track. Customer reports a problem with a page, just ask for the path. Aha, the /store/category
section is buggy? Open the store controller and look at the category() function. Looks like you’re
running two model functions and building a view. Now you know how to proceed, and it doesn’t
matter that it’s 3 a.m. and you haven’t slept in a long while.
Throughout this piece, I hope I’ve made a case for CodeIgniter’s flexibility. Use what you need to get
the job done, don’t use what you don’t need. CodeIgniter works with from-scratch data schemas, or
ones you inherit. It has powerful libraries that allow you to add sophisticated functionality while still
keeping the core of your application organized in a straightforward way.
So, what’s Codeigniter good for?
I’ve written all kinds of applications with it, what some would consider the bread and butter of
the web development world:
* all kinds of content management systems
* shopping carts and payment gateways
* community forums and discussion boards
* gadgets and widgets that connect to social media APIs, such as Twitter
* custom data-entry applications, such as contact databases
* any application that requires lots of calculation, such as billing and invoicing
* any application that integrates with a web service, or uses FTP or email extensively
* any application that deals with calendaring or event management
In particular, CodeIgniter really shines if you’re inheriting or upgrading legacy code or legacy
data structures. In my particular line of work, I find myself rewriting apps that have seen better
days, and in every case, I’ve never had a lick of problems with the underlying data structure
(unless of course, the schema was bad and needed redoing, but that’s a whole other story).
I’ve also had a great deal of success using CodeIgniter in dynamic project situations, where the customer
requirements seem to change every week–change requests show up, and I can react quickly with solid
code.
Striking features of CodeIgniter
There are many features that are quite distinguishing, in CI. Few of the most important features are
explained below:
User Guide
One of the most important features of the CodeIgniter is that it has a very impressive user guide. The way
the documentation has been done is simply marvelous and highly useful for coders to know more about the
working.
Simplicity
CodeIgniter is simple and a major portion of the work gets completed in the controllers and uploading the
libraries. Since the workings are clear and open, it is very easy to understand what is happening and
therefore, simple to use.
Model Handling
While working with models, CodeIgniter uses a straight way of handling. Standard SQL queries can be
mimed using few simple commands. Also creation of model objects, loading it and introducing methods to
deal with a customized task is also possible.
Data Validation
Data validation is a major thing while working on models. Here a validation class is used to validate data.
First, few rules are defined and assigned to the object to be validated. The data that is sent through the URL
is automatically validated by the validation object. Even certain error messages can also be automated the
same way, using data validation class.
There are many other advantages of using CI:
Migration from one server to another is easier and hassle-free. Also installation is easier as well.
CI is very easy to handle and also to customize. In case a new functionality has to be applied, it can be done
without affecting the customization.
With MVC based framework, it offers flexibility and easy management.
Active Record Implementation is simply superb and easy to remember.
Configuration and customization of these configuration files are also easy, thus facilitating easy working with
various types of developers.
The collection of libraries that it posses is also good enough.
And as previously said, awesome documentation of the user guide, which makes any coder easy to use the
whole framework.
i
i
http://philsturgeon.co.uk/blog/2012/12/5-things-codeigniter-cannot-do-without-a-rewrite

Mais conteúdo relacionado

Mais procurados

SharePoint 2010 Application Development
SharePoint 2010 Application DevelopmentSharePoint 2010 Application Development
SharePoint 2010 Application Developmentmattbremer
 
Box Platform Developer Workshop
Box Platform Developer WorkshopBox Platform Developer Workshop
Box Platform Developer WorkshopJonathan LeBlanc
 
Harmik Uchian Portfolio
Harmik Uchian PortfolioHarmik Uchian Portfolio
Harmik Uchian Portfolioharmiku
 
Introduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterIntroduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterPongsakorn U-chupala
 
Domain Driven Design for Angular
Domain Driven Design for AngularDomain Driven Design for Angular
Domain Driven Design for AngularJennifer Estrada
 
Source Code vs. Binary Code Analysis
Source Code vs. Binary Code AnalysisSource Code vs. Binary Code Analysis
Source Code vs. Binary Code AnalysisCheckmarx
 
My Very First Zf App Part One
My Very First Zf App   Part OneMy Very First Zf App   Part One
My Very First Zf App Part Oneisaaczfoster
 
Arthur Del Prado .Net Portfolio
Arthur Del Prado .Net PortfolioArthur Del Prado .Net Portfolio
Arthur Del Prado .Net Portfolioartsdp
 
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)Johannes Geppert
 
Moving to Microsoft Visual Basic .NET
Moving to Microsoft Visual Basic .NETMoving to Microsoft Visual Basic .NET
Moving to Microsoft Visual Basic .NETV Sanchez
 
Developing sites with Magnolia 4 / STK
Developing sites with Magnolia 4 / STKDeveloping sites with Magnolia 4 / STK
Developing sites with Magnolia 4 / STKguest0afb3
 
Portfolio
PortfolioPortfolio
Portfoliojeanux
 
Jeff Huber Portfoilio
Jeff Huber PortfoilioJeff Huber Portfoilio
Jeff Huber PortfoilioJeffHuber
 

Mais procurados (19)

SharePoint 2010 Application Development
SharePoint 2010 Application DevelopmentSharePoint 2010 Application Development
SharePoint 2010 Application Development
 
Box Platform Developer Workshop
Box Platform Developer WorkshopBox Platform Developer Workshop
Box Platform Developer Workshop
 
Harmik Uchian Portfolio
Harmik Uchian PortfolioHarmik Uchian Portfolio
Harmik Uchian Portfolio
 
cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)
 
Introduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterIntroduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniter
 
Domain Driven Design for Angular
Domain Driven Design for AngularDomain Driven Design for Angular
Domain Driven Design for Angular
 
Source Code vs. Binary Code Analysis
Source Code vs. Binary Code AnalysisSource Code vs. Binary Code Analysis
Source Code vs. Binary Code Analysis
 
My Very First Zf App Part One
My Very First Zf App   Part OneMy Very First Zf App   Part One
My Very First Zf App Part One
 
Struts presentation
Struts presentationStruts presentation
Struts presentation
 
Arthur Del Prado .Net Portfolio
Arthur Del Prado .Net PortfolioArthur Del Prado .Net Portfolio
Arthur Del Prado .Net Portfolio
 
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
 
Moving to Microsoft Visual Basic .NET
Moving to Microsoft Visual Basic .NETMoving to Microsoft Visual Basic .NET
Moving to Microsoft Visual Basic .NET
 
C#Portfolio
C#PortfolioC#Portfolio
C#Portfolio
 
AnushaResume_Latest
AnushaResume_LatestAnushaResume_Latest
AnushaResume_Latest
 
Developing sites with Magnolia 4 / STK
Developing sites with Magnolia 4 / STKDeveloping sites with Magnolia 4 / STK
Developing sites with Magnolia 4 / STK
 
Portfolio
PortfolioPortfolio
Portfolio
 
Jeff Huber Portfoilio
Jeff Huber PortfoilioJeff Huber Portfoilio
Jeff Huber Portfoilio
 
Top 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web DevelopmentTop 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web Development
 
Mvc3 part1
Mvc3   part1Mvc3   part1
Mvc3 part1
 

Destaque

Introduction to CodeIgniter
Introduction to CodeIgniterIntroduction to CodeIgniter
Introduction to CodeIgniterPiti Suwannakom
 
Having fun with code igniter
Having fun with code igniterHaving fun with code igniter
Having fun with code igniterAhmad Arif
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introductionCommit University
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code IgniterAmzad Hossain
 
PHP Frameworks & Introduction to CodeIgniter
PHP Frameworks & Introduction to CodeIgniterPHP Frameworks & Introduction to CodeIgniter
PHP Frameworks & Introduction to CodeIgniterJamshid Hashimi
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniterschwebbie
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkBo-Yi Wu
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsTuyen Vuong
 
Introduction to codeigniter
Introduction to codeigniterIntroduction to codeigniter
Introduction to codeigniterHarishankaran K
 

Destaque (16)

Introduction to CodeIgniter
Introduction to CodeIgniterIntroduction to CodeIgniter
Introduction to CodeIgniter
 
Having fun with code igniter
Having fun with code igniterHaving fun with code igniter
Having fun with code igniter
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introduction
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
CodeIgniter 101 Tutorial
CodeIgniter 101 TutorialCodeIgniter 101 Tutorial
CodeIgniter 101 Tutorial
 
PHP Frameworks & Introduction to CodeIgniter
PHP Frameworks & Introduction to CodeIgniterPHP Frameworks & Introduction to CodeIgniter
PHP Frameworks & Introduction to CodeIgniter
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
 
Introduction to Mysql
Introduction to MysqlIntroduction to Mysql
Introduction to Mysql
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
Introduction to codeigniter
Introduction to codeigniterIntroduction to codeigniter
Introduction to codeigniter
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 

Semelhante a Codeigniter

Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docxfantabulous2024
 
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdfWorkshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdfTobiasGoeschel
 
Codeigniter simple explanation
Codeigniter simple explanation Codeigniter simple explanation
Codeigniter simple explanation Arumugam P
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development ToolsSofiaCarter4
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the informationToushik Paul
 
How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022Katy Slemon
 
Codeigniter, a MVC framework for beginner
Codeigniter, a MVC framework for beginnerCodeigniter, a MVC framework for beginner
Codeigniter, a MVC framework for beginneraminbd
 
Customer FX Technical Reference Sheet
Customer FX Technical Reference SheetCustomer FX Technical Reference Sheet
Customer FX Technical Reference SheetGoodCustomers
 
report_vendor_connect
report_vendor_connectreport_vendor_connect
report_vendor_connectYash Mittal
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsVforce Infotech
 
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...JPLoft Solutions
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software EngineerSean Coates
 

Semelhante a Codeigniter (20)

CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
 
codeigniter
codeignitercodeigniter
codeigniter
 
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdfWorkshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdf
 
Seminar.pptx
Seminar.pptxSeminar.pptx
Seminar.pptx
 
Codeigniter simple explanation
Codeigniter simple explanation Codeigniter simple explanation
Codeigniter simple explanation
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022
 
Codeigniter, a MVC framework for beginner
Codeigniter, a MVC framework for beginnerCodeigniter, a MVC framework for beginner
Codeigniter, a MVC framework for beginner
 
Benefits and Features of CodeIgniter.pdf
Benefits and Features of CodeIgniter.pdfBenefits and Features of CodeIgniter.pdf
Benefits and Features of CodeIgniter.pdf
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
MVC & CodeIgniter
MVC & CodeIgniterMVC & CodeIgniter
MVC & CodeIgniter
 
Customer FX Technical Reference Sheet
Customer FX Technical Reference SheetCustomer FX Technical Reference Sheet
Customer FX Technical Reference Sheet
 
report_vendor_connect
report_vendor_connectreport_vendor_connect
report_vendor_connect
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web Applications
 
Ps02 cint24 mvc in php
Ps02 cint24 mvc in phpPs02 cint24 mvc in php
Ps02 cint24 mvc in php
 
CodeIgniter
CodeIgniterCodeIgniter
CodeIgniter
 
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
 

Último

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Codeigniter

  • 1. Using Code igniter for PHP application development With many software frameworks available online nowadays, with many pros and cons on their side, it has become very important to check out complete details of these frameworks before applying them. Amongst the various kinds of software frameworks, the PHP Framework is more popular nowadays. Being simple to work on and easy to use, PHP frameworks are soon becoming the catchword of software frameworks Why we should use it? One of the effective PHP Frameworks is the Code Igniter. Web applications with advanced features can be readied using the Code Igniter. Simpler for the beginners, CI follows an MVC (Model View Controller) pattern, thereby enabling in easy learning. Also, due to the usage of conventional PHP coding, the existing codes can be ported using this PHP framework. Also the simplicity with which it works and the speed that it has when compared to the other frameworks, is definitely considerable.  Easy to install and use.  Good for applications utilizing multiple platforms.  Applications can be built quickly and easily.  Simple to debug.  Secured.  Developer Friendly  Its support every kind of 3rd party tools  The most important thing is you don’t need to be expert for use this but you can learn all other programming logics easy and quick while using this Why we should use it?  Code igniter is a lightweight web application framework written in PHP that adopts the model-view- controller approach to development  Web Application frameworks provide basic building blocks needed by most application o Database connections o Business logic o Form handling  Some are the features which kind be missed with this documentation o Feature Rich o Lightweight o Open Source o Well-supported by an active community o Excellent “by example” documentation o Easy to configure o Supports multiple database In short, Code igniter is nice because it does what it needs to do and then gets out of the way.
  • 2. Process of Codeigniter The following graphic illustrates how data flows throughout the system: 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. 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. Limitations The first major issue with the framework is how it deals with retrieving and manipulating data from the database. • CodeIgniter's models are optional and serve no function other than code separation. There's no integrated CRUD and its "Active Record" class is really just an alternative SQL syntax. It also doesn't support table associations. So, you will be building many large queries essentially from scratch. • CodeIgniter lacks some essential libraries that are needed in most applications (i.e. Authentication and ACL). You will need to rely on 3rd party libraries in many of your applications.
  • 3. • Since CodeIgniter lacks much of the automation, there are no strict conventions to follow. This makes CodeIgniter a more flexible framework. Furthermore, its lack of features and automation do give it an advantage when it comes to speed. Improving these limitations would give a great boost to the CodeIgniter framework and make it more powerful. Although some of the limitations are fixed via 3rd Party libraries or plugins it would be great to have them right out of the box. Developer Point of View It’s a flexible, compact, and simple Model-View-Controller (MVC) framework for PHP. If you’re as analytical as I am, you’re probably wondering why I’m using weasel words like flexible, compact and simple, so I’m going to drill down a bit to explain. I’m not going to give you any textbook explanations, either, just talk from the benefit of having written about 40 applications over the course of the last 2 years. Let’s go with the two most important things, at least for me as a developer: simple and compact. Compact because it is cut down to a manageable footprint. CodeIgniter 1.7.2 weighs in at 1.6 MB (as compared to 9MB for CakePHP). It contains various libraries and helpers to get you through all the tedious crap you’ll encounter in every project–form helpers to build forms, HTML helpers to replace the tedium of markup, and libraries for handling calendars, emails, ZIP downloads, basic shopping carts, encryption, FTP, languages, caching, pagination, and lots more. With CodeIgniter, use what you want, and ignore what you don’t. If there isn’t something already built-in, reach out to the community to get what you need, or extend CodeIgniter with your own helpers and libraries. What about “simple”? Well, with most projects, you’ll be breaking your code into three easy-to- understand areas. You organize your application using controllers. The functions in your controller make up your routes and paths. For example, if you have a path like this on your site: /store/category/123 Then that means you have a store controller with a category() function inside it. That function takes some kind of ID as an argument (in this case, “123″) and you can use that argument however you
  • 4. like–but usually its passed along to a model function that queries what you want from a database. Simple and straightforward. Oh, by the way, if you don’t want to take the time to sanitize every single user input, you can adjust one config setting to have CodeIgniter do it for you. I tend to create lots of different controllers to keep my applications well-organized, but there’s no reason why you couldn’t just have one single controller for you project. CodeIgniter doesn’t really care, but if you’re working with other developers, having more controllers makes it easier to split up the work. Anything having to do with data is put into models–I tend to use separate models for different database tables, but you could flatten yours into just a few models. Some guys use a basic model that allows them to get one, get many, and so on, and just extend that into every situation. Inside each model are functions that do something specific with a database table. You could, for example, have a function that specifically pulls out a single category, all categories, or some other combination. In no way do your model names have to match your database table names. Nor do your database tables have to follow some kind of predesignated structure, with certain field names. This makes CodeIgniter an ideal framework for use with legacy data schemas. CodeIgniter doesn’t care that your key field is id or myID or foobarID, you tell it what you want in your model functions and it works. I’ve built some projects without any models at all–that’s right, CodeIgniter doesn’t really care. This is a handy thing to know if you’re just mocking up a static prototype. Just place all your static content in views and you’re done. Of course, you could put the static content into models, if you like. It’s up to you. One more note about your model functions. You can use CodeIgniter’s ActiveRecord functions to avoid the use of SQL altogether, or you can use raw SQL if you like. You can also download an object-relational mapping (ORM) library to abstract your data handling work even more, if that’s more your speed. It’s up to you. Everything the user sees on the screen is placed in views. Again, I tend to create a lot of views, and organize them into various folders for each set of controllers, but you could do whatever you wanted here. Adding client-side tools like jQuery is easy, too–just add a folder for your jQuery files and reference them in your views, and voila, you’re done. Start using jQuery. CodeIgniter doesn’t care.
  • 5. There’s plenty more to CodeIgniter than that, of course–you can create custom libraries and helpers, and store configuration details in their own files, too–but you don’t have to do much with any of that. Just make a few config entries to find your server root and database install, and you’re ready to roll. What does all this mean? Well, if you’ve worked on any non-MVC PHP project, you know that things tend to get a bit messy. You end up with PHP files that contain SQL queries mixed in with your HTML, and config items are thrown in for good measure. If you’re experienced enough, you know to put your configuration strings into a global header include (for example) and to organize your functions and classes into separate files. Add enough developers, enough late nights, and enough crazy client requirements, and things start to slide into sloppy land. But here’s the thing–CodeIgniter’s MVC approach forces you to think smart, to think long-term, if you will, about your project, and start putting things in their proper places. Anything that deals with data goes in the model. Anything the user sees in a browser goes in the view. Anything that pertains to application structure or routes goes in the controller. If you need to refactor, you find yourself writing libraries and helpers. In fact, you’ll find very quickly that the controller provides an amazingly concise way to keep yourself on track. Customer reports a problem with a page, just ask for the path. Aha, the /store/category section is buggy? Open the store controller and look at the category() function. Looks like you’re running two model functions and building a view. Now you know how to proceed, and it doesn’t matter that it’s 3 a.m. and you haven’t slept in a long while. Throughout this piece, I hope I’ve made a case for CodeIgniter’s flexibility. Use what you need to get the job done, don’t use what you don’t need. CodeIgniter works with from-scratch data schemas, or ones you inherit. It has powerful libraries that allow you to add sophisticated functionality while still keeping the core of your application organized in a straightforward way.
  • 6. So, what’s Codeigniter good for? I’ve written all kinds of applications with it, what some would consider the bread and butter of the web development world: * all kinds of content management systems * shopping carts and payment gateways * community forums and discussion boards * gadgets and widgets that connect to social media APIs, such as Twitter * custom data-entry applications, such as contact databases * any application that requires lots of calculation, such as billing and invoicing * any application that integrates with a web service, or uses FTP or email extensively * any application that deals with calendaring or event management In particular, CodeIgniter really shines if you’re inheriting or upgrading legacy code or legacy data structures. In my particular line of work, I find myself rewriting apps that have seen better days, and in every case, I’ve never had a lick of problems with the underlying data structure (unless of course, the schema was bad and needed redoing, but that’s a whole other story). I’ve also had a great deal of success using CodeIgniter in dynamic project situations, where the customer requirements seem to change every week–change requests show up, and I can react quickly with solid code.
  • 7. Striking features of CodeIgniter There are many features that are quite distinguishing, in CI. Few of the most important features are explained below: User Guide One of the most important features of the CodeIgniter is that it has a very impressive user guide. The way the documentation has been done is simply marvelous and highly useful for coders to know more about the working. Simplicity CodeIgniter is simple and a major portion of the work gets completed in the controllers and uploading the libraries. Since the workings are clear and open, it is very easy to understand what is happening and therefore, simple to use. Model Handling While working with models, CodeIgniter uses a straight way of handling. Standard SQL queries can be mimed using few simple commands. Also creation of model objects, loading it and introducing methods to deal with a customized task is also possible. Data Validation Data validation is a major thing while working on models. Here a validation class is used to validate data. First, few rules are defined and assigned to the object to be validated. The data that is sent through the URL
  • 8. is automatically validated by the validation object. Even certain error messages can also be automated the same way, using data validation class. There are many other advantages of using CI: Migration from one server to another is easier and hassle-free. Also installation is easier as well. CI is very easy to handle and also to customize. In case a new functionality has to be applied, it can be done without affecting the customization. With MVC based framework, it offers flexibility and easy management. Active Record Implementation is simply superb and easy to remember. Configuration and customization of these configuration files are also easy, thus facilitating easy working with various types of developers. The collection of libraries that it posses is also good enough. And as previously said, awesome documentation of the user guide, which makes any coder easy to use the whole framework. i i http://philsturgeon.co.uk/blog/2012/12/5-things-codeigniter-cannot-do-without-a-rewrite