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 bunc...
It’s freaking brilliant!• Incredibly lightweight• Easy to learn• Huge community• Helpful forums• Backwards compatibility i...
It’s PHP5ier!• Still lightweight• Everything is a class• No more $ci =& get_instance();• PHP 5 autoloading - no loader!   ...
• Cascading file system• No namespacing  - OAuth_Provider_Facebook  - OAuthProvider_Facebook• Splintered: v2.4 versus v3.2•...
We stole it!• Improved Cascading File System     Autoloader::add_classes(array(          Mongo_OdmCollection => __DIR__./c...
•   Command-line tools•   Database Migrations and ORM bundled in•   Twig = awesome parser•   Namespaces by the metric fuck...
• Command-line utilities and tasks                                     $ oil refine robots:protect• Migrations  • Database...
// old usage still valid, will load app/views/example.phpView::forge(example);// load a Mustache template, will load and p...
• Beautiful command line   • Conventions through the nose• Interactive Debugging    • How the f**k does that work• Package...
• Beautiful command line      • No conventions• Interactive Debugging       • Simple OOP• Package installation        • Ap...
$ 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
Introduction to Fuel
Introduction to Fuel
Upcoming SlideShare
Loading in...5
×

Introduction to Fuel

4,268

Published on

Published in: Technology
1 Comment
5 Likes
Statistics
Notes
No Downloads
Views
Total Views
4,268
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
42
Comments
1
Likes
5
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Introduction to Fuel

    1. 1. Introduction to Fuel Phil Sturgeon philsturgeon.co.uk | @philsturgeon
    2. 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. 3. It’s freaking brilliant!• Incredibly lightweight• Easy to learn• Huge community• Helpful forums• Backwards compatibility is key• Minimal dependencies• PHP 5.1.6
    4. 4. 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
    5. 5. • Cascading file system• No namespacing - OAuth_Provider_Facebook - OAuthProvider_Facebook• Splintered: v2.4 versus v3.2• Great DB builder, not loving the ORM
    6. 6. 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)
    7. 7. • 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>); } }
    8. 8. • 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
    9. 9. // old usage still valid, will load app/views/example.phpView::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.twigView::forge(example.twig);// load a Jade template, will load and parse app/views/example.jadeView::forge(example.jade);// load a Haml template, will load and parse app/views/example.hamlView::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);
    10. 10. • 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
    11. 11. • 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
    12. 12. $ oil create blog$ cd blog$ oil generate scaffold title:string summary:text body:text
    13. 13. DHH DH
    14. 14. Any Questions?Thanks for listening!philsturgeon.co.uk | @philsturgeon
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×