Introduction to Fuel
             Phil Sturgeon
  philsturgeon.co.uk | @philsturgeon
WTF is Fuel?
• A “new” PHP framework
• “Combines the best of multiple frameworks”
• Fresh start
• PHP 5.3 only
• Made by a bunch of CodeIgniter guys
Introduction to Fuel
It’s freaking brilliant!

• Incredibly lightweight
• Easy to learn
• Huge community
• Helpful forums
• Backwards compatibility is key
• Minimal dependencies
• PHP 5.1.6
It’s PHP5ier!

• Still lightweight
• Everything is a class
• No more $ci =& get_instance();
• PHP 5 autoloading - no loader!
          CodeIgniter                        Fuel

$this->load->library('session');     Session::get('foo');
$this->session->userdata('foo');


• Authentication + Hierarchal MVC (HMVC)
• “Everything” is a driver
• Cascading file system
• No namespacing
  - OAuth_Provider_Facebook
  - OAuthProvider_Facebook
• Splintered: v2.4 versus v3.2
• Great DB builder, not loving the ORM
We stole it!
• Improved Cascading File System
     Autoloader::add_classes(array(
     
     'Mongo_OdmCollection'
 => __DIR__.'/classes/collection.php',
     
     'Mongo_OdmDatabase' 
 => __DIR__.'/classes/database.php',
     
     'Mongo_OdmDocument' 
 => __DIR__.'/classes/document.php',
     
     'Mongo_OdmJSON' 
      => __DIR__.'/classes/json.php',
     ));

• Added Namespacing
        class Config extends FuelCoreConfig {}

• Modules = Routable ‘mini-applications’
• Packages = Installable ‘gem’-like class collections
• Recycled a few other bits
  • Views
  • OAuth
  • Num (Credit card masking and other bits)
•   Command-line tools
•   Database Migrations and ORM bundled in
•   Twig = awesome parser
•   Namespaces by the metric fuck-ton

    namespace AcmeHelloBundleController;
    use SymfonyComponentHttpFoundationResponse;

    class HelloController
    {
        public function indexAction($name)
        {
          return new Response('<html><body>Hello '.$name.'!</
    body></html>');
        }
    }
• Command-line utilities and tasks
                                     $ oil refine robots:protect
• Migrations
  • Database                                           "PROTECT ALL HUMANS"
                                                        _____      /
  • Mongo                                              /_____
  • Whatever                                      ____[*---*/]____
                                                 / # _____/ /# /
                                                / # _.---._/ #/ 
• ORM - lighter and quick                     /    /| |    | /|    
                                             /___/ | | |    | | | ___
                                             | | | | |---| | | | |
• Twig, HAML, Mustache, etc                  |__| _| |_#_| |_/ |__|
                                             // < _//^_ /> //
                                             ||/ |//// /| ||/
• Simple Namespaces                                 |   |   |   |
   • FuelApp                                      |---|   |---|
   • FuelCore                                     |---|
                                                    |   |
                                                            |---|
                                                            |   |
   • Auth                                         |___|   |___|
   • Orm                                          /      /   
                                                   |_____| |_____|
   • Oil                                         |HHHHH| |HHHHH|
   • each module / package
// old usage still valid, will load app/views/example.php
View::forge('example');

// load a Mustache template, will load and parse app/views/
View::forge('example.mustache');

// load a Twig template, will load and parse app/views/example.twig
View::forge('example.twig');

// load a Jade template, will load and parse app/views/example.jade
View::forge('example.jade');

// load a Haml template, will load and parse app/views/example.haml
View::forge('example.haml');

// load a Smarty template, will load and parse app/views/
View::forge('example.smarty');

// load a Dwoo template, ATTENTION: this one expects app/views/
View::forge('example.dwoo');
Introduction to Fuel
• Beautiful command line   • Conventions through the nose
• Interactive Debugging    • How the f**k does that work
• Package installation     • Gem conflicts = AGGHHHH!
• http://rubygems.org/     • Consult a wizard if it breaks
• Scaffolding              • ORM restrictions?
• ORM - perfect for RAD
• Beautiful command line      • No conventions
• Interactive Debugging       • Simple OOP
• Package installation        • Application specific packages
• http://cells.fuelphp.com/   • Pretty exceptions
• Scaffolding                 • Scaffold templates
• ORM - perfect for RAD       • DWTFYL ORM
$ oil create blog
$ cd blog
$ oil generate scaffold title:string summary:text body:text
DHH   DH
Any Questions?
Thanks for listening!
philsturgeon.co.uk | @philsturgeon

More Related Content

PDF
Merb
PPTX
SFDC UI - Advanced Visualforce
PDF
Opportunities in Non-Automotive Fuel Cells
PPTX
Introduction of fuel system kvg
PPTX
Fuel cells and its types
PPTX
Molten carbonate fuel cell
PPT
power generation using cell
PPT
Bonnett fuelcellpresentationfinal
Merb
SFDC UI - Advanced Visualforce
Opportunities in Non-Automotive Fuel Cells
Introduction of fuel system kvg
Fuel cells and its types
Molten carbonate fuel cell
power generation using cell
Bonnett fuelcellpresentationfinal

Viewers also liked (14)

PPTX
Fuel cells
PPTX
Visual Art Sculpture and Architecture
PDF
Fuel cells and hydrogen energy systems
PPT
Fuel cell
PDF
Fuel cells
PPTX
Hydrogen And Fuel Cell Technology For A Sustainable Future
PPT
Fuel Cells
PPTX
Hydrogen fuel cell
PPT
Fuel cells presentation
PPTX
Fuel cells - types, working, construction, fabrication and application
PPTX
MICROBIAL FUEL CELLS-PPT
PPTX
molten carbonate fuel cell
PPT
Solar energy ppt
PPTX
Solar Energy
Fuel cells
Visual Art Sculpture and Architecture
Fuel cells and hydrogen energy systems
Fuel cell
Fuel cells
Hydrogen And Fuel Cell Technology For A Sustainable Future
Fuel Cells
Hydrogen fuel cell
Fuel cells presentation
Fuel cells - types, working, construction, fabrication and application
MICROBIAL FUEL CELLS-PPT
molten carbonate fuel cell
Solar energy ppt
Solar Energy
Ad

Similar to Introduction to Fuel (20)

PDF
Being Dangerous with Twig
PDF
Services Drupalcamp Stockholm 2009
PDF
Being Dangerous with Twig (Symfony Live Paris)
PDF
Bentobox exercise
PDF
Symfony2 San Francisco Meetup 2009
KEY
Future of PHP
PDF
Symfony 2.0 on PHP 5.3
PPS
Flickr Php
PDF
TurboGears2 Pluggable Applications
PPTX
Laravel introduction
KEY
Twig for Drupal @ Frontendunited Amsterdam 2012
PDF
Rapid web development, the right way.
PDF
flickr's architecture & php
KEY
The story and tech of Read the Docs
KEY
BEAR (Suday) design
PDF
node.js, javascript and the future
PDF
Symfony 2.0
PDF
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
PDF
Terrific Composer Workshop
PDF
Fork CMS
Being Dangerous with Twig
Services Drupalcamp Stockholm 2009
Being Dangerous with Twig (Symfony Live Paris)
Bentobox exercise
Symfony2 San Francisco Meetup 2009
Future of PHP
Symfony 2.0 on PHP 5.3
Flickr Php
TurboGears2 Pluggable Applications
Laravel introduction
Twig for Drupal @ Frontendunited Amsterdam 2012
Rapid web development, the right way.
flickr's architecture & php
The story and tech of Read the Docs
BEAR (Suday) design
node.js, javascript and the future
Symfony 2.0
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
Terrific Composer Workshop
Fork CMS
Ad

More from Phil Sturgeon (10)

PPTX
API Pain Points (PHPNE)
PPT
Api pain points
PPT
Api pain points
PPT
PHP-FIG: Past, Present and Future
PDF
Become Master of Your Own Universe - DIBI 2013
PDF
Laravel and Composer
KEY
Why I &lt;3 Laravel 4
KEY
CodeIgniter 3.0
KEY
Cms expo
KEY
Running an Open-Source CodeIgniter project
API Pain Points (PHPNE)
Api pain points
Api pain points
PHP-FIG: Past, Present and Future
Become Master of Your Own Universe - DIBI 2013
Laravel and Composer
Why I &lt;3 Laravel 4
CodeIgniter 3.0
Cms expo
Running an Open-Source CodeIgniter project

Recently uploaded (20)

PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPT
Geologic Time for studying geology for geologist
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Modernising the Digital Integration Hub
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Architecture types and enterprise applications.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
Getting started with AI Agents and Multi-Agent Systems
1 - Historical Antecedents, Social Consideration.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
DP Operators-handbook-extract for the Mautical Institute
Univ-Connecticut-ChatGPT-Presentaion.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
Enhancing emotion recognition model for a student engagement use case through...
Geologic Time for studying geology for geologist
Group 1 Presentation -Planning and Decision Making .pptx
Modernising the Digital Integration Hub
A comparative study of natural language inference in Swahili using monolingua...
Architecture types and enterprise applications.pdf
Tartificialntelligence_presentation.pptx
Taming the Chaos: How to Turn Unstructured Data into Decisions
observCloud-Native Containerability and monitoring.pptx
Getting Started with Data Integration: FME Form 101
sustainability-14-14877-v2.pddhzftheheeeee
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network

Introduction to Fuel

  • 1. Introduction to Fuel Phil Sturgeon philsturgeon.co.uk | @philsturgeon
  • 2. WTF is Fuel? • A “new” PHP framework • “Combines the best of multiple frameworks” • Fresh start • PHP 5.3 only • Made by a bunch of CodeIgniter guys
  • 4. It’s freaking brilliant! • Incredibly lightweight • Easy to learn • Huge community • Helpful forums • Backwards compatibility is key • Minimal dependencies • PHP 5.1.6
  • 5. It’s PHP5ier! • Still lightweight • Everything is a class • No more $ci =& get_instance(); • PHP 5 autoloading - no loader! CodeIgniter Fuel $this->load->library('session'); Session::get('foo'); $this->session->userdata('foo'); • Authentication + Hierarchal MVC (HMVC) • “Everything” is a driver
  • 6. • Cascading file system • No namespacing - OAuth_Provider_Facebook - OAuthProvider_Facebook • Splintered: v2.4 versus v3.2 • Great DB builder, not loving the ORM
  • 7. We stole it! • Improved Cascading File System Autoloader::add_classes(array( 'Mongo_OdmCollection' => __DIR__.'/classes/collection.php', 'Mongo_OdmDatabase' => __DIR__.'/classes/database.php', 'Mongo_OdmDocument' => __DIR__.'/classes/document.php', 'Mongo_OdmJSON' => __DIR__.'/classes/json.php', )); • Added Namespacing class Config extends FuelCoreConfig {} • Modules = Routable ‘mini-applications’ • Packages = Installable ‘gem’-like class collections • Recycled a few other bits • Views • OAuth • Num (Credit card masking and other bits)
  • 8. Command-line tools • Database Migrations and ORM bundled in • Twig = awesome parser • Namespaces by the metric fuck-ton namespace AcmeHelloBundleController; use SymfonyComponentHttpFoundationResponse; class HelloController { public function indexAction($name) { return new Response('<html><body>Hello '.$name.'!</ body></html>'); } }
  • 9. • Command-line utilities and tasks $ oil refine robots:protect • Migrations • Database "PROTECT ALL HUMANS" _____ / • Mongo /_____ • Whatever ____[*---*/]____ / # _____/ /# / / # _.---._/ #/ • ORM - lighter and quick / /| | | /| /___/ | | | | | | ___ | | | | |---| | | | | • Twig, HAML, Mustache, etc |__| _| |_#_| |_/ |__| // < _//^_ /> // ||/ |//// /| ||/ • Simple Namespaces | | | | • FuelApp |---| |---| • FuelCore |---| | | |---| | | • Auth |___| |___| • Orm / / |_____| |_____| • Oil |HHHHH| |HHHHH| • each module / package
  • 10. // old usage still valid, will load app/views/example.php View::forge('example'); // load a Mustache template, will load and parse app/views/ View::forge('example.mustache'); // load a Twig template, will load and parse app/views/example.twig View::forge('example.twig'); // load a Jade template, will load and parse app/views/example.jade View::forge('example.jade'); // load a Haml template, will load and parse app/views/example.haml View::forge('example.haml'); // load a Smarty template, will load and parse app/views/ View::forge('example.smarty'); // load a Dwoo template, ATTENTION: this one expects app/views/ View::forge('example.dwoo');
  • 12. • Beautiful command line • Conventions through the nose • Interactive Debugging • How the f**k does that work • Package installation • Gem conflicts = AGGHHHH! • http://rubygems.org/ • Consult a wizard if it breaks • Scaffolding • ORM restrictions? • ORM - perfect for RAD
  • 13. • Beautiful command line • No conventions • Interactive Debugging • Simple OOP • Package installation • Application specific packages • http://cells.fuelphp.com/ • Pretty exceptions • Scaffolding • Scaffold templates • ORM - perfect for RAD • DWTFYL ORM
  • 14. $ oil create blog $ cd blog $ oil generate scaffold title:string summary:text body:text
  • 15. DHH DH
  • 16. Any Questions? Thanks for listening! philsturgeon.co.uk | @philsturgeon

Editor's Notes