fuelphp presentation - peopleperhour workshop

26
Exploring FuelPHP Why on earth would you do that?

Upload: fotis-alexandrou

Post on 02-Jul-2015

142 views

Category:

Software


0 download

DESCRIPTION

A short presentation about FuelPHP framework i gave in 2012 in a workshop held by PeoplePerHour.com in its Athens HQ

TRANSCRIPT

Page 1: FuelPHP presentation - PeoplePerHour workshop

Exploring  FuelPHP  

Why  on  earth  would  you  do  that?  

Page 2: FuelPHP presentation - PeoplePerHour workshop

Eeeeewwww  you  use  PHP?  

•  Isn’t  PHP  like…  ancient?  

•  Who  writes  PHP?    You  know  it’s  2012,  right?  

Page 3: FuelPHP presentation - PeoplePerHour workshop

We  do!  

•  PeoplePerHour  does  

•  Facebook  does  

•  Mailchimp  does  

Page 4: FuelPHP presentation - PeoplePerHour workshop

Why  PHP  

•  Well  established  language  

•  Huge  community  

•  Great  support  by  hosting  providers,  docs,  

libraries,  open  source  projects,  frameworks  

Page 5: FuelPHP presentation - PeoplePerHour workshop

What  is  FuelPHP?  

•  (H)MVC  PHP  Framework  

•  PHP  5.3+  up  

•  100+  Contributors  

•  Best  developers  from  CodeIgniter  and  others  

Page 6: FuelPHP presentation - PeoplePerHour workshop

Aren’t  there  more  than  enough  frameworks?  

many  others…  

Page 7: FuelPHP presentation - PeoplePerHour workshop

Why  is  it  different  

•  Best  ideas  from  all  PHP  frameworks  

combined  

•  Fresh  and  up  to  date  

•  Brings  new  ideas  to  the  table  

Page 8: FuelPHP presentation - PeoplePerHour workshop

Idea  #1  

•  Out  of  the  box  support  for  NoSQL  

– Mongo  

– Redis  

Page 9: FuelPHP presentation - PeoplePerHour workshop

Idea  #2  

•  Unified  static  method  for  getting  a  class  

singleton  

//example:!

return View::forge('home/index');!

 

Page 10: FuelPHP presentation - PeoplePerHour workshop

Idea  #3  

•  Utilize  PHP  namespaces  so  that  the  classes  

can  have  human  readable  names  

echo Form::button('name', 'value’);!

Page 11: FuelPHP presentation - PeoplePerHour workshop

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!

}!

 

Page 12: FuelPHP presentation - PeoplePerHour workshop

Idea  #5    

•  Routers  inside  controllers  

Page 13: FuelPHP presentation - PeoplePerHour workshop

Idea  #6  

•  ViewModels:  Even  less  logic  inside  views  

Page 14: FuelPHP presentation - PeoplePerHour workshop

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)  

Page 15: FuelPHP presentation - PeoplePerHour workshop

Idea  #8  

•  Extremely  easy  installation  (copy/paste  2  

commands)  

 

Page 16: FuelPHP presentation - PeoplePerHour workshop

Idea  #9  

•  Heavily  utilize  Git(hub)  

– From  installation  to  packages  

 

Page 17: FuelPHP presentation - PeoplePerHour workshop

Why  I  like  it  

•  No  camelCase  allowed  (surprise)  

•  Super  fast  to  learn  

•  I  like  the  guys  that  are  working  on  it  

Page 18: FuelPHP presentation - PeoplePerHour workshop

So,  is  it  the  best  framework?  

•  No.  

Page 19: FuelPHP presentation - PeoplePerHour workshop

Which  PHP  framework  is  the  best?  

•  None  

Page 20: FuelPHP presentation - PeoplePerHour workshop

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  

Page 21: FuelPHP presentation - PeoplePerHour workshop

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  

Page 22: FuelPHP presentation - PeoplePerHour workshop

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  

Page 23: FuelPHP presentation - PeoplePerHour workshop

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  

Page 24: FuelPHP presentation - PeoplePerHour workshop

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  

Page 25: FuelPHP presentation - PeoplePerHour workshop

Questions  

•  Go!  

Page 26: FuelPHP presentation - PeoplePerHour workshop

What  is  your  weapon  of  choice?  

•  Thanks