SlideShare a Scribd company logo
1 of 63
THPUG & HotelQuickly
Meetup
PHP Frameworks, or how I learned to stop
worrying and love the code.
Who are we?
Thailand PHP User Group - A group for bringing
together PHP users in Thailand
HotelQuickly - The Number 1 last minute booking app
in Asia Pacific
Alex Stansfield - Software Development Manager at
Gomeeki, 12 years PHP developer
Topics for the evening
What is a Framework?
Why would I want to use one?
What kind of Frameworks are there?
Full Stack Top Three (Laravel, Symfony, Nette)
Micro Frameworks (Silex, Slim3, Lumen)
Benchmarks
HQ Talk: Writing Framework Independent Code
Questions and Discussion
What is a Framework?
“Standard Solution to Common problems”
All the code you used to write or pull from
your other projects packaged up for you
Provides a structure to your code
Community
Why would you want to use one?
Saves you from reinventing the wheel
Community Resources (plugins, tutorials)
Open Source
Some of the best minds involved
Many eyes to review the code
Contribute
Keep code consistent between developers
What kind of frameworks are there?
Frameworks mostly fall into three groups:
Micro Frameworks
Full Stack Frameworks
Content Management Frameworks
What is a Micro Framework?
Minimal frameworks
giving you a fast shell
for your code
Dependency Injection
Container
Routing
Middleware Support
Request and Response
Handling
Basic Error Handling
Routing
http://example.com/my/blog
http://example.com/my/blog/edit
In the Past
/var/www/site/my/blog/index.php
/var/www/site/my/blog/edit/index.php
Now
/var/www/site/public/index.php
Request
Everything from the Request wrapped up in
easy to access Object.
$_POST[‘this’], $_GET[‘that’], $_SERVER[‘REQUEST_METHOD’]
$request->has(‘this’);
$request->get(‘that’);
$request->getMethod();
$request->getHeader(‘Content-Type’);
Routing & Request
http://example.com/blog/2015/08/29
Route - /blog/{year}/{month}/{day}
Request Populated With:
year: 2015
month: 08
day: 29
Example
$app->get('/hello[/{name}]', function ($request, $response) {
$response->write("Hello, " . $request->get('name'));
return $response;
})->setArgument('name', 'World!');
GET /hello
Hello, World!
GET /hello/alex
Hello, alex
What is a Full Stack Framework?
Contains many
components to help
you rapidly develop
large applications
DBAL and ORM
Multiple configuration files
Caching
Logging
Detailed Error Handling
Console Commands
Events
Templating Engine
Forms and validation
Security
Full Stack Top Three
Sitepoint Survey into PHP Framework
popularity from March 2015
The Full Stack Big Three
Sitepoint Survey into PHP Framework
popularity from March 2015
1.Laravel
2.Symfony2
3.Nette
Laravel
Aiming to make web development easier
Builds upon third party components
Facade provides easy access to services
More components than other frameworks
Homestead Vagrant box
Suited to all sizes of project
Illuminate
Illuminate wraps a number of 3rd party
libraries and framework components
Provides more features (Queues, Cloud)
Provides more choice with Contracts
Fairly tight coupling
Facades
Static interface to classes that are in service
container
Facades for existing Illuminate services
Can create your own facades to access your
services
Seen by some as promoting bad practise
Injecting Services is still available
Laravel - Round Up
Large community and user base
Very easy to pick up and configure
Illuminate provides more out of the box
Homestead helps you get developing
Documentation focuses more on Facade
Good for projects of any size
Quite Tightly coupled so harder to leave
Symfony2
Heavy Inspiration from Ruby on Rails
Building Robust Enterprise Applications
Highly Customisable
Powerful Profiling and Debug tools
Includes popular 3rd party components
Many useful Bundles available
Learning curve can be steep
Profiling and Debug Tools
Third Party Bundles
User Registration, Login and Profile
OAuth Interface to many social logins
Automatic Rest Handling
Web Service Api Documentation
Image Manipulation
Easy Access to Third Party Libraries
Symfony2 - Round Up
Large community and user base
Powerful Profiling and Debugging Tools
Loosely Coupled and 3rd party Components
Very configurable (a pro and a con)
Can be daunting to new users and steeper
learning curve
Better for larger projects
Nette
Mature but little known outside Czech
Designed around MVP over MVC
Tracy debugger and profiler
Detailed Error Reporting
Latte templating component
Quite loosely coupled components
Tracy - Debugging and Errors
Latte - Templating Engine
Template Inheritance
Context aware Escaping
Context Aware Escaping
Value of $movie is 'Amarcord & 8 1/2'
Macros & Filters
Macros Surrounding HTML
Macros Inline HTML
Latte - Templating Engine
Template Inheritance
Context aware Escaping
Macros inline in HTML tags (like AngularJS)
Filters for content manipulation
User defined Filters and Macros
Compiles templates to PHP so very fast
No dependencies on other libraries
Latte vs Blade Dependencies
Nette - Round Up
Easy learning curve
Useful debugger and profiler
Great Error reporting in dev mode
Fantastic Templating Engine
Small community outside Czech Republic
Placement on Sitepoint survey will bring it
more attention
Stack Overflow Tag Popularity
Micro Frameworks
Very minimal install
No path structure (most of the time)
Much faster than Full Stack Frameworks
Ideal for small projects, quick micro services
or command line applications
Silex
Closely related to Symfony2
Uses Pimple v1 and Symfony2 Components
Wide range of Official and Third Party Service
Providers
Version 2 under development
Slim 3
Still in Beta
Follow up to the very fast Slim 2
Embraces Standards
container-interop interface
PSR-7 Requests and Responses
Routing with Nickc’s FastRoute
Aimed at Web Applications
Lumen
From the Laravel Team
Provides a structure for your project
Lumen
From the Laravel Team
Provides a structure for your project
Includes Artisan helper command
Console command support out of the box
Embraces Laravel’s aim of being easy to learn
and use
Support for PSR-7 requests and responses
Benchmarks
Setup:
Default install of the framework
Using recommended way to output text
Prints “Hello World!”
Run on PHP 5.6 and 7 beta
ApacheBench over 10 seconds
Don’t hate me, just for guidance
PHP 5.6
PHP 5.6
_______________________________________________________________________
|framework |requests per second|relative|peak memory|relative|
|-------------------|------------------:|-------:|----------:|-------:|
|slim-3 | 1,928.82| 7.3| 0.75| 1.0|
|silex-1.3 | 1,148.48| 4.3| 1.00| 1.3|
|lumen-5.1 | 1,292.36| 4.9| 1.00| 1.3|
|nette-2.3 | 815.80| 3.1| 1.50| 2.0|
|symfony-2.7 | 400.95| 1.5| 3.00| 4.0|
|laravel-5.1 | 265.66| 1.0| 2.50| 3.3|
---------------------------------------------------------------
PHP 7 Beta
PHP 7.0 vs 5.6
|framework | RPS 7.0 | RPS 5.6 |
|-------------------|----------:|----------:|
|slim-3 | 3,072.28 | 1,928.82 |
|silex-1.3 | 1,689.54 | 1,148.48 |
|lumen-5.1 | 1,968.67 | 1,292.36 |
|nette-2.3 | 1,449.96 | 815.80 |
|symfony-2.7 | 842.56 | 400.95 |
|laravel-5.1 | 487.74 | 265.66 |
“What do you use?”
“What should I use?”
Framework Independent Code
a.k.a Framework Agnostic
What is it about?
Architectures/Patterns
●DDD (Domain-Driven Design)
●Ports & Adapters (Hexagonal Architecture)
●Dependency Inversion/Injection Principle
Domain-Driven Design
“Domain-driven design is not a
technology or a methodology. DDD
provides a structure of practices and
terminology for making design
decisions that focus and accelerate
software projects.”
Eric Evans
Hexagonal Architecture
“Allow an application to equally be driven by users,
programs, automated test or batch scripts, and to be
developed and tested in isolation from its eventual run-time
devices and databases”
- Alistair Cockburn
Hexagonal Architecture
High-level modules should not depend on low-level modules. Both should
depend on abstractions.
A code is worth a thousand words!
Dependency Inversion Principle
References
https://goo.gl/59Sgko
PHP Conf 2015
http://phpconf.asia
Discount Code: sgphp2015

More Related Content

What's hot

Cakephp vs. laravel
Cakephp vs. laravelCakephp vs. laravel
Cakephp vs. laravelGirnarSoft
 
PHP - Programming language war, does it matter
PHP - Programming language war, does it matterPHP - Programming language war, does it matter
PHP - Programming language war, does it matterMizno Kruge
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScriptRob Scaduto
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressionsHans Emmel
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumDev9Com
 
Selenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit PathakSelenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit PathakSoftware Testing Board
 
JSFoo-2017 Takeaways
JSFoo-2017 TakeawaysJSFoo-2017 Takeaways
JSFoo-2017 TakeawaysMir Ali
 
Introduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeopleIntroduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeopleSpringPeople
 
Robotframework
RobotframeworkRobotframework
RobotframeworkElla Sun
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practiceseleksdev
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework IntroductionPekka Klärck
 
Robot Framework for beginners and what is new at 2019
Robot Framework for beginners and what is new at 2019Robot Framework for beginners and what is new at 2019
Robot Framework for beginners and what is new at 2019Laura Ojala
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks ComparisonDeepu S Nath
 
Testing with laravel
Testing with laravelTesting with laravel
Testing with laravelDerek Binkley
 
The Python in the Apple
The Python in the AppleThe Python in the Apple
The Python in the ApplezeroSteiner
 

What's hot (20)

Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
 
Cakephp vs. laravel
Cakephp vs. laravelCakephp vs. laravel
Cakephp vs. laravel
 
PHP - Programming language war, does it matter
PHP - Programming language war, does it matterPHP - Programming language war, does it matter
PHP - Programming language war, does it matter
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressions
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
 
Selenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit PathakSelenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit Pathak
 
JSFoo-2017 Takeaways
JSFoo-2017 TakeawaysJSFoo-2017 Takeaways
JSFoo-2017 Takeaways
 
Introduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeopleIntroduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeople
 
Robotframework
RobotframeworkRobotframework
Robotframework
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
 
Robot Framework for beginners and what is new at 2019
Robot Framework for beginners and what is new at 2019Robot Framework for beginners and what is new at 2019
Robot Framework for beginners and what is new at 2019
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks Comparison
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
 
Robot framework
Robot frameworkRobot framework
Robot framework
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java Programming
 
Testing with laravel
Testing with laravelTesting with laravel
Testing with laravel
 
The Python in the Apple
The Python in the AppleThe Python in the Apple
The Python in the Apple
 

Similar to PHP Frameworks, or how I learnt to stop worrying and love the code

A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!Muhammad Ghazali
 
Web application framework
Web application frameworkWeb application framework
Web application frameworkPankaj Chand
 
Php Frameworks
Php FrameworksPhp Frameworks
Php FrameworksRyan Davis
 
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019Elsner Technologies Pvt Ltd
 
Codeigniter Introduction
Codeigniter IntroductionCodeigniter Introduction
Codeigniter IntroductionAshfan Ahamed
 
Building A Platform From Open Source At Yahoo
Building A Platform From Open Source At YahooBuilding A Platform From Open Source At Yahoo
Building A Platform From Open Source At YahooDustin Whittle
 
Top 6 leading PHP frameworks for web development
Top 6 leading PHP frameworks for web developmentTop 6 leading PHP frameworks for web development
Top 6 leading PHP frameworks for web developmentAppfinz Technologies
 
Introduction to CodeIgniter
Introduction to CodeIgniterIntroduction to CodeIgniter
Introduction to CodeIgniterkindafunnylookin
 
NET Event - Migrating WinForm
NET Event - Migrating WinFormNET Event - Migrating WinForm
NET Event - Migrating WinFormRaffaele Garofalo
 
Laravel : A Fastest Growing Kid
Laravel : A Fastest Growing KidLaravel : A Fastest Growing Kid
Laravel : A Fastest Growing KidEndive Software
 
Crime Reporting System.pptx
Crime Reporting System.pptxCrime Reporting System.pptx
Crime Reporting System.pptxPenilVora
 
Tuenti teams - Php Conference
Tuenti teams - Php ConferenceTuenti teams - Php Conference
Tuenti teams - Php ConferenceGuille -bisho-
 
PHP Web Frameworks Introduction
PHP Web Frameworks IntroductionPHP Web Frameworks Introduction
PHP Web Frameworks IntroductionAdam Englander
 
Which are the best PHP frameworks for web development that have a good future...
Which are the best PHP frameworks for web development that have a good future...Which are the best PHP frameworks for web development that have a good future...
Which are the best PHP frameworks for web development that have a good future...Moon Technolabs Pvt. Ltd.
 

Similar to PHP Frameworks, or how I learnt to stop worrying and love the code (20)

Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
 
A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!
 
Web application framework
Web application frameworkWeb application framework
Web application framework
 
Php Frameworks
Php FrameworksPhp Frameworks
Php Frameworks
 
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
 
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
 
Codeigniter Introduction
Codeigniter IntroductionCodeigniter Introduction
Codeigniter Introduction
 
Building A Platform From Open Source At Yahoo
Building A Platform From Open Source At YahooBuilding A Platform From Open Source At Yahoo
Building A Platform From Open Source At Yahoo
 
Top 6 leading PHP frameworks for web development
Top 6 leading PHP frameworks for web developmentTop 6 leading PHP frameworks for web development
Top 6 leading PHP frameworks for web development
 
Introduction to CodeIgniter
Introduction to CodeIgniterIntroduction to CodeIgniter
Introduction to CodeIgniter
 
NET Event - Migrating WinForm
NET Event - Migrating WinFormNET Event - Migrating WinForm
NET Event - Migrating WinForm
 
Open Source in the Enterprise
Open Source in the EnterpriseOpen Source in the Enterprise
Open Source in the Enterprise
 
Introducing symfony
Introducing symfonyIntroducing symfony
Introducing symfony
 
Laravel : A Fastest Growing Kid
Laravel : A Fastest Growing KidLaravel : A Fastest Growing Kid
Laravel : A Fastest Growing Kid
 
Cakephp manual-11
Cakephp manual-11Cakephp manual-11
Cakephp manual-11
 
Story line
Story lineStory line
Story line
 
Crime Reporting System.pptx
Crime Reporting System.pptxCrime Reporting System.pptx
Crime Reporting System.pptx
 
Tuenti teams - Php Conference
Tuenti teams - Php ConferenceTuenti teams - Php Conference
Tuenti teams - Php Conference
 
PHP Web Frameworks Introduction
PHP Web Frameworks IntroductionPHP Web Frameworks Introduction
PHP Web Frameworks Introduction
 
Which are the best PHP frameworks for web development that have a good future...
Which are the best PHP frameworks for web development that have a good future...Which are the best PHP frameworks for web development that have a good future...
Which are the best PHP frameworks for web development that have a good future...
 

More from Michal Juhas

Tech Mind Maps - Booklet Preview
Tech Mind Maps - Booklet PreviewTech Mind Maps - Booklet Preview
Tech Mind Maps - Booklet PreviewMichal Juhas
 
IT Recruiter's Mind Maps - Booklet Preview
IT Recruiter's Mind Maps - Booklet PreviewIT Recruiter's Mind Maps - Booklet Preview
IT Recruiter's Mind Maps - Booklet PreviewMichal Juhas
 
Three Secret Ingredients To Recruiting Software Developers
Three Secret Ingredients To Recruiting Software DevelopersThree Secret Ingredients To Recruiting Software Developers
Three Secret Ingredients To Recruiting Software DevelopersMichal Juhas
 
What i wish i knew in my 20's
What i wish i knew in my 20'sWhat i wish i knew in my 20's
What i wish i knew in my 20'sMichal Juhas
 
Adaptive Upskill As The Future Of The Workforce
Adaptive Upskill As The Future Of The WorkforceAdaptive Upskill As The Future Of The Workforce
Adaptive Upskill As The Future Of The WorkforceMichal Juhas
 
Introducing PlanetQuest on the TechsSmmit 2018
Introducing PlanetQuest on the TechsSmmit 2018Introducing PlanetQuest on the TechsSmmit 2018
Introducing PlanetQuest on the TechsSmmit 2018Michal Juhas
 
Metasearch Outlook 2017
Metasearch Outlook 2017Metasearch Outlook 2017
Metasearch Outlook 2017Michal Juhas
 
Subscription Economy: How to shift mindset in 2017 and adapt to changing cons...
Subscription Economy: How to shift mindset in 2017 and adapt to changing cons...Subscription Economy: How to shift mindset in 2017 and adapt to changing cons...
Subscription Economy: How to shift mindset in 2017 and adapt to changing cons...Michal Juhas
 
How do we test nodejs apps?
How do we test nodejs apps?How do we test nodejs apps?
How do we test nodejs apps?Michal Juhas
 
Becoming Data Driven
Becoming Data DrivenBecoming Data Driven
Becoming Data DrivenMichal Juhas
 
Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)Michal Juhas
 
iOS development best practices
iOS development best practicesiOS development best practices
iOS development best practicesMichal Juhas
 
Building Scalable Micro-services with Nodejs
Building Scalable Micro-services with NodejsBuilding Scalable Micro-services with Nodejs
Building Scalable Micro-services with NodejsMichal Juhas
 
Lessons Learnt from Backend Systems Development
Lessons Learnt from Backend Systems DevelopmentLessons Learnt from Backend Systems Development
Lessons Learnt from Backend Systems DevelopmentMichal Juhas
 
HotelQuickly Product & Engineering
HotelQuickly Product & EngineeringHotelQuickly Product & Engineering
HotelQuickly Product & EngineeringMichal Juhas
 

More from Michal Juhas (15)

Tech Mind Maps - Booklet Preview
Tech Mind Maps - Booklet PreviewTech Mind Maps - Booklet Preview
Tech Mind Maps - Booklet Preview
 
IT Recruiter's Mind Maps - Booklet Preview
IT Recruiter's Mind Maps - Booklet PreviewIT Recruiter's Mind Maps - Booklet Preview
IT Recruiter's Mind Maps - Booklet Preview
 
Three Secret Ingredients To Recruiting Software Developers
Three Secret Ingredients To Recruiting Software DevelopersThree Secret Ingredients To Recruiting Software Developers
Three Secret Ingredients To Recruiting Software Developers
 
What i wish i knew in my 20's
What i wish i knew in my 20'sWhat i wish i knew in my 20's
What i wish i knew in my 20's
 
Adaptive Upskill As The Future Of The Workforce
Adaptive Upskill As The Future Of The WorkforceAdaptive Upskill As The Future Of The Workforce
Adaptive Upskill As The Future Of The Workforce
 
Introducing PlanetQuest on the TechsSmmit 2018
Introducing PlanetQuest on the TechsSmmit 2018Introducing PlanetQuest on the TechsSmmit 2018
Introducing PlanetQuest on the TechsSmmit 2018
 
Metasearch Outlook 2017
Metasearch Outlook 2017Metasearch Outlook 2017
Metasearch Outlook 2017
 
Subscription Economy: How to shift mindset in 2017 and adapt to changing cons...
Subscription Economy: How to shift mindset in 2017 and adapt to changing cons...Subscription Economy: How to shift mindset in 2017 and adapt to changing cons...
Subscription Economy: How to shift mindset in 2017 and adapt to changing cons...
 
How do we test nodejs apps?
How do we test nodejs apps?How do we test nodejs apps?
How do we test nodejs apps?
 
Becoming Data Driven
Becoming Data DrivenBecoming Data Driven
Becoming Data Driven
 
Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)
 
iOS development best practices
iOS development best practicesiOS development best practices
iOS development best practices
 
Building Scalable Micro-services with Nodejs
Building Scalable Micro-services with NodejsBuilding Scalable Micro-services with Nodejs
Building Scalable Micro-services with Nodejs
 
Lessons Learnt from Backend Systems Development
Lessons Learnt from Backend Systems DevelopmentLessons Learnt from Backend Systems Development
Lessons Learnt from Backend Systems Development
 
HotelQuickly Product & Engineering
HotelQuickly Product & EngineeringHotelQuickly Product & Engineering
HotelQuickly Product & Engineering
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 

PHP Frameworks, or how I learnt to stop worrying and love the code

  • 1. THPUG & HotelQuickly Meetup PHP Frameworks, or how I learned to stop worrying and love the code.
  • 2. Who are we? Thailand PHP User Group - A group for bringing together PHP users in Thailand HotelQuickly - The Number 1 last minute booking app in Asia Pacific Alex Stansfield - Software Development Manager at Gomeeki, 12 years PHP developer
  • 3. Topics for the evening What is a Framework? Why would I want to use one? What kind of Frameworks are there? Full Stack Top Three (Laravel, Symfony, Nette) Micro Frameworks (Silex, Slim3, Lumen) Benchmarks HQ Talk: Writing Framework Independent Code Questions and Discussion
  • 4. What is a Framework? “Standard Solution to Common problems” All the code you used to write or pull from your other projects packaged up for you Provides a structure to your code Community
  • 5. Why would you want to use one? Saves you from reinventing the wheel Community Resources (plugins, tutorials) Open Source Some of the best minds involved Many eyes to review the code Contribute Keep code consistent between developers
  • 6. What kind of frameworks are there? Frameworks mostly fall into three groups: Micro Frameworks Full Stack Frameworks Content Management Frameworks
  • 7. What is a Micro Framework? Minimal frameworks giving you a fast shell for your code Dependency Injection Container Routing Middleware Support Request and Response Handling Basic Error Handling
  • 9. Request Everything from the Request wrapped up in easy to access Object. $_POST[‘this’], $_GET[‘that’], $_SERVER[‘REQUEST_METHOD’] $request->has(‘this’); $request->get(‘that’); $request->getMethod(); $request->getHeader(‘Content-Type’);
  • 10. Routing & Request http://example.com/blog/2015/08/29 Route - /blog/{year}/{month}/{day} Request Populated With: year: 2015 month: 08 day: 29
  • 11. Example $app->get('/hello[/{name}]', function ($request, $response) { $response->write("Hello, " . $request->get('name')); return $response; })->setArgument('name', 'World!'); GET /hello Hello, World! GET /hello/alex Hello, alex
  • 12. What is a Full Stack Framework? Contains many components to help you rapidly develop large applications DBAL and ORM Multiple configuration files Caching Logging Detailed Error Handling Console Commands Events Templating Engine Forms and validation Security
  • 13. Full Stack Top Three Sitepoint Survey into PHP Framework popularity from March 2015
  • 14.
  • 15. The Full Stack Big Three Sitepoint Survey into PHP Framework popularity from March 2015 1.Laravel 2.Symfony2 3.Nette
  • 16. Laravel Aiming to make web development easier Builds upon third party components Facade provides easy access to services More components than other frameworks Homestead Vagrant box Suited to all sizes of project
  • 17.
  • 18. Illuminate Illuminate wraps a number of 3rd party libraries and framework components Provides more features (Queues, Cloud) Provides more choice with Contracts Fairly tight coupling
  • 19. Facades Static interface to classes that are in service container Facades for existing Illuminate services Can create your own facades to access your services Seen by some as promoting bad practise Injecting Services is still available
  • 20.
  • 21.
  • 22. Laravel - Round Up Large community and user base Very easy to pick up and configure Illuminate provides more out of the box Homestead helps you get developing Documentation focuses more on Facade Good for projects of any size Quite Tightly coupled so harder to leave
  • 23. Symfony2 Heavy Inspiration from Ruby on Rails Building Robust Enterprise Applications Highly Customisable Powerful Profiling and Debug tools Includes popular 3rd party components Many useful Bundles available Learning curve can be steep
  • 24.
  • 26. Third Party Bundles User Registration, Login and Profile OAuth Interface to many social logins Automatic Rest Handling Web Service Api Documentation Image Manipulation Easy Access to Third Party Libraries
  • 27.
  • 28. Symfony2 - Round Up Large community and user base Powerful Profiling and Debugging Tools Loosely Coupled and 3rd party Components Very configurable (a pro and a con) Can be daunting to new users and steeper learning curve Better for larger projects
  • 29. Nette Mature but little known outside Czech Designed around MVP over MVC Tracy debugger and profiler Detailed Error Reporting Latte templating component Quite loosely coupled components
  • 30.
  • 31. Tracy - Debugging and Errors
  • 32. Latte - Templating Engine Template Inheritance Context aware Escaping
  • 33. Context Aware Escaping Value of $movie is 'Amarcord & 8 1/2'
  • 34. Macros & Filters Macros Surrounding HTML Macros Inline HTML
  • 35. Latte - Templating Engine Template Inheritance Context aware Escaping Macros inline in HTML tags (like AngularJS) Filters for content manipulation User defined Filters and Macros Compiles templates to PHP so very fast No dependencies on other libraries
  • 36. Latte vs Blade Dependencies
  • 37.
  • 38. Nette - Round Up Easy learning curve Useful debugger and profiler Great Error reporting in dev mode Fantastic Templating Engine Small community outside Czech Republic Placement on Sitepoint survey will bring it more attention
  • 39. Stack Overflow Tag Popularity
  • 40. Micro Frameworks Very minimal install No path structure (most of the time) Much faster than Full Stack Frameworks Ideal for small projects, quick micro services or command line applications
  • 41. Silex Closely related to Symfony2 Uses Pimple v1 and Symfony2 Components Wide range of Official and Third Party Service Providers Version 2 under development
  • 42.
  • 43. Slim 3 Still in Beta Follow up to the very fast Slim 2 Embraces Standards container-interop interface PSR-7 Requests and Responses Routing with Nickc’s FastRoute Aimed at Web Applications
  • 44. Lumen From the Laravel Team Provides a structure for your project
  • 45.
  • 46. Lumen From the Laravel Team Provides a structure for your project Includes Artisan helper command Console command support out of the box Embraces Laravel’s aim of being easy to learn and use Support for PSR-7 requests and responses
  • 47. Benchmarks Setup: Default install of the framework Using recommended way to output text Prints “Hello World!” Run on PHP 5.6 and 7 beta ApacheBench over 10 seconds Don’t hate me, just for guidance
  • 49. PHP 5.6 _______________________________________________________________________ |framework |requests per second|relative|peak memory|relative| |-------------------|------------------:|-------:|----------:|-------:| |slim-3 | 1,928.82| 7.3| 0.75| 1.0| |silex-1.3 | 1,148.48| 4.3| 1.00| 1.3| |lumen-5.1 | 1,292.36| 4.9| 1.00| 1.3| |nette-2.3 | 815.80| 3.1| 1.50| 2.0| |symfony-2.7 | 400.95| 1.5| 3.00| 4.0| |laravel-5.1 | 265.66| 1.0| 2.50| 3.3| ---------------------------------------------------------------
  • 51. PHP 7.0 vs 5.6 |framework | RPS 7.0 | RPS 5.6 | |-------------------|----------:|----------:| |slim-3 | 3,072.28 | 1,928.82 | |silex-1.3 | 1,689.54 | 1,148.48 | |lumen-5.1 | 1,968.67 | 1,292.36 | |nette-2.3 | 1,449.96 | 815.80 | |symfony-2.7 | 842.56 | 400.95 | |laravel-5.1 | 487.74 | 265.66 |
  • 52. “What do you use?”
  • 53. “What should I use?”
  • 54. Framework Independent Code a.k.a Framework Agnostic What is it about?
  • 55. Architectures/Patterns ●DDD (Domain-Driven Design) ●Ports & Adapters (Hexagonal Architecture) ●Dependency Inversion/Injection Principle
  • 56. Domain-Driven Design “Domain-driven design is not a technology or a methodology. DDD provides a structure of practices and terminology for making design decisions that focus and accelerate software projects.” Eric Evans
  • 57. Hexagonal Architecture “Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases” - Alistair Cockburn
  • 59. High-level modules should not depend on low-level modules. Both should depend on abstractions. A code is worth a thousand words! Dependency Inversion Principle
  • 60.
  • 61.

Editor's Notes

  1. Bring together PHP users in Thailand to discuss and learn about PHP Had a few meetups before but hope to make them more regular Look for us on Facebook
  2. Topics…. Questions for audience Who here hasn't used a PHP Framework before? So hands up who hasn't used one of the ones I've mentioned in the previous slide? What are you using?
  3. Let's look at it this way. Long term php and non frameworks Those repetitive pieces of code you always write when you start a project. Overtime I'm sure many of you started collecting these into a personal library that you could bring out each time you start a project. All the code Ties together those useful bits of code Structure Provides a structure to your code Not just where to put files and what to call them But generally also an MVC layer that brings together your Models, Views and Controllers Community Group of people all using that framework Some big some small But generally you don’t feel alone
  4. Save Time Save yourself time Don’t need to constantly reinvent the wheel Other people already done the work Not just the framework and it’s components that save you time Community Resources Community surrounding it brings plugins, tutorials, and help Most big frameworks have official or recognised tutorial sites Lots of other sites with tutorials and videos Lots of people on Stack overflow ready to answer Open Source Every Major Framework is an Open Source project Great minds working together to solve common goals Many eyes to review the code Contribute features and fixes Teams Guide people to code in similar ways Keeps code consistent Helps with code reviews
  5. Content Management Frameworks are things like Drupal and Wordpress We won’t be focusing on them
  6. Micro Frameworks generally very minimal. Give you a lot of freedom Not many features out of the box nice quick way to get routing, request and response handling code running allowing you to focus on your logical code. Features…. Best Applications need to run really fast are very small command line applications
  7. Suppose you have these two paths to your site In the past you might have a php file structure like this With routing you can have a structure like this Everything through a single entry point Routing then decides what code needs to be executed depending on the path
  8. Take this path With this route you can now match the path easily without worrying about the content of each part Then you can populate the request automatically
  9. Take this code example See the route is defined here Inside the handling code it adds some text to the response Can anyone tell me what this would output? And how about this?
  10. Full Stack frameworks packed with features and components that you'll need when developing larger applications Things you can expect to find in a typical framework: Database Abstraction Layer and ORM Support for Multiple configuration files allowing you to configure the application different for your dev, staging production Caching Logging Not just writing to a file support writing to No SQL or a service like loggly Detailed Error Handling Console Commands Events Templating Engine - for building your views and pages. Form building and validation Security Some frameworks are built entirely from scratch. Some use Third Party libraries either directly or wrapped in their own component and other will use a combination.
  11. Top 3 Interesting result as I'd never actually heard of Nette before this. I'll go into how they managed to sneak into third place later. Good to pick these three to talk about tonight. Focus Mostly offer the same features Focus on their strong points and the things that set them apart Also the documentation and community around them. Aim Try and be as objective about them as possible. At the end I'll ask you to guess which frameworks I choose myself and we'll see how well I did. Familiarity might make mistakes Happy to be correct Try to save questions and comment But put your hand up if you want to say something So let's start with the first place. Laravel.
  12. Billed as easy to use framework Takes the pain out of web development by making common tasks easier Builds on 3rd Party It builds upon a number of third party components including from symfony2. Facade It provides a "Facade" that gives static proxies to services, allowing you to avoiding dealing with dependencies. More Components It provides more components than the other frameworks. Homestead Provides a great vagrant box setup Everything you need for php development Be up and running in no time. All sizes Used for enterprise level applications, or simple JSON APIs Perfectly suited to all types and sizes of projects. Focus Focus this evening on The component library Facades
  13. Framework is built entirely from it's own set of components known as Illuminate. Some of these components wrap up and extend a number of 3rd party components. More Features More features than most frameworks. Some examples: Support for message queues out of the box Cloud storage. Can be added to a project in another framework. it does make it easier when it's already there. Contracts Uses something it calls contracts. Provide a common interface to multiple libraries that perform same function For example the Mailer contract defaults to the swiftmailer library for sending mail via SMTP However, it also has drivers for Mailgun, Mandrill and Amazon SES. To switch your mail sending from swiftmailer to one of these others you simply change the configuration. Fairly tight coupling These aspects of the Illuminate design make building fully featured Laravel projects very easy. Downside to this is that are more tightly coupled Harder, although not impossible, to use them outside of Laravel. Trade off between easy to learn and quick to write projects, but having a lot more work in the future
  14. A popular, if controversial, feature of laravel is the facades. Facade provide static proxies to object instances that are in service container. Avoid dependency injection to access your services call them with static methods from anywhere in your code. Existing Services Laravel ships with Facades for existing Illuminate services Create your own you can create your own facades to access the services you create. Bad Practise This does cause some controversy as it is seen by some as promoting bad practices harder to unit test Injecting As I’ll show now Injecting Services is still available
  15. Created RequestThingy class Single method to return if the “version” parameter exists in the request Unable to unit test Using dependency injection can inject request object Call method on object Can unit test
  16. Documentation Official documentation is very good Well laid out and easy to follow Very focused on using Facade might be difficult for users of other Frameworks With some digging can find the way to do things how you want Could be clearer in the documentation how to avoid Facades. However for beginners the documentation is comprehensive and easy to follow. Each component is clearly documented. Community Very large community Laracasts is a great site for getting help and discussion. Contains many tutorials. Not all the content is free and there is a subscription payment available. There is a large amount of support on Stack Overflow. I'll show some figures from that later.
  17. Has a Large community and user base Very easy to pick up and configure Illuminate provides more out of the box than other frameworks Homestead helps you get developing quickly and easily Documentation focuses more on Facade which might not be everyone's cup of tea Good for projects of any size Illuminate is quite tightly coupled so harder to leave or to use outside of Laravel
  18. Our second place in the SitePoint survey is Symfony2. Inspiration Taken heavy inspiration from the likes of Ruby on Rails Aimed at Aimed at building robust enterprise level applications. Customisable Gives developers full control over the configuration: from the directory structure to the third party libraries, almost everything can be customized. Can configure it in php, yml, xml or annotated comments. Profiling and Debugging Bundled with powerful tools to help developers test and debug. Enabled by default in you development environment. Components Include popular 3rd party libraries such as Doctrine, Swiftmailer and Twig Also used in other Frameworks. These third party libraries are not wrapped up in a symfony component unlike Laravel Bundles Good library of useful Bundles, essentially plugins, available Help you add powerful functionality to applications very quickly and easily. Learning Curve Focuses heavily on using dependency injection to setup your services. T Learning curve for Symfony can be a bit steep if you're new to frameworks or dependency injection Initial Config file is large Talk Focus Profiling and Debugging tools. Examples of useful Bundles Maturity of the Components.
  19. Other than the useful link to help you get started you may notice this bar on the bottom. This is the debug toolbar and is part of the powerful tools I mentioned a moment ago. In development mode this toolbar is on by default, though can be disabled.
  20. Live Demo Basic statistics about the page: Time taken Memory used Queries performed Click through for more details Queries Performed Request Detail Forms submitted Emails Sent Errors Log Timeline Incredible useful when developing large and complex applications.
  21. Another strong part of Symfony are the Third Party Bundles. FOS User Bundle Provides user registration, login, roles and profiles out of the box. Can add an entire customisable user layer to your application in minutes. OAuth Bundle Add login to your site through over 40 social and other logins. Combining this with the above can having you registering and logging in users through the likes of Facebook and Google in a less than an hour. Rest APIs Rest handling that will automatically translate json or xml requests to request parameters Automatically convert your data responses into the format the client is asking for Web API Documentation Automatic Web API documentation based on doc block annotations Builds site that you can put online and let people use to interface with your API Image manipulation Creating thumbnails Doing transformations and edits on images Other Bundles Many more bundles for popular third party libraries Integrate them into symfony giving you easy configuration Setup the services in the container for you
  22. Documentation Official documentation is pretty comprehensive. The main documentation takes you through each of the components and how they work together. Also provide what they call the Cookbook Cookbook is a growing collection of recipes for solving the most common problems that developers come across. Recipes cover so many useful topics - google results point to them Community Quite European centric A lot more likely to meet other symfony developers at a meetup like this in European countries. However the community is large enough that there is plenty of help to be found online. Stack overflow has many questions and answer Youtube has many videos tutorials Also KNP University which, like laracasts, provides an incredible amount of video tutorials, although many you need to pay for.
  23. Like Laravel it has a Large community and user base Very Powerful Profiling and Debugging Tools Mature Loosely Coupled and 3rd party Components Very configurable which can be both a blessing and a curse Can be daunting to new users and steeper learning curve Better for larger projects
  24. Mature Nette managed to secure an interesting 3rd place Relatively unheard of outsize Czech Republic 25% of vote in survey from country with 10 million people MVP Rather than calling itself an MVC framework it embraces MVP instead. That's Model-View-Presenter. MVC is generally quite loosely applied in PHP circles So most people won’t will really notice much difference between MVC and MVP. Tracy Includes it's own custom built debugger and profiler called Tracy Helping you to solve any development issues. Error Reporting Detailed Error Reporting Lets you drill down into errors when they occur in development Helps you to find the root of a problem easily. Latte Powerful templating engine called Latte Many useful features Can be easily be used independently of the framework itself. Components Overall a good range of custom components that are quite loosely coupled
  25. Like Symfony 2 Nette comes with a Debugger and Profiler. Live Demo Not as feature complete as Symfony's but provides useful tools for the developer to see how well his application is working. The Error handling is very good and lets you drill down and see exactly what was going on with your application when it went wrong.
  26. The Latte Templating Engine has some pretty nice features to make building your templates easier. As you'd expect with a templating engine it features template inheritance letting you build up you page in layers
  27. Context aware escaping of strings. It can tell if you're inserting a string into HTML or Javascript and it will escape it appropriately As you can see from this example.
  28. Macros like most templating engines you can write your macros around some HTML Inline Macros also supports macros inline in HTML As you can see from this example Also notice the ul element that depends on $items existing Filters Provides Filters for content manipulation This example it will capitalize the item string Many built in filters allowing you to strip, pad, trim, change case, format dates and numbers. Custom Filters and Macros The built in filters and macros can be supplemented by user defined ones you can write yourself in PHP.
  29. Compiles it's templates into PHP which it caches on disk. When adding the PHP OpCache this feature helps make latte very fast. Lastly it has no dependencies on other libraries.
  30. Latte Composer.json requirements for the Latte library No other php libraries Blade Composer.json requirements for Blade Requires 5 illuminate packages In total 9 packages installed compared to 1 for Latte
  31. The official documentation is available in Czech and English. Quite comprehensive and easy to follow unfortunately it's only available in those two languages. Documentation is very good and explains the framework and components clearly BUT once you get away from official documentation the lack of international exposure to Nette becomes somewhat more apparent. This also means the community surrounding it is very much based in the Czech Republic. Hopefully this will soon change.
  32. Easy learning curve (if you speak English or Czech) Useful debugger and profiler Great Error reporting in dev mode Fantastic templating engine can be easily used independently of Nette Unfortunately it has a fairly small community outside Czech Republic Placement on Sitepoint survey will bring it more attention You should expect to have to put in more of your own time to solve problems not addressed in the documentation.
  33. Symfony overall has the most Questions Looking at the recent asks laravel is really in the lead Nette shows it’s lack of international attraction
  34. Symfony 2 Closely related to Symfony2 Components Uses version 1 of the popular Pimple depenency injection container. Makes use of Symfony2 components for other parts Service Providers Service providers with act a bit like Bundles in Symfony2. Decent number of Official and Third Party Service providers that bring support for things such as Doctrine Twig Message Queues Amazon Webservice console command support and a number of other useful things. Version 2 Version 2 is under development and will use Version 3 of Pimple
  35. From this recent commit Release date for version 2 is at best fluid
  36. Beta Still in beta at the moment. Beta 2 was released just last week and we should see stable release soon. Slim 2 Brought to you by the guys behind the speedy Slim 2. Standards Built with standards in mind. Container Defaults to Pimple version 3 Supports any container that conforms to the container-interop Interface. Allows you to swap to a container you might be more familiar with PSR-7 It's Request and Response classes are implementations of the new PSR-7 standard of HTTP message interfaces. Code you write to use (middleware/controllers) can be use in other frameworks that support PSR-7 Already Symfony2 and Laravel 5.1 allow for bridging their own requests and responses into PSR-7. Routing For routing it uses the incredibly quick FastRoutes library by Nikita Popov. Web focus Aimed at Web Applications and no real console support that I’ve seen
  37. Brought to you by the Laravel Team Provides a structure for your project.
  38. Composer require for slim or silex in a new directory After running the Lumen installer you will have this instead. More welcoming Artisan Include Artisan console command helps you to perform a number of common tasks easily. Console Commands Has console command support out of the box Very useful in a micro framework as command line applications are a good use of them.
  39. It embraces Laravel’s aim of being easy to learn and use Like Slim 3 it has support for PSR-7 requests and responses
  40. Kenji Suzuki’s existing php framework benchmark repository Added Slim 3, Nette and Lumen 5.1 benchmarks Used Ramsus php7dev vagrant virtual machine Default install of each framework Recommended way of outputting text Prints “Hello World” ApacheBench test on number of connections over 10 second period Ran on php 5.6 and php 7 beta
  41. I tried to be as objective as possible However might have given away my preferences I use mostly use one of these Full Stack and one Micro Can anyone guess which Full Stack? Can anyone guess which micro?
  42. Tough question to answer “To each his own” New users I’d probably recommend Laravel More experienced and those looking to try something a bit harder Symfony2 You should try a new framework, don’t stick with what you know Try a microframework to compliment your projects