fuelphp presentation - peopleperhour workshop
DESCRIPTION
A short presentation about FuelPHP framework i gave in 2012 in a workshop held by PeoplePerHour.com in its Athens HQTRANSCRIPT
Exploring FuelPHP
Why on earth would you do that?
Eeeeewwww you use PHP?
• Isn’t PHP like… ancient?
• Who writes PHP? You know it’s 2012, right?
We do!
• PeoplePerHour does
• Facebook does
• Mailchimp does
Why PHP
• Well established language
• Huge community
• Great support by hosting providers, docs,
libraries, open source projects, frameworks
What is FuelPHP?
• (H)MVC PHP Framework
• PHP 5.3+ up
• 100+ Contributors
• Best developers from CodeIgniter and others
Aren’t there more than enough frameworks?
many others…
Why is it different
• Best ideas from all PHP frameworks
combined
• Fresh and up to date
• Brings new ideas to the table
Idea #1
• Out of the box support for NoSQL
– Mongo
– Redis
Idea #2
• Unified static method for getting a class
singleton
//example:!
return View::forge('home/index');!
Idea #3
• Utilize PHP namespaces so that the classes
can have human readable names
echo Form::button('name', 'value’);!
Idea #4 • H-‐MVC Requests: Controllers can be loaded by controllers
as widgets
if((Request::main() === Request::active()) {!
!// this is the main request!
} else {!
// this is a HMVC request!
}!
Idea #5
• Routers inside controllers
Idea #6
• ViewModels: Even less logic inside views
Idea #7
• Provide various types of controllers for templating:
– Base
– Rest
– Template
• Support a load of template engines through Parser
package: (Mustache, Markdown, Smarty, Twig, Haml,
Jade, Dwoo)
Idea #8
• Extremely easy installation (copy/paste 2
commands)
Idea #9
• Heavily utilize Git(hub)
– From installation to packages
Why I like it
• No camelCase allowed (surprise)
• Super fast to learn
• I like the guys that are working on it
So, is it the best framework?
• No.
Which PHP framework is the best?
• None
Exhibit A: Codeigniter
• Project I worked on: As a mobile app I would
like to send request to a REST API and get
JSON
– Only 3 things used: Database, Memcache, JSON
Exhibit B: FuelPHP
• Project I’m working on: As a developer I would
like to have a playground project that has no
actual use and scope, so I can torture myself
during the weekends
Choosing a framework is a matter of taste
• Choose any framework you want, seriously
• Doesn’t mind which one as long as it provides
the right tools for the job and you’re building
something awesome
But the benchmarks…
• Screw the benchmarks
• It’s not all about how many requests per
second a framework can handle
• MVC is slower than plain PHP anyway
Where can I find more info?
• fuelphp.org – @fuelphp
• Phil Sturgeon – philsturgeon.co.uk -‐ @philsturgeon
• Dan Horrigan – dh.io -‐ @dhorrigan
• Jelmer Schreuder
– jelmerschreuder.nl -‐ @jelmer_fuel
Questions
• Go!
What is your weapon of choice?
• Thanks