Your SlideShare is downloading. ×
0
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Introduction to Fuel
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to Fuel

4,226

Published on

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

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 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. It’s freaking brilliant!• Incredibly lightweight• Easy to learn• Huge community• Helpful forums• Backwards compatibility is key• Minimal dependencies• PHP 5.1.6
    • 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. • Cascading file system• No namespacing - OAuth_Provider_Facebook - OAuthProvider_Facebook• Splintered: v2.4 versus v3.2• Great DB builder, not loving the ORM
    • 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. • 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. • 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. // 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. • 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. • 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. $ oil create blog$ cd blog$ oil generate scaffold title:string summary:text body:text
    • 13. DHH DH
    • 14. Any Questions?Thanks for listening!philsturgeon.co.uk | @philsturgeon

    ×