PHP frameworks provide common features like models, views, and controllers so developers don't have to build these from scratch. The document discusses several popular PHP frameworks like Laravel, Yii, Symfony, CakePHP, CodeIgniter, Phalcon, and Zend. It notes that while frameworks make similar claims about being fast, easy to use, and robust, personal preference and experience with a framework should be the primary factors in selection.
2. Why use a framework?
โข Common features of web apps are created by the framework so
you donโt have to code them yourself
โข Provides predictable locations for the code you write (models are
in, duh, the /models directory)
โข Enforcing standards
โข Allegedly โfasterโ and โbetterโ
โข Your boss or client tells you to
โข All the other code at work is written with it
โข You enjoy it
3. YOU ENJOY IT!!!
โข Unless you need to follow a coding standard that
determines your framework selection (ie, โWeโre
a Yii shop, by golly!โ), personal preference
should be your primary selection criteria
โข You will code โbetterโ and โfasterโ if you use tools
that you like
โข Your code will be โbetterโ and โfasterโ if you use
tools that you like
4. Thatโs why we solicited help from people with
experience using particular frameworks for todayโs talk.
Nothing you read on the internet will help you
understand what itโs like to develop with a given
framework as well as hearing about it ๏ฌrst-hand.
5. So. Many. Choices.
โข There are, no kidding, dozens of PHP frameworks.
โข They all make similar claims:
โข โfastโ, โeasyโ, โsecureโ, โrobustโ, โuse only those features you
needโ, โsmall footprintโ, โgreat documentationโ, โvibrant user
communityโ
โข The one important claim seems to be โmodernโ, but I couldnโt ๏ฌnd a
good de๏ฌnition of that
โข Requires PHP 5.3+?
โข Templates?
โข ActiveRecord
6. In my googling, these claims
stood out:
โข Laravel is sexy
โข Phalcon is fast
โข Zend is slow
โข There are lots of webpages that list the top X popular PHP
frameworks, but few contain more detail than you can get from the
framework homepage (I hate you, Buzzfeed. You ruined the internet.)
โข Notable exception: http://www.sitepoint.com/best-php-
frameworks-2014/
โข Forums seem to be the most proli๏ฌc source of personal opinions
about frameworksโฆimagine that.
7. The 8 PHP Frameworks You
Have To Learn RIGHT NOW
โข Laravel
โข Yii
โข Symfony
โข Silex
โข CakePHP
โข CodeIgniter
โข Phalcon
โข Zend
9. โข http://laravel.com/
โข Combines the best tools and philosophies from various projects, to make development
faster, funner, and eleganter.
โข Symfony packages deep under the hood, where you will likely never see them.
โข Eloquent ORM for a very Ruby on Rails-ish data abstraction experience.
โข Artisan CLI, notably: access to models. C&P commands into your tests & voilร !
โข Database migrations (with improved rollbacks in Laravel 5)
โข Composer dependency manager. Don't like Eloquent? Plug in your own ORM!
โข You can override or replace almost any component!
โข Homestead (pre-fab Vagrant VM) and Forge (Heroku-style hosting) = RAPID.
โข LaraCon 2015 will be held in exotic Louisville, KY on Aug. 11โ12!
Laravel
14. CakePHP
โข http://cakephp.org/
โข 2 out of 2 PHP user group organizers think the website is just
darling
โข Inspired by Ruby on Rails and will feel very familiar to RoR
developers
โข Was the ๏ฌrst MVC framework for PHP
โข V3 is a signi๏ฌcant overhaul, making CakePHP more โmodernโ
โข Has been criticized for poor documentation and lack of help for
newbies, but that seems to be changing (as evidenced by its
super-friendly website design)
18. Phalcon
โข Unique among platforms in that it is a C extension. You need
to compile it into PHP (or download a suitably compiled
binary, which makes things complicated on Windows)
โข Wicked fast, since the framework components are inside the
PHP executable
โข Excellent choice for high-volume applications that will
bene๏ฌt from its speed
โข Poor choice for hosted environments where you donโt control
the version of PHP or you share resources with other tenants
20. Zend
โข http://framework.zend.com/
โข Began life as part of the PHP language, was created by core contributors to
the PHP language
โข Well-established user base (perhaps skewed to enterprise level
development)
โข Thriving community, excellent documentation, active development (v3 is in
the pipeline)
โข Historically, has been criticized for having a steep learning curve
โข Corporate backing - Zend is maintained by the Zend company, which
provides PHP application development products and services (and therefore
may be a good choice if you plan to use those products and services)
21. Summary
โข Not all PHP frameworks are created equal, but
they share many common features
โข So, your choice might have little to do with overall
feature set and lots to do with one particular thing
a framework does well or a community
characteristic, like an IRC channel for instant help
โข Distribution license of the framework may matter
for your applications (MIT, BSD, etc)