KEMBAR78
PHP Frameworks & Introduction to CodeIgniter | PPTX
PHP Frameworks & Introduction
to CodeIgniter
Jamshid Hashimi
Trainer, Cresco Solution
http://www.jamshidhashimi.com
jamshid@netlinks.af
@jamshidhashimi
ajamshidhashimi
Afghanistan Workforce
Development Program
Agenda
• What is a Framework?
• Libraries vs. Frameworks
• Advantage of using Framework
• Introduction to CodeIgniter
• Why CodeIgniter?
• Analyzing Different Frameworks
What is a Framework?
• Frameworks are of key importance for developing
large-scale object-oriented software systems.
They promise higher productivity and shorter
time-to-market through design and code reuse.
• Software frameworks include support programs,
compilers, code libraries, tool sets, and
application programming interfaces (APIs) that
bring together all the different components to
enable development of a project or solution.
Libraries vs. Frameworks
• Inversion of control – In a framework, unlike in libraries or
normal user applications, the overall program's flow of
control is not dictated by the caller, but by the framework.
• Default behavior – A framework has a default behavior.
• Extensibility – A framework can be extended by the user
usually by selective overriding or specialized by user code
to provide specific functionality.
• Non-modifiable framework code – The framework code, in
general, is not allowed to be modified, excepting
extensibility. Users can extend the framework, but not
modify its code.
Advantage of using Framework
• Efficiency
– Pre-built functions - Hours and hundreds of lines of code to write
– Easier, faster, and consequently efficient.
• Security
– Big security implementations.
– Community
• Cost
– Free
– Code Faster
• Support
– Documentation
– Community Forums
– Stackoverflow!
Introduction to CodeIgniter
• CodeIgniter is a toolkit for people who build
web applications using PHP. Its goal is to
enable you to develop projects much faster
than you could if you were writing code from
scratch, by providing a rich set of libraries for
commonly needed tasks, as well as a simple
interface and logical structure to access these
libraries. CodeIgniter lets you creatively focus
on your project by minimizing the amount of
code needed for a given task.
Why CodeIgniter?
• CodeIgniter is Free
• CodeIgniter is Light Weight
• CodeIgniter is Fast
– Really fast. We challenge you to find a framework that
has better performance than CodeIgniter.
• CodeIgniter Uses M-V-C
– CodeIgniter uses the Model-View-Controller approach
• CodeIgniter is Thoroughly Documented
• CodeIgniter has a Friendly Community of Users
Introduction to CodeIgniter
• CodeIgniter Generates Clean URLs
– The URLs generated by CodeIgniter are clean and search-engine
friendly. CodeIgniter uses a segment-based approach.
– example.com/news/article/345
• CodeIgniter Packs a Punch
– CodeIgniter comes with full-range of libraries that enable the
most commonly needed web development tasks, like accessing
a database, sending email, validating form data, maintaining
sessions, manipulating images, working with XML-RPC data and
much more.
• CodeIgniter is Extensible
– Your own libraries, helpers, or through class extensions or
system hooks.
Introduction to CodeIgniter
• CodeIgniter Does Not Require a Template
Engine
<ul>
<?php foreach ($addressbook as $name):?>
<li><?=$name?></li>
<?php endforeach; ?>
</ul>
<ul>
{foreach from=$addressbook item="name”}
<li>{$name}</li>
{/foreach}
</ul>
Analyzing Different Frameworks
• CakePHP
• Kohana
• Zend
• Yii
• Symphony
• Laravel
• CodeIgniter!
SETUP & CONFIGURATION
DEMO
QUESTIONS?

PHP Frameworks & Introduction to CodeIgniter

  • 1.
    PHP Frameworks &Introduction to CodeIgniter Jamshid Hashimi Trainer, Cresco Solution http://www.jamshidhashimi.com jamshid@netlinks.af @jamshidhashimi ajamshidhashimi Afghanistan Workforce Development Program
  • 2.
    Agenda • What isa Framework? • Libraries vs. Frameworks • Advantage of using Framework • Introduction to CodeIgniter • Why CodeIgniter? • Analyzing Different Frameworks
  • 3.
    What is aFramework? • Frameworks are of key importance for developing large-scale object-oriented software systems. They promise higher productivity and shorter time-to-market through design and code reuse. • Software frameworks include support programs, compilers, code libraries, tool sets, and application programming interfaces (APIs) that bring together all the different components to enable development of a project or solution.
  • 4.
    Libraries vs. Frameworks •Inversion of control – In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated by the caller, but by the framework. • Default behavior – A framework has a default behavior. • Extensibility – A framework can be extended by the user usually by selective overriding or specialized by user code to provide specific functionality. • Non-modifiable framework code – The framework code, in general, is not allowed to be modified, excepting extensibility. Users can extend the framework, but not modify its code.
  • 5.
    Advantage of usingFramework • Efficiency – Pre-built functions - Hours and hundreds of lines of code to write – Easier, faster, and consequently efficient. • Security – Big security implementations. – Community • Cost – Free – Code Faster • Support – Documentation – Community Forums – Stackoverflow!
  • 6.
    Introduction to CodeIgniter •CodeIgniter is a toolkit for people who build web applications using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.
  • 7.
    Why CodeIgniter? • CodeIgniteris Free • CodeIgniter is Light Weight • CodeIgniter is Fast – Really fast. We challenge you to find a framework that has better performance than CodeIgniter. • CodeIgniter Uses M-V-C – CodeIgniter uses the Model-View-Controller approach • CodeIgniter is Thoroughly Documented • CodeIgniter has a Friendly Community of Users
  • 8.
    Introduction to CodeIgniter •CodeIgniter Generates Clean URLs – The URLs generated by CodeIgniter are clean and search-engine friendly. CodeIgniter uses a segment-based approach. – example.com/news/article/345 • CodeIgniter Packs a Punch – CodeIgniter comes with full-range of libraries that enable the most commonly needed web development tasks, like accessing a database, sending email, validating form data, maintaining sessions, manipulating images, working with XML-RPC data and much more. • CodeIgniter is Extensible – Your own libraries, helpers, or through class extensions or system hooks.
  • 9.
    Introduction to CodeIgniter •CodeIgniter Does Not Require a Template Engine <ul> <?php foreach ($addressbook as $name):?> <li><?=$name?></li> <?php endforeach; ?> </ul> <ul> {foreach from=$addressbook item="name”} <li>{$name}</li> {/foreach} </ul>
  • 10.
    Analyzing Different Frameworks •CakePHP • Kohana • Zend • Yii • Symphony • Laravel • CodeIgniter!
  • 11.
  • 12.
  • 13.

Editor's Notes

  • #4 Universal: Multipurpose