SlideShare ist ein Scribd-Unternehmen logo
1 von 41
What’s the “right”
PHP Framework?
Barry Jones
Who am I?
• Barry Jones
• Java/Groovy/PHP/Perl developer since ’98
• Ruby on Rails developer mostly since 2012
• Formerly ran Brightball, Inc here in Greenville
– Contract programming business from 2008-2012
– 99% CakePHP…
– Built our platform “The Intersect” on top of Cake
• Software Architect with ACS Technologies, Inc
SO WHICH ONE IS IT?
The people need to know….
Is it…
• Zend Framework?
• CakePHP?
• Symfony?
• FuelPHP?
• Code Igniter?
• Lithium?
• Laravel?
• Solar?
OR….
• Kohana?
• Yii?
• Prado?
• Akelos?
• PHP Fat-Free?
• Agile Toolkit?
• Silex?
• Phunction?
• K2F?
• Phraw?
• Qcodo?
• Slim?
• Phalcon?
• Roll your own…?
WHY SO MANY?
The million dollar question…
Before we answer that…
Why do other languages seem to have clear leaders?
• Ruby has Rails
• Python has Django
• Groovy has Grails
• C# has MVC
• Java has Spring
Many solutions to the same problem…
usually indicates an underlying issue…
which leads to lots of trade offs
What does that mean for PHP?
PHP is bad at frameworks…
…out of the box
So let’s dig into that a little
• Ruby, Python, Groovy, C#, and Java have
something in common
• They boot up…
– The application gets loaded into RAM
– Runs initializer code
– Makes its database connection(s) with a pool
– Listens for requests and only processes that request
– Can share RAM between requests
– Built for long term garbage collection
PHP…
• Reprocesses everything on every single request
• Configuration
• Route mappings
• Database connections
• Loading all of those framework files
– Devastating to Disk I/O
• Encapsulates and garbage collects each individual
process
So a PHP framework has too…
• Cache…heavily
– And then reload those configuration caches on
every request
• Per request RAM allocation is HEAVY
– It’s not loaded once and then processed
– Framework is loaded every time for every request
A HISTORY LESSON
Don’t worry, we’ll get back to the story
Rails lit the world on fire
• Java’s Struts popularized MVC…but was awful
• Rails made MVC good…
– And EEEEEEVERYBODY copied it as best they could
– CakePHP was a near clone for a while
– Microsoft’s MVC framework…almost carbon copy
– Grails…do I need to explain this?
But why did Rails take off?
• Ruby is great…but it’s not built for the web
• PHP is built for the web
• Ruby is an excellent language for writing Domain Specific Languages (DSLs)
– Think….
• Puppet, Chef, Capistrano, Vagrant
– Rails is a DSL for the web
• It changes Ruby to make it a web language
• That added to its popularity significantly in the Ruby community
– Nearly every Ruby library has a Rails version for premium integration
– Ruby developers are very big on testing because of the language’s flexibility
• good at testing and easy to break
– Ruby developers place a premium on workflow
• That’s a heck of a lot more than just arranging some files and throwing
routing and hooks on top…they built an entire mode of operation
This is important for PHP
PHP is built for the web out of the box
With no framework…
it can rock your face off
So why so many frameworks?
• Well…prior to PHP 5.3
– PHP was terrible for frameworks for all the reasons
previously mentioned
• Also, lack of namespaces made sharing libraries a PAAAAIN
– 5.3 was released in 2010
– CakePHP 1.1 was popular in 2006 because it ran on
PHP 4 and PHP 5 while structurally copying Rails
– The PHP “framework wars” started during a time
when PHP was bad at frameworks…hence the variety,
saturation, and trade offs
• Everybody tried to solve the problem a different way
Prior to 5.3 you needed to…
• Enable APC on the server
– Optimized PHP byte code cached in RAM
– Share RAM between process (under Apache mod_php only)
– In production, set APC to not check for file changes
– This got around the Disk I/O and overhead of reloading all those files
– Also drastically reduced per-request RAM
• With CakePHP we’d go from 12mb to 2mb (also mod_php only)
• Configure a database connection pool within Apache
– OR ensure you were using MySQL because the overhead of new connections is almost
negligible
• Avoid .htaccess files like the plague
– Every framework used them for “pretty urls” instead of having them added to a server config
• Setup a reverse proxy w/ nginx
– Intercept non-application requests prior to Apache processing .htaccess rules
• Use framework specific class loaders to try to load things only when necessary
• Frameworks had to roll almost everything themselves to avoid naming conflicts
with outside libraries
– Extensive “does this work with X?” syndrome
So what changed?
• In 5.3
– Late static bindings
– Namespaces
• In 5.4
– Traits
– Artisan
• Built in Web Server
• CLI
• These allow…
– Lazy loading
– Dependency injection
– Aspect Oriented
Programming (AOP)
– Simpler development
workflow
– Much easier library / package
management
What is PHP good at?
• Scales down OR up better than any other language
– “Boot up” web languages can’t scale down easily
– With PHP, you can fill up a hard drive with code and it will all work
• Other languages, you fill up your RAM and you’re done
• This is why PHP shared hosting is everywhere and dirt cheap
• Encapsulation of each request provides near perfect server stability
– Tell me next time somebody uses “PHP” and “Memory Leak” in a sentence
– If a request dies it can’t crash the server
• In it’s raw form, it can already do almost everything you need
– Example: Built an on-the-fly image processing server for a huge site
– Same functionality previously kept crashing Rails processes
…because memory leaks
– Increased efficiency by 3000% (seriously)
Oh…and it can fly (the scaling up part)
What is PHP bad at?
More on long polling
• PHP is bad at long running process
• Long polling involves many long running connections
– which for PHP means many long running processes…
– which will vary based on the number of your users
So for example:
• Optimal PHP request/response cycle
– Request received
– PHP started
– Libraries loaded/RAM allocated (2-12mb)
– Request processed
– Request ended, garbage collected
– Total time < .5 seconds (hopefully)
• Long polling PHP request/response cycle
– Request received
– PHP started
– Libraries loaded/RAM allocated (2-12mb)
– ………. (30-60 seconds)
– Request ended, garbage collected
– Total time 30-60 seconds
– Your servers RAM will be swallowed with a dramatically lower number of users from
holding open dozens of 12mb connections
– You can make it “work” but in production you’ll have massive scaling issues
from concurrency
• nginx_http_push_module – This is not a php specific solution
– Request received with internal response address
– PHP started
– Libraries loaded/RAM allocated (2-12mb)
– Requested added to queue
– Request ended, garbage collected
– Total time < .5 seconds
– nginx holds the long polled connection instead of php
– Single background process pulls requests off the queue and processes them
– Sends response to the internal response address
– The background process handles responding to the long polling request so you control
how many are running in parallel, not your user traffic
– nginx holds the concurrent connections efficiently (as good or greater concurrency than
Node.js)
Long running processes
• Please don’t use PHP for long
polling…ever
• No really
• All those documents that say PHP
is bad at long polling…don’t take
it as a challenge…they mean it
• But if you must use
nginx_http_push_module
Also…method syntax consistency and
assorted other quirks…
But it’s more than just code
• The business problem:
– How do I find programmers who know this framework?
• Case: Brightball
– I loved CakePHP. It was complex, had a steep learning curve but
was incredibly powerful
– We built a tool around it that would generate a permission
controlled, data linked, interface based solely off of the
database structure
• AKA “The Intersect” (we were big fans of Chuck)
• Really bad for billable hours 
– Hard to find people who knew Cake (or any other specific
framework) despite “popularity” numbers
– With complexity, training and learning curve are bad
This is where Code Igniter took off
• Code Igniter was not as awesome as Cake
(sorry CI people)
– I know one of you wants to argue this point…your opinion is wrong
• But it was a heck of a lot simpler
• Learning curve and training ease led to a huge
following
– And Expression Engine
Not a problem in other languages
• Dominant frameworks lead to common knowledge
bases among developers
• Hard to find a Ruby programmer that doesn’t know
Rails
• That allows continuous evolution because businesses
avoid the training/hiring quandry
• Namespaces allows easy library integration and sharing
between frameworks and for the language as a whole
Then there’s workflow…
• Common frameworks lead to…
– Common testing integrations
– Common library integrations
– Common database flow
– Common team operations
So the answer is…?
If I have to tell you the “right” framework...
then there isn’t a clear choice
WAT!
No!
Not that!
Just kidding 
LET’S TALK ABOUT LARAVEL
This will be fun
First the framework wars
• What about all the “other” frameworks
– All of the existing dominant frameworks have to
maintain a migration path for their user bases
– This makes full reinvention on php >= 5.4…hard
• Laravel does not have this problem
– But it does need to gain widespread adoption
So first up…
Laravel is a Rails clone
And I mean that in a good way
They didn’t just go for file structure
Or callbacks
Or active record
Or middleware
Or migrations
Or testing
Or workflow
Or modularity
They ate the whole…dang…thing
Libraries
Ruby on Rails
• Ruby has Gems
• Rails applications have a
Gemfile
• Bundler installs Gems and
manages dependencies
PHP and Laravel
• PHP has Composer
– And PEAR
– And PECL
• Laravel uses Composer
• Namespaces make this work
Dev Environment
Ruby on Rails
• Ruby has RVM
– Ruby version manager
– “cd” into a project directory and
your ruby version and gemset
changes
• Bundled web server
– From your project directory, your
application runs
– Dozens of projects in different
versions, with different libraries
and different dependencies are
easy
• Command line app access
– Rails console
PHP and Laravel
• Php 5.4 + has Artisan
– Going forward, running multiple
local versions of PHP will be easier
– Also will make tools like Foreman
an option for complex apps
• Laravel has Homestead
– Complete Vagrant based dev
environment
– A framework that takes dev
environments this seriously is huge
– Will only improve thanks to Docker
• Command line app access
– Artisan CLI
Migrations
Ruby on Rails
• Migrations are “the” way
• Necessary for teams
working on the same code
locally
• Eases deployment across
multiple environments
PHP and Laravel
• Migrations are “the” way
• Virtually identical to Rails
migrations
ORM
“Laravel ships with a superb ORM: Eloquent. If
you have used the Ruby on Rails framework, you
will find Eloquent familiar, as it follows the
ActiveRecord ORM style of database
interaction.”
– Laravel documentation
Deployment
Ruby on Rails
• You can always run your
own…
• But Heroku is where Rails
apps begin
• Deployment:
– `git push heroku master`
– Aaaaand that’s it
PHP and Laravel
• You can always run your
own…
• But Laravel Forge makes it
easy to get
 THAT
On Linode, Digital Ocean,
Rackspace or AWS
Other stuff
Ruby on Rails
• Built with testing in mind
• Queuing is standardized
• RESTful
• Excellent localization
• Extremely well documented
• Rack Middleware layer
• Highly modular
• Very clean syntax
Laravel
• Built with testing in mind
• Queuing is standardized
• RESTful
• Excellent localization
• Extremely well documented
• StackPHP Middleware Layer
• Highly modular
• Very clean syntax
What Laravel needs…
• Like any PHP Framework, it needs saturation
• It’s covered all the other bases
– Powerful MVC framework
– Developer workflow
– Full language package management
– Simple, fast deployment options
– Very well documented
– Built for teams (testing + migrations)
– Modular
• Just needs more people using it to solve the “hiring”
case
Thanks!
now go learn Laravel
Credits/Reference
• http://www.techempower.com/benchmarks/#section=data
-r9
• http://laravel.com/
• http://rubyonrails.org/
• http://cakephp.org/
• http://ellislab.com/codeigniter
• https://www.google.com/imghp
• http://rack.github.io/
• http://stackphp.com/
• http://php.net/releases/5_3_0.php
• http://php.net/releases/5_4_0.php
• http://www.php.net//manual/en/book.apc.php

Weitere ähnliche Inhalte

Was ist angesagt?

Modern Java Concurrency (OSCON 2012)
Modern Java Concurrency (OSCON 2012)Modern Java Concurrency (OSCON 2012)
Modern Java Concurrency (OSCON 2012)Martijn Verburg
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionOrtus Solutions, Corp
 
Making CLI app in ruby
Making CLI app in rubyMaking CLI app in ruby
Making CLI app in rubyHuy Do
 
PHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traitsPHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traitsGraham Weldon
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVMAlex Birch
 
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ PublishContent Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ PublishJani Tarvainen
 
JSR 335 / java 8 - update reference
JSR 335 / java 8 - update referenceJSR 335 / java 8 - update reference
JSR 335 / java 8 - update referencesandeepji_choudhary
 
SydPHP March 2012 Meetup
SydPHP March 2012 MeetupSydPHP March 2012 Meetup
SydPHP March 2012 MeetupGraham Weldon
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011Graham Weldon
 
Re-imaginging CakePHP
Re-imaginging CakePHPRe-imaginging CakePHP
Re-imaginging CakePHPGraham Weldon
 
Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Martijn Verburg
 
CPAN Curation
CPAN CurationCPAN Curation
CPAN Curationneilbowers
 
Week 5
Week 5Week 5
Week 5A VD
 
Ruby an overall approach
Ruby an overall approachRuby an overall approach
Ruby an overall approachFelipe Schmitt
 
CakePHP - The Path to 2.0
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0Graham Weldon
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Railsmithunsasidharan
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the restgeorge.james
 
Build software like a bag of marbles, not a castle of LEGOÂŽ
Build software like a bag of marbles, not a castle of LEGOÂŽBuild software like a bag of marbles, not a castle of LEGOÂŽ
Build software like a bag of marbles, not a castle of LEGOÂŽHannes Lowette
 

Was ist angesagt? (20)

Modern Java Concurrency (OSCON 2012)
Modern Java Concurrency (OSCON 2012)Modern Java Concurrency (OSCON 2012)
Modern Java Concurrency (OSCON 2012)
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
 
Making CLI app in ruby
Making CLI app in rubyMaking CLI app in ruby
Making CLI app in ruby
 
PHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traitsPHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traits
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVM
 
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ PublishContent Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
 
JSR 335 / java 8 - update reference
JSR 335 / java 8 - update referenceJSR 335 / java 8 - update reference
JSR 335 / java 8 - update reference
 
SydPHP March 2012 Meetup
SydPHP March 2012 MeetupSydPHP March 2012 Meetup
SydPHP March 2012 Meetup
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
 
Re-imaginging CakePHP
Re-imaginging CakePHPRe-imaginging CakePHP
Re-imaginging CakePHP
 
Whats next in templating
Whats next in templatingWhats next in templating
Whats next in templating
 
Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)
 
Ruby and Security
Ruby and SecurityRuby and Security
Ruby and Security
 
CPAN Curation
CPAN CurationCPAN Curation
CPAN Curation
 
Week 5
Week 5Week 5
Week 5
 
Ruby an overall approach
Ruby an overall approachRuby an overall approach
Ruby an overall approach
 
CakePHP - The Path to 2.0
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
 
Build software like a bag of marbles, not a castle of LEGOÂŽ
Build software like a bag of marbles, not a castle of LEGOÂŽBuild software like a bag of marbles, not a castle of LEGOÂŽ
Build software like a bag of marbles, not a castle of LEGOÂŽ
 

Ähnlich wie What's the "right" PHP Framework?

Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UKRicard Clau
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLBarry Jones
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architectureElizabeth Smith
 
EKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdfEKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdfArnaud Bouchez
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1Derek Jacoby
 
Week 5
Week 5Week 5
Week 5A VD
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooRob Tweed
 
ReactPHP + Symfony
ReactPHP + SymfonyReactPHP + Symfony
ReactPHP + SymfonyDavid Bergunder
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworksKirk Madera
 
Top 10 php frameworks in 2021
Top 10 php frameworks in 2021Top 10 php frameworks in 2021
Top 10 php frameworks in 2021MaryamAnwar10
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1ADARSH BHATT
 
Repeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirRepeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirBarry Jones
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPAGil Fink
 
MPI, Erlang and the web
MPI, Erlang and the webMPI, Erlang and the web
MPI, Erlang and the webLenz Gschwendtner
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar litbbsr
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar litbbsr
 
Putting Compilers to Work
Putting Compilers to WorkPutting Compilers to Work
Putting Compilers to WorkSingleStore
 
PHP vs JavaScript
PHP vs JavaScriptPHP vs JavaScript
PHP vs JavaScriptMaryamAnwar10
 
Infrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryInfrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryCarlo Bonamico
 
Introduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital WorkplaceIntroduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital WorkplaceJen Wei Lee
 

Ähnlich wie What's the "right" PHP Framework? (20)

Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UK
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architecture
 
EKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdfEKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdf
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
Week 5
Week 5Week 5
Week 5
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
 
ReactPHP + Symfony
ReactPHP + SymfonyReactPHP + Symfony
ReactPHP + Symfony
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
 
Top 10 php frameworks in 2021
Top 10 php frameworks in 2021Top 10 php frameworks in 2021
Top 10 php frameworks in 2021
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
 
Repeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirRepeating History...On Purpose...with Elixir
Repeating History...On Purpose...with Elixir
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPA
 
MPI, Erlang and the web
MPI, Erlang and the webMPI, Erlang and the web
MPI, Erlang and the web
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
 
Putting Compilers to Work
Putting Compilers to WorkPutting Compilers to Work
Putting Compilers to Work
 
PHP vs JavaScript
PHP vs JavaScriptPHP vs JavaScript
PHP vs JavaScript
 
Infrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryInfrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous Delivery
 
Introduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital WorkplaceIntroduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital Workplace
 

Mehr von Barry Jones

Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureBarry Jones
 
Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRubyBarry Jones
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it FastBarry Jones
 
Day 6 - PostGIS
Day 6 - PostGISDay 6 - PostGIS
Day 6 - PostGISBarry Jones
 
Day 4 - Models
Day 4 - ModelsDay 4 - Models
Day 4 - ModelsBarry Jones
 
Day 2 - Intro to Rails
Day 2 - Intro to RailsDay 2 - Intro to Rails
Day 2 - Intro to RailsBarry Jones
 
Day 1 - Intro to Ruby
Day 1 - Intro to RubyDay 1 - Intro to Ruby
Day 1 - Intro to RubyBarry Jones
 
Protecting Users from Fraud
Protecting Users from FraudProtecting Users from Fraud
Protecting Users from FraudBarry Jones
 
AWS re:Invent 2013 Recap
AWS re:Invent 2013 RecapAWS re:Invent 2013 Recap
AWS re:Invent 2013 RecapBarry Jones
 
Pair Programming - the lightning talk
Pair Programming - the lightning talkPair Programming - the lightning talk
Pair Programming - the lightning talkBarry Jones
 
PostgreSQL - It's kind've a nifty database
PostgreSQL - It's kind've a nifty databasePostgreSQL - It's kind've a nifty database
PostgreSQL - It's kind've a nifty databaseBarry Jones
 

Mehr von Barry Jones (11)

Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application Architecture
 
Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRuby
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it Fast
 
Day 6 - PostGIS
Day 6 - PostGISDay 6 - PostGIS
Day 6 - PostGIS
 
Day 4 - Models
Day 4 - ModelsDay 4 - Models
Day 4 - Models
 
Day 2 - Intro to Rails
Day 2 - Intro to RailsDay 2 - Intro to Rails
Day 2 - Intro to Rails
 
Day 1 - Intro to Ruby
Day 1 - Intro to RubyDay 1 - Intro to Ruby
Day 1 - Intro to Ruby
 
Protecting Users from Fraud
Protecting Users from FraudProtecting Users from Fraud
Protecting Users from Fraud
 
AWS re:Invent 2013 Recap
AWS re:Invent 2013 RecapAWS re:Invent 2013 Recap
AWS re:Invent 2013 Recap
 
Pair Programming - the lightning talk
Pair Programming - the lightning talkPair Programming - the lightning talk
Pair Programming - the lightning talk
 
PostgreSQL - It's kind've a nifty database
PostgreSQL - It's kind've a nifty databasePostgreSQL - It's kind've a nifty database
PostgreSQL - It's kind've a nifty database
 

KĂźrzlich hochgeladen

VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 

KĂźrzlich hochgeladen (20)

VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 

What's the "right" PHP Framework?

  • 1. What’s the “right” PHP Framework? Barry Jones
  • 2. Who am I? • Barry Jones • Java/Groovy/PHP/Perl developer since ’98 • Ruby on Rails developer mostly since 2012 • Formerly ran Brightball, Inc here in Greenville – Contract programming business from 2008-2012 – 99% CakePHP… – Built our platform “The Intersect” on top of Cake • Software Architect with ACS Technologies, Inc
  • 3. SO WHICH ONE IS IT? The people need to know….
  • 4. Is it… • Zend Framework? • CakePHP? • Symfony? • FuelPHP? • Code Igniter? • Lithium? • Laravel? • Solar? OR…. • Kohana? • Yii? • Prado? • Akelos? • PHP Fat-Free? • Agile Toolkit? • Silex? • Phunction? • K2F? • Phraw? • Qcodo? • Slim? • Phalcon? • Roll your own…?
  • 5. WHY SO MANY? The million dollar question…
  • 6. Before we answer that… Why do other languages seem to have clear leaders? • Ruby has Rails • Python has Django • Groovy has Grails • C# has MVC • Java has Spring
  • 7. Many solutions to the same problem… usually indicates an underlying issue… which leads to lots of trade offs
  • 8. What does that mean for PHP? PHP is bad at frameworks… …out of the box
  • 9. So let’s dig into that a little • Ruby, Python, Groovy, C#, and Java have something in common • They boot up… – The application gets loaded into RAM – Runs initializer code – Makes its database connection(s) with a pool – Listens for requests and only processes that request – Can share RAM between requests – Built for long term garbage collection
  • 10. PHP… • Reprocesses everything on every single request • Configuration • Route mappings • Database connections • Loading all of those framework files – Devastating to Disk I/O • Encapsulates and garbage collects each individual process
  • 11. So a PHP framework has too… • Cache…heavily – And then reload those configuration caches on every request • Per request RAM allocation is HEAVY – It’s not loaded once and then processed – Framework is loaded every time for every request
  • 12. A HISTORY LESSON Don’t worry, we’ll get back to the story
  • 13. Rails lit the world on fire • Java’s Struts popularized MVC…but was awful • Rails made MVC good… – And EEEEEEVERYBODY copied it as best they could – CakePHP was a near clone for a while – Microsoft’s MVC framework…almost carbon copy – Grails…do I need to explain this?
  • 14. But why did Rails take off? • Ruby is great…but it’s not built for the web • PHP is built for the web • Ruby is an excellent language for writing Domain Specific Languages (DSLs) – Think…. • Puppet, Chef, Capistrano, Vagrant – Rails is a DSL for the web • It changes Ruby to make it a web language • That added to its popularity significantly in the Ruby community – Nearly every Ruby library has a Rails version for premium integration – Ruby developers are very big on testing because of the language’s flexibility • good at testing and easy to break – Ruby developers place a premium on workflow • That’s a heck of a lot more than just arranging some files and throwing routing and hooks on top…they built an entire mode of operation
  • 15. This is important for PHP PHP is built for the web out of the box With no framework… it can rock your face off
  • 16. So why so many frameworks? • Well…prior to PHP 5.3 – PHP was terrible for frameworks for all the reasons previously mentioned • Also, lack of namespaces made sharing libraries a PAAAAIN – 5.3 was released in 2010 – CakePHP 1.1 was popular in 2006 because it ran on PHP 4 and PHP 5 while structurally copying Rails – The PHP “framework wars” started during a time when PHP was bad at frameworks…hence the variety, saturation, and trade offs • Everybody tried to solve the problem a different way
  • 17. Prior to 5.3 you needed to… • Enable APC on the server – Optimized PHP byte code cached in RAM – Share RAM between process (under Apache mod_php only) – In production, set APC to not check for file changes – This got around the Disk I/O and overhead of reloading all those files – Also drastically reduced per-request RAM • With CakePHP we’d go from 12mb to 2mb (also mod_php only) • Configure a database connection pool within Apache – OR ensure you were using MySQL because the overhead of new connections is almost negligible • Avoid .htaccess files like the plague – Every framework used them for “pretty urls” instead of having them added to a server config • Setup a reverse proxy w/ nginx – Intercept non-application requests prior to Apache processing .htaccess rules • Use framework specific class loaders to try to load things only when necessary • Frameworks had to roll almost everything themselves to avoid naming conflicts with outside libraries – Extensive “does this work with X?” syndrome
  • 18. So what changed? • In 5.3 – Late static bindings – Namespaces • In 5.4 – Traits – Artisan • Built in Web Server • CLI • These allow… – Lazy loading – Dependency injection – Aspect Oriented Programming (AOP) – Simpler development workflow – Much easier library / package management
  • 19. What is PHP good at? • Scales down OR up better than any other language – “Boot up” web languages can’t scale down easily – With PHP, you can fill up a hard drive with code and it will all work • Other languages, you fill up your RAM and you’re done • This is why PHP shared hosting is everywhere and dirt cheap • Encapsulation of each request provides near perfect server stability – Tell me next time somebody uses “PHP” and “Memory Leak” in a sentence – If a request dies it can’t crash the server • In it’s raw form, it can already do almost everything you need – Example: Built an on-the-fly image processing server for a huge site – Same functionality previously kept crashing Rails processes …because memory leaks – Increased efficiency by 3000% (seriously)
  • 20. Oh…and it can fly (the scaling up part)
  • 21. What is PHP bad at? More on long polling • PHP is bad at long running process • Long polling involves many long running connections – which for PHP means many long running processes… – which will vary based on the number of your users So for example: • Optimal PHP request/response cycle – Request received – PHP started – Libraries loaded/RAM allocated (2-12mb) – Request processed – Request ended, garbage collected – Total time < .5 seconds (hopefully) • Long polling PHP request/response cycle – Request received – PHP started – Libraries loaded/RAM allocated (2-12mb) – ………. (30-60 seconds) – Request ended, garbage collected – Total time 30-60 seconds – Your servers RAM will be swallowed with a dramatically lower number of users from holding open dozens of 12mb connections – You can make it “work” but in production you’ll have massive scaling issues from concurrency • nginx_http_push_module – This is not a php specific solution – Request received with internal response address – PHP started – Libraries loaded/RAM allocated (2-12mb) – Requested added to queue – Request ended, garbage collected – Total time < .5 seconds – nginx holds the long polled connection instead of php – Single background process pulls requests off the queue and processes them – Sends response to the internal response address – The background process handles responding to the long polling request so you control how many are running in parallel, not your user traffic – nginx holds the concurrent connections efficiently (as good or greater concurrency than Node.js) Long running processes • Please don’t use PHP for long polling…ever • No really • All those documents that say PHP is bad at long polling…don’t take it as a challenge…they mean it • But if you must use nginx_http_push_module Also…method syntax consistency and assorted other quirks…
  • 22. But it’s more than just code • The business problem: – How do I find programmers who know this framework? • Case: Brightball – I loved CakePHP. It was complex, had a steep learning curve but was incredibly powerful – We built a tool around it that would generate a permission controlled, data linked, interface based solely off of the database structure • AKA “The Intersect” (we were big fans of Chuck) • Really bad for billable hours  – Hard to find people who knew Cake (or any other specific framework) despite “popularity” numbers – With complexity, training and learning curve are bad
  • 23. This is where Code Igniter took off • Code Igniter was not as awesome as Cake (sorry CI people) – I know one of you wants to argue this point…your opinion is wrong • But it was a heck of a lot simpler • Learning curve and training ease led to a huge following – And Expression Engine
  • 24. Not a problem in other languages • Dominant frameworks lead to common knowledge bases among developers • Hard to find a Ruby programmer that doesn’t know Rails • That allows continuous evolution because businesses avoid the training/hiring quandry • Namespaces allows easy library integration and sharing between frameworks and for the language as a whole
  • 25. Then there’s workflow… • Common frameworks lead to… – Common testing integrations – Common library integrations – Common database flow – Common team operations
  • 26. So the answer is…? If I have to tell you the “right” framework... then there isn’t a clear choice
  • 27. WAT!
  • 30. LET’S TALK ABOUT LARAVEL This will be fun
  • 31. First the framework wars • What about all the “other” frameworks – All of the existing dominant frameworks have to maintain a migration path for their user bases – This makes full reinvention on php >= 5.4…hard • Laravel does not have this problem – But it does need to gain widespread adoption
  • 32. So first up… Laravel is a Rails clone And I mean that in a good way They didn’t just go for file structure Or callbacks Or active record Or middleware Or migrations Or testing Or workflow Or modularity They ate the whole…dang…thing
  • 33. Libraries Ruby on Rails • Ruby has Gems • Rails applications have a Gemfile • Bundler installs Gems and manages dependencies PHP and Laravel • PHP has Composer – And PEAR – And PECL • Laravel uses Composer • Namespaces make this work
  • 34. Dev Environment Ruby on Rails • Ruby has RVM – Ruby version manager – “cd” into a project directory and your ruby version and gemset changes • Bundled web server – From your project directory, your application runs – Dozens of projects in different versions, with different libraries and different dependencies are easy • Command line app access – Rails console PHP and Laravel • Php 5.4 + has Artisan – Going forward, running multiple local versions of PHP will be easier – Also will make tools like Foreman an option for complex apps • Laravel has Homestead – Complete Vagrant based dev environment – A framework that takes dev environments this seriously is huge – Will only improve thanks to Docker • Command line app access – Artisan CLI
  • 35. Migrations Ruby on Rails • Migrations are “the” way • Necessary for teams working on the same code locally • Eases deployment across multiple environments PHP and Laravel • Migrations are “the” way • Virtually identical to Rails migrations
  • 36. ORM “Laravel ships with a superb ORM: Eloquent. If you have used the Ruby on Rails framework, you will find Eloquent familiar, as it follows the ActiveRecord ORM style of database interaction.” – Laravel documentation
  • 37. Deployment Ruby on Rails • You can always run your own… • But Heroku is where Rails apps begin • Deployment: – `git push heroku master` – Aaaaand that’s it PHP and Laravel • You can always run your own… • But Laravel Forge makes it easy to get  THAT On Linode, Digital Ocean, Rackspace or AWS
  • 38. Other stuff Ruby on Rails • Built with testing in mind • Queuing is standardized • RESTful • Excellent localization • Extremely well documented • Rack Middleware layer • Highly modular • Very clean syntax Laravel • Built with testing in mind • Queuing is standardized • RESTful • Excellent localization • Extremely well documented • StackPHP Middleware Layer • Highly modular • Very clean syntax
  • 39. What Laravel needs… • Like any PHP Framework, it needs saturation • It’s covered all the other bases – Powerful MVC framework – Developer workflow – Full language package management – Simple, fast deployment options – Very well documented – Built for teams (testing + migrations) – Modular • Just needs more people using it to solve the “hiring” case
  • 41. Credits/Reference • http://www.techempower.com/benchmarks/#section=data -r9 • http://laravel.com/ • http://rubyonrails.org/ • http://cakephp.org/ • http://ellislab.com/codeigniter • https://www.google.com/imghp • http://rack.github.io/ • http://stackphp.com/ • http://php.net/releases/5_3_0.php • http://php.net/releases/5_4_0.php • http://www.php.net//manual/en/book.apc.php