SlideShare a Scribd company logo
1 of 46
Download to read offline
Why Choose 
Laravel?
"Always start your 
presentation with a quote" 
1 
@rosstuck
Why Choose Laravel? 
1. Introduction 
2. The Problems of Legacy Code 
3. Introducing Laravel 
4. Laravel in Action
1. Introduction
Who are you John?
John Blackmore 
4 31 Years Old 
4 Married with 2 Children 
4 14 Years Experience in Web 
4 Technical Architect at 
Crowdcube
The Architect
What is 
Crowdcube?
4 Equity Crowdfunding Platform 
4 £40m Invested, 90k Investors, 150 Pitches 
4 Self funded on our own platform, three times.
2. The Problems 
of Legacy Code
Legacy Code Problems 
4 Spaghetti code 
4 Limited code re-use 
4 Multiple code styles 
4 Security vulnerabilities
The Solution?
Our Solution at Crowdcube 
4 Develop new features on a framework 
4 Agreed coding style (modified PSR-2) 
4 Best practises (SoC, DRY, SOLID) 
4 Git with Git-Flow
What is a Framework?
Framework 
an essential supporting structure of 
a building, vehicle, or object. 
a basic structure underlying 
a system, concept, or text
Software Framework 
an abstraction in which software providing generic 
functionality can be selectively changed by additional user-written 
code, thus providing application-specific software
say what?
A software framework is 
80% of your application 
already written for you.
Why use a framework? 
4 Enables rapid development 
4 Stable and well tested 
4 Community support 
4 Easy to recruit developers
Hey, I could build 
my own framework?
Bad Idea 
In most cases
Why you should not build your own 
4 You don't have time 
4 There will be bugs 
4 Difficult to recruit developers 
4 Why reinvent the wheel?
Framework Options
3. Introducing Laravel
Laravel Features 
4 MVC Framework 
4 Convention over Configuration 
4 Coded to Interfaces: 
4 Authentication, Databases, Caching, Queueing 
4 Blade templating engine
Why Crowdcube Chose Laravel 
4 Low learning curve 
4 Well documented 
4 Excellent test coverage 
4 Large active community 
4 Built on Symfony components
You can use Laravel 
features right now
Standalone Components 
4 Illuminate - https://github.com/illuminate 
4 Can be used within non-laravel projects 
4 Crowdcube actively uses: 
4 illuminate/database 
4 illuminate/events 
4 illuminate/queue
4. Laravel in Action 
Examples from Crowdcube
Legacy Crowdcube Platform 
4 Single LAMP server 
4 Procedural PHP4 code 
4 Tightly coupled to MySQL 
4 No caching
Where do you start?
Problem 
Server load was extremely peaky 
Cause: serving static assets from 
the application server
Solution: Amazon Cloudfront CDN 
4 Cloudfront sits in front of existing server 
http://www.crowdcube.com/images/some_image.jpg 
http://cdn.crowdcube.com/images/some_image.jpg 
4 80% reduction in CPU usage
Problem 
Existing Database Schema
Solution: Eloquent Models 
4 Eloquent maps database tables to PHP models 
class Pitches extends Eloquent {} 
Pitches::whereTitle('Crowdcube'); // returns Crowdcube pitch 
4 CRUD operations now simplified in code 
$user = User::create(['name'=>'John', 'email'=>'john@crowdcube.com']); 
$user->save(); // This can trigger additional events 
INSERT INTO `users` (name, email) VALUES ('John', 'john@crowdcube.com');
Problem 
Talking between legacy code 
and Laravel code
Solution: Eventing and Worker Queues 
4 Amazon SQS Queues 
4 Events fired in legacy code 
Event::fire('pitch.funded', ['pitch'=>'1234']); 
4 Events captured, jobs queued 
Queue::push('SendFundedEmail', ['pitch' => '1234']) 
4 Queues processed in Laravel
Problem 
Visible lag on some pages 
e.g. home page, search 
Cause: Slow SQL queries
Solution: Query Caching 
$activePitches = Cache::remember('pitches.active', 10, function() 
{ 
return Pitches::active()->get(); 
}); 
4 Supports APC, Memcached, Redis out the box 
4 Typical search query ~400ms from MySQL 
4 Same query using file driver <10ms
Problem 
Not enough time to talk about 
all the really cool stuff
Other Cool Stuff 
4 Query Scoping 
4 View Composers 
4 Model Binding 
4 Artisan CLI 
4 Homestead / Forge
Laravel Resources 
4 Official Docs - http://laravel.com/docs 
4 Laracasts - https://laracasts.com 
4 Code Bright - https://leanpub.com/codebright 
4 Culttt (Philip Brown) - http://culttt.com
Unless someone like you 
cares a whole awful lot, 
Nothing is going to get 
better. It’s not. 
1 
The Lorax
Questions?
Thank You! 
Twitter: @johnblackmore 
Email: john@crowdcube.com 
Feedback: http://lanyrd.com/sdfcyt

