Managing frontend libs in your Symfony project
Massimiliano Arione
SymfonyCon lighting talksMadrid, 2014
about me
CTO at bee-lab.net
PHP dev since ~2000fell in love with Symfony ~2007president of PUG Roma
https://twitter.com/garakkio
problem
You need to manage some frontend libraries
Examples:❏ jquery❏ bootstrap❏ font awesome❏ you name it
solution #1
ask your frontend colleague
PROSsuper simple
CONShe/she can do a messthere’s no frontend colleague
solution #2
Put them in your repo
PROScomplete control over sources
CONSyou have to maintain vendors
solution #3
Use CDNs
PROSsuper fast
CONSdoes not work when offlinenot everything is on a CDN
solution #4
Use Composer
PROSyou are already using it (are you?)
CONSbackend and frontend mixedduplicated code
solution #5
Use Bower
PROSjust declare vendors in your repo
CONSyou need node.js
solution #6
Use BowerPHP
PROSjust declare vendors in your repo
CONS...
references
https://github.com/RobLoach/component-installer
http://bower.io/
http://bowerphp.org/