SlideShare a Scribd company logo
1 of 16
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
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');
• 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

Viewers also liked

Fuel cells presentation
Fuel cells presentationFuel cells presentation
Fuel cells presentation
Vaibhav Chavan
 
MICROBIAL FUEL CELLS-PPT
MICROBIAL FUEL CELLS-PPTMICROBIAL FUEL CELLS-PPT
MICROBIAL FUEL CELLS-PPT
Shabeeba V A
 
Solar energy ppt
Solar energy pptSolar energy ppt
Solar energy ppt
shubhajit_b
 

Viewers also liked (14)

Fuel cells
Fuel cellsFuel cells
Fuel cells
 
Visual Art Sculpture and Architecture
Visual Art Sculpture and ArchitectureVisual Art Sculpture and Architecture
Visual Art Sculpture and Architecture
 
Fuel cells and hydrogen energy systems
Fuel cells and hydrogen energy systemsFuel cells and hydrogen energy systems
Fuel cells and hydrogen energy systems
 
Fuel cell
Fuel cellFuel cell
Fuel cell
 
Fuel cells
Fuel cellsFuel cells
Fuel cells
 
Hydrogen And Fuel Cell Technology For A Sustainable Future
Hydrogen And Fuel Cell Technology For A Sustainable FutureHydrogen And Fuel Cell Technology For A Sustainable Future
Hydrogen And Fuel Cell Technology For A Sustainable Future
 
Fuel Cells
Fuel CellsFuel Cells
Fuel Cells
 
Hydrogen fuel cell
Hydrogen fuel cellHydrogen fuel cell
Hydrogen fuel cell
 
Fuel cells presentation
Fuel cells presentationFuel cells presentation
Fuel cells presentation
 
Fuel cells - types, working, construction, fabrication and application
Fuel cells - types, working, construction, fabrication and applicationFuel cells - types, working, construction, fabrication and application
Fuel cells - types, working, construction, fabrication and application
 
MICROBIAL FUEL CELLS-PPT
MICROBIAL FUEL CELLS-PPTMICROBIAL FUEL CELLS-PPT
MICROBIAL FUEL CELLS-PPT
 
molten carbonate fuel cell
molten carbonate fuel cellmolten carbonate fuel cell
molten carbonate fuel cell
 
Solar energy ppt
Solar energy pptSolar energy ppt
Solar energy ppt
 
Solar Energy
Solar EnergySolar Energy
Solar Energy
 

Similar to Introduction to Fuel

Systems Automation with Puppet
Systems Automation with PuppetSystems Automation with Puppet
Systems Automation with Puppet
elliando dias
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
Omar Reygaert
 
Desymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus BundlesDesymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus Bundles
Albert Jessurum
 

Similar to Introduction to Fuel (20)

HTML5 Web forms & microdata - Akiva Levi
HTML5 Web forms & microdata - Akiva LeviHTML5 Web forms & microdata - Akiva Levi
HTML5 Web forms & microdata - Akiva Levi
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
 
HoneyPy & HoneyDB (TriPython)
HoneyPy & HoneyDB (TriPython)HoneyPy & HoneyDB (TriPython)
HoneyPy & HoneyDB (TriPython)
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
Mark Collier Keynote - OpenStack Day London June 2014
Mark Collier Keynote -  OpenStack Day London June 2014Mark Collier Keynote -  OpenStack Day London June 2014
Mark Collier Keynote - OpenStack Day London June 2014
 
Tips on how to build Camunda Run for production
Tips on how to build Camunda Run for productionTips on how to build Camunda Run for production
Tips on how to build Camunda Run for production
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
Systems Automation with Puppet
Systems Automation with PuppetSystems Automation with Puppet
Systems Automation with Puppet
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!
 
Vmth project
Vmth projectVmth project
Vmth project
 
VMTH Project
VMTH ProjectVMTH Project
VMTH Project
 
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructuresMaster Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
 
Intro to Rails
Intro to Rails Intro to Rails
Intro to Rails
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부
 
Dev Day 2019: Phillip Krenn – Aggregierte Logging Patterns
Dev Day 2019: Phillip Krenn – Aggregierte Logging PatternsDev Day 2019: Phillip Krenn – Aggregierte Logging Patterns
Dev Day 2019: Phillip Krenn – Aggregierte Logging Patterns
 
Desymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus BundlesDesymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus Bundles
 

More from Phil Sturgeon

Why I &lt;3 Laravel 4
Why I &lt;3 Laravel 4Why I &lt;3 Laravel 4
Why I &lt;3 Laravel 4
Phil Sturgeon
 
Running an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter projectRunning an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter project
Phil Sturgeon
 

More from Phil Sturgeon (10)

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

Recently uploaded

Recently uploaded (20)

Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 

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
  • 3.
  • 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');
  • 11.
  • 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

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n