SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

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

Hinweis der Redaktion

  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