HISTORY OF PHP Created in 1994 by Rasmus Lerdorf - @rasmus Written in C Personal Home Page Tools ZEND - Andi Gutmans and Zeev Suraski PHP - Hypertext Preprocessor
Simplicity - Highly learnable The easiest language to learn for non-technical people Fast and reliable Platform independent Bunch of good tools Bunch of extensions Good (and extensive) documentation Big players involved (FB...) Open source Lets you get things done
Tim Bray “All the PHP code I’ve seen in that experience has been messy, unmaintainable crap. Spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML, replicated in slightly- varying form in dozens of places”
namespace League\Flysystem; use LogicException; use InvalidArgumentException; class Filesystem implements FilesystemInterface { // variable declaration hidden in this example /** * Constructor * * @param AdapterInterface $adapter * @param mixed $config */ public function __construct(AdapterInterface $adapter, $config = null)
The problem that Composer solves is this: You have a project that depends on a number of libraries Some of those libraries depend on other libraries You declare the things you depend on Composer finds out which versions of which packages need to be installed, and installs them (meaning it downloads them into your project)
THE LOCK FILE composer.lock Provide fast installs with low memory usage Reproducible installs Do you add it to .gitignore? Commit it and use it with composer install
BEFORE YOU CHOOSE PACKAGE Check if it is properly tested Check documentation (README.md) Check Stability dev -> alpha -> beta -> RC -> stable Check number of downloads Check when it was last authored Check the licence
TAKE CARE ABOUT THIS What do you want to build? Is good documentation available? Is it worth the investment? Community Comparing with other FW Check the licence Security
3 DONT'S Don't spend countless hours in search of the „best“ framework. There is no such thing! Don't get religious with a language / framework / whatever! Don't decide based on stupid „hello world“ benchmarks.
There is bundle for everything Integrates with Doctrine, Propel, PHPUnit ... Aims to speed up the creation and maintenance of web applications Aim at building enterprise-level applications, giving developers full control over the configuration
Database agnostic migrations and schema builder Great ORM - Eloquent Painless routing Blade Templating Engine Powerful queue library Validation Built with testing in mind
Implemented as a C extension Learning curve is pretty easy Support Micro and Macro application Loosely coupled to allow developers to use the whole framework or selected objects Neat and clean intuitive API with solid code written on powerful design patterns