More Related Content

What's hot

Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Lorvent56
 

What's hot (20)

Intro to Laravel
Intro to LaravelIntro to Laravel
Intro to Laravel
 
10 Laravel packages everyone should know
10 Laravel packages everyone should know10 Laravel packages everyone should know
10 Laravel packages everyone should know
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
 
All the Laravel Things – Up & Running to Making $$
All the Laravel Things – Up & Running to Making $$All the Laravel Things – Up & Running to Making $$
All the Laravel Things – Up & Running to Making $$
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5
 
Laravel 5
Laravel 5Laravel 5
Laravel 5
 
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
 
Laravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routingLaravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routing
 
Laravel overview
Laravel overviewLaravel overview
Laravel overview
 
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Adventures in Laravel 5 SunshinePHP 2016 TutorialAdventures in Laravel 5 SunshinePHP 2016 Tutorial
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
 
Getting to know Laravel 5
Getting to know Laravel 5Getting to know Laravel 5
Getting to know Laravel 5
 
Laravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansLaravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web Artisans
 
From CakePHP to Laravel
From CakePHP to LaravelFrom CakePHP to Laravel
From CakePHP to Laravel
 
Hack the Future
Hack the FutureHack the Future
Hack the Future
 
php[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Upphp[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Up
 
Laravel Introduction
Laravel IntroductionLaravel Introduction
Laravel Introduction
 
Laravel 5.4
Laravel 5.4 Laravel 5.4
Laravel 5.4
 
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
php[world] 2015 Laravel 5.1: From Homestead to the Cloudphp[world] 2015 Laravel 5.1: From Homestead to the Cloud
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
 

Viewers also liked

Soalan lisan tahun 2 jawi
Soalan lisan tahun 2 jawiSoalan lisan tahun 2 jawi
Soalan lisan tahun 2 jawi
ZieSubri2502
 
P880 Wake On Lan
P880 Wake On LanP880 Wake On Lan
P880 Wake On Lan
SCOTSTAKE
 
A web 2.0 world presentation
A web 2.0 world presentationA web 2.0 world presentation
A web 2.0 world presentation
awon2448
 
Unit plan power point
Unit plan power pointUnit plan power point
Unit plan power point
jchilders100
 

Viewers also liked (20)

Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
 
Intro to Laravel PHP Framework
Intro to Laravel PHP FrameworkIntro to Laravel PHP Framework
Intro to Laravel PHP Framework
 
Testing and TDD - Laravel and Express Examples
Testing and TDD - Laravel and Express ExamplesTesting and TDD - Laravel and Express Examples
Testing and TDD - Laravel and Express Examples
 
Shelfariinstructions
ShelfariinstructionsShelfariinstructions
Shelfariinstructions
 
Evaluation question 4
Evaluation question 4Evaluation question 4
Evaluation question 4
 
Evaluation 4
Evaluation 4Evaluation 4
Evaluation 4
 
Question 1
Question 1Question 1
Question 1
 
Mini Red Pinstripe by RimPro-Tec
Mini Red Pinstripe by RimPro-TecMini Red Pinstripe by RimPro-Tec
Mini Red Pinstripe by RimPro-Tec
 
From reactive to proactive - How Azur transformed a service helpdesk and boos...
From reactive to proactive - How Azur transformed a service helpdesk and boos...From reactive to proactive - How Azur transformed a service helpdesk and boos...
From reactive to proactive - How Azur transformed a service helpdesk and boos...
 
RimPro-Tec NEC Birmingham UK .
RimPro-Tec NEC Birmingham UK .RimPro-Tec NEC Birmingham UK .
RimPro-Tec NEC Birmingham UK .
 
Appaja presentation indo
Appaja presentation indoAppaja presentation indo
Appaja presentation indo
 
MET-Rx HMB 1000
MET-Rx HMB 1000MET-Rx HMB 1000
MET-Rx HMB 1000
 
Soalan lisan tahun 2 jawi
Soalan lisan tahun 2 jawiSoalan lisan tahun 2 jawi
Soalan lisan tahun 2 jawi
 
P880 Wake On Lan
P880 Wake On LanP880 Wake On Lan
P880 Wake On Lan
 
Why not join RimPro-Tec like our Seoul, Korean Partners have .
Why not join RimPro-Tec like our Seoul, Korean Partners have .Why not join RimPro-Tec like our Seoul, Korean Partners have .
Why not join RimPro-Tec like our Seoul, Korean Partners have .
 
Rimpro-tec Top Gear Live
Rimpro-tec Top Gear Live Rimpro-tec Top Gear Live
Rimpro-tec Top Gear Live
 
Oszastowski przydatność utworzenia numerycznego modelu terenu (nmt) dla teren...
Oszastowski przydatność utworzenia numerycznego modelu terenu (nmt) dla teren...Oszastowski przydatność utworzenia numerycznego modelu terenu (nmt) dla teren...
Oszastowski przydatność utworzenia numerycznego modelu terenu (nmt) dla teren...
 
A web 2.0 world presentation
A web 2.0 world presentationA web 2.0 world presentation
A web 2.0 world presentation
 
Unit plan power point
Unit plan power pointUnit plan power point
Unit plan power point
 

Similar to Digpen 7: Why choose Laravel?

Fix me if you can - DrupalCon prague
Fix me if you can - DrupalCon pragueFix me if you can - DrupalCon prague
Fix me if you can - DrupalCon prague
hernanibf
 

Similar to Digpen 7: Why choose Laravel? (20)

The Integration of Laravel with Swoole
The Integration of Laravel with SwooleThe Integration of Laravel with Swoole
The Integration of Laravel with Swoole
 
Laravel : A Fastest Growing Kid
Laravel : A Fastest Growing KidLaravel : A Fastest Growing Kid
Laravel : A Fastest Growing Kid
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
 
Hidden things uncovered about laravel development
Hidden things uncovered about laravel developmentHidden things uncovered about laravel development
Hidden things uncovered about laravel development
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a boss
 
Intro To Node.js
Intro To Node.jsIntro To Node.js
Intro To Node.js
 
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMPInria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
 
Fix me if you can - DrupalCon prague
Fix me if you can - DrupalCon pragueFix me if you can - DrupalCon prague
Fix me if you can - DrupalCon prague
 
Practices and Tools for Building Better APIs
Practices and Tools for Building Better APIsPractices and Tools for Building Better APIs
Practices and Tools for Building Better APIs
 
Webinar Docker Tri Series
Webinar Docker Tri SeriesWebinar Docker Tri Series
Webinar Docker Tri Series
 
2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonEclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – Helidon
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
 
Software design patterns in laravel by phill sparks
Software design patterns in laravel by phill sparksSoftware design patterns in laravel by phill sparks
Software design patterns in laravel by phill sparks
 
Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
 
JCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxJCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptx
 
Acquia Drupal Certification
Acquia Drupal CertificationAcquia Drupal Certification
Acquia Drupal Certification
 
Laravel Presentation
Laravel PresentationLaravel Presentation
Laravel Presentation
 
Eugene PHP June 2015 - Let's Talk Laravel
Eugene PHP June 2015 - Let's Talk LaravelEugene PHP June 2015 - Let's Talk Laravel
Eugene PHP June 2015 - Let's Talk Laravel
 
Alternative Dispatcher Layer Overview
Alternative Dispatcher Layer OverviewAlternative Dispatcher Layer Overview
Alternative Dispatcher Layer Overview
 

Recently uploaded

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 

Digpen 7: Why choose Laravel?

  • 2. "Always start your presentation with a quote" 1 @rosstuck
  • 3. Why Choose Laravel? 1. Introduction 2. The Problems of Legacy Code 3. Introducing Laravel 4. Laravel in Action
  • 5. Who are you John?
  • 6. John Blackmore 4 31 Years Old 4 Married with 2 Children 4 14 Years Experience in Web 4 Technical Architect at Crowdcube
  • 9. 4 Equity Crowdfunding Platform 4 £40m Invested, 90k Investors, 150 Pitches 4 Self funded on our own platform, three times.
  • 10. 2. The Problems of Legacy Code
  • 11. Legacy Code Problems 4 Spaghetti code 4 Limited code re-use 4 Multiple code styles 4 Security vulnerabilities
  • 13. Our Solution at Crowdcube 4 Develop new features on a framework 4 Agreed coding style (modified PSR-2) 4 Best practises (SoC, DRY, SOLID) 4 Git with Git-Flow
  • 14. What is a Framework?
  • 15. Framework an essential supporting structure of a building, vehicle, or object. a basic structure underlying a system, concept, or text
  • 16. Software Framework an abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software
  • 18. A software framework is 80% of your application already written for you.
  • 19. Why use a framework? 4 Enables rapid development 4 Stable and well tested 4 Community support 4 Easy to recruit developers
  • 20. Hey, I could build my own framework?
  • 21. Bad Idea In most cases
  • 22. Why you should not build your own 4 You don't have time 4 There will be bugs 4 Difficult to recruit developers 4 Why reinvent the wheel?
  • 24.
  • 26. Laravel Features 4 MVC Framework 4 Convention over Configuration 4 Coded to Interfaces: 4 Authentication, Databases, Caching, Queueing 4 Blade templating engine
  • 27. Why Crowdcube Chose Laravel 4 Low learning curve 4 Well documented 4 Excellent test coverage 4 Large active community 4 Built on Symfony components
  • 28. You can use Laravel features right now
  • 29. Standalone Components 4 Illuminate - https://github.com/illuminate 4 Can be used within non-laravel projects 4 Crowdcube actively uses: 4 illuminate/database 4 illuminate/events 4 illuminate/queue
  • 30. 4. Laravel in Action Examples from Crowdcube
  • 31. Legacy Crowdcube Platform 4 Single LAMP server 4 Procedural PHP4 code 4 Tightly coupled to MySQL 4 No caching
  • 32. Where do you start?
  • 33. Problem Server load was extremely peaky Cause: serving static assets from the application server
  • 34. Solution: Amazon Cloudfront CDN 4 Cloudfront sits in front of existing server http://www.crowdcube.com/images/some_image.jpg http://cdn.crowdcube.com/images/some_image.jpg 4 80% reduction in CPU usage
  • 36. Solution: Eloquent Models 4 Eloquent maps database tables to PHP models class Pitches extends Eloquent {} Pitches::whereTitle('Crowdcube'); // returns Crowdcube pitch 4 CRUD operations now simplified in code $user = User::create(['name'=>'John', 'email'=>'john@crowdcube.com']); $user->save(); // This can trigger additional events INSERT INTO `users` (name, email) VALUES ('John', 'john@crowdcube.com');
  • 37. Problem Talking between legacy code and Laravel code
  • 38. Solution: Eventing and Worker Queues 4 Amazon SQS Queues 4 Events fired in legacy code Event::fire('pitch.funded', ['pitch'=>'1234']); 4 Events captured, jobs queued Queue::push('SendFundedEmail', ['pitch' => '1234']) 4 Queues processed in Laravel
  • 39. Problem Visible lag on some pages e.g. home page, search Cause: Slow SQL queries
  • 40. Solution: Query Caching $activePitches = Cache::remember('pitches.active', 10, function() { return Pitches::active()->get(); }); 4 Supports APC, Memcached, Redis out the box 4 Typical search query ~400ms from MySQL 4 Same query using file driver <10ms
  • 41. Problem Not enough time to talk about all the really cool stuff
  • 42. Other Cool Stuff 4 Query Scoping 4 View Composers 4 Model Binding 4 Artisan CLI 4 Homestead / Forge
  • 43. Laravel Resources 4 Official Docs - http://laravel.com/docs 4 Laracasts - https://laracasts.com 4 Code Bright - https://leanpub.com/codebright 4 Culttt (Philip Brown) - http://culttt.com
  • 44. Unless someone like you cares a whole awful lot, Nothing is going to get better. It’s not. 1 The Lorax
  • 46. Thank You! Twitter: @johnblackmore Email: john@crowdcube.com Feedback: http://lanyrd.com/sdfcyt