managing frontend libs in your php project

11

Click here to load reader

Upload: massimiliano-arione

Post on 05-Dec-2014

242 views

Category:

Technology


2 download

DESCRIPTION

phpDay 2014 unconference presentation

TRANSCRIPT

Page 1: Managing frontend libs in your php project

Managing frontend libs in your PHP project

Massimiliano Arione

PHPDay 2014 Unconference

Page 2: Managing frontend libs in your php project

about me

CTO at bee-lab.net

PHP dev since ~2000fell in love with Symfony ~2007president of PUG Roma

https://twitter.com/garakkio

Page 3: Managing frontend libs in your php project

problem

You need to manage some frontend libraries

Examples:❏ jquery❏ bootstrap❏ font awesome❏ you name it

Page 4: Managing frontend libs in your php project

solution #1

ask your frontend colleague

PROSsuper simple

CONShe/she can do a messthere’s no frontend colleague

Page 5: Managing frontend libs in your php project

solution #2

Use CDNs

PROSsuper fast

CONSdoes not work when offlinenot everything is on a CDN

Page 6: Managing frontend libs in your php project

solution #3

Put them in your repo

PROScomplete control over sources

CONSyou have to maintain vendors

Page 7: Managing frontend libs in your php project

solution #4

Use Composer

PROSyou are already using it (are you?)

CONSbackend and frontend mixedduplicated code

Page 8: Managing frontend libs in your php project

solution #5

Use Bower

PROSjust declare vendors in your repo

CONSyou need node.js

Page 9: Managing frontend libs in your php project

solution #6

Use BowerPHP

PROSjust declare vendors in your repo

CONS...

Page 10: Managing frontend libs in your php project

thanks

http://www.bowerphp.org/