SlideShare a Scribd company logo
1 of 36
PHP Framework “Battle”
Zakir Hemraj
• Slides and code will
be posted on the
meetup group
• Video will be posted
on:
achievers.com/tech
• Tell your friends!
About Me
• Dev Team Lead @ Achievers
• Professional Web Framework Experience:
– J2EE with Spring, Hibernate
– PHP with CodeIgniter
– Ruby on Rails
• Not an expert in Zend Framework, CakePHP or
Symfony
PHP Framework Battle
PHP Framework Battle
Goal
1. Give you “flavor” of a few frameworks
2. Share some scientific and subjective
comparisons
3. Make you better equipped to compare and
choose the right framework
What I’m not doing…
• In-depth framework code walkthrough of all
features and functions
• Handing you a silver bullet
Agenda
1. Overview of frameworks
2. Review basic concepts
– MVC, ORMs
3. The application
– requirements, db schema
4. Code walkthrough
5. Performance and other comparisons
6. Final thoughts
The Contenders
Big Sites
CakePHP Zend Framework Symfony CodeIgniter
askmen.com legaldownload.net cfl.ca dictionary.com
usafootball.com onewishlist.net flash-wars.com codeguru.com
gamestous.com manageme.in ted.com expressionengine.com
Sources:
http://book.cakephp.org/1.2/view/510/Sites-in-the-wild
http://framework.zend.com/wiki/pages/viewpage.action?pageId=14134
http://trac.symfony-project.org/wiki/ApplicationsDevelopedWithSymfony
“You can write shitty code in any
language, any framework”
Review - MVC
Source: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
• Most web frameworks
are MVC these days
• Lots of inconsistencies
with the “model” layer
HTTP Request
HTML
Business Logic
& DB Access
Review - ORM
• Object Relational Mapping
• Maps database records to objects
• 1-to-1 table to object class
– E.g. job table -> job class
• Layer of abstraction to:
– Make code more maintainable
– Enable stronger OO programming
class TechTalk{ }
table:
tech_talk
O
R
M
Now What?
The Application
• A basic job board where people can:
– Add jobs
– View a listing of jobs
– Look at a post in more detail
• So simple, you could probably code it in your
sleep
The Schema
Setup
1. Download
framework *
2. Configure your app
with your db
3. Point your web
server to the
directory (i.e. vhost
in apache)
4. Start coding
PHP Framework Battle
Zend Code Summary
• Nice command line tools -> less typing
• Hard object instantiations play nice with IDE
• Good, OO separation of layers, including db
access, business logic, and forms
• Cons: We’ll discuss later ;)
PHP Framework Battle
CI Code Summary
• Super lightweight
• Very few conventions or “magic”
– Doesn’t force things on you
– Very explicit
• Lots of well documented tools and libraries
PHP Framework Battle
CAKE Summary
• Rails-like convention over configuration
• Very powerful, with convenient tools like
scaffolding and strong relational mapping
• Lots of “magic” that you need to be aware of
CONFIGURATION
CONVENTION
CI CAKEZend
Documentation
• Zend:
– Complete, but fragmented
– hard to follow.
• CI
– Great
• CAKE
– Outstanding
Other Comparisons
Zend CI CAKE
i18n Y Y Y
unit testing Y N * Y
templating Y Y * Y
security utils Y Y Y
authentication Y N Y
caching Y Y Y
Performance
• Source:
http://www.ruilog.com/blog/view/b6f0e42cf7
05.html
• Simple MVC logic, no DB connection
• See site for full hardware specs
Requests per Second
2331
873
678
1367
0
500
1000
1500
2000
2500
CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
Memory Usage (KB)
752.55
2824.26
2576.47
1711.57
0
500
1000
1500
2000
2500
3000
CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
System Load Average in 1 Minute
1.65
5.1
10.02
1.44
0
2
4
6
8
10
12
CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
Avg. Response Time (Milliseconds)
7.24
14.73
20.22
12.79
0
5
10
15
20
25
CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
Number of Function Calls
491
834
1789
792
0
200
400
600
800
1000
1200
1400
1600
1800
2000
CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
Number of Included Files
0
10
20
30
40
50
60
70
CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
AND LASTLY…
My Two Cents
• Too much abstraction is bad
• Understand the tradeoffs
• You will need to break out of the framework
• Stay curious
<?
echo “END”;
die();
?>

More Related Content

What's hot

Yii2 by Peter Jack Kambey
Yii2 by Peter Jack KambeyYii2 by Peter Jack Kambey
Yii2 by Peter Jack Kambeyk4ndar
 
Panada: An Introduction by Iskandar Soesman
Panada: An Introduction by Iskandar SoesmanPanada: An Introduction by Iskandar Soesman
Panada: An Introduction by Iskandar Soesmank4ndar
 
Comparing web frameworks
Comparing web frameworksComparing web frameworks
Comparing web frameworksAditya Sengupta
 
PHP Indonesia Meetup - What's New in Yii2 and PHP5.5
PHP Indonesia Meetup - What's New in Yii2 and PHP5.5PHP Indonesia Meetup - What's New in Yii2 and PHP5.5
PHP Indonesia Meetup - What's New in Yii2 and PHP5.5Petra Barus
 
ColdFusion framework comparison
ColdFusion framework comparisonColdFusion framework comparison
ColdFusion framework comparisonVIkas Patel
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!netzwelt12345
 
Feature and Future of ASP.NET
Feature and Future of ASP.NETFeature and Future of ASP.NET
Feature and Future of ASP.NETMd. Mahedee Hasan
 
Mainframe, the fast PHP framework
Mainframe, the fast PHP frameworkMainframe, the fast PHP framework
Mainframe, the fast PHP frameworkbibakis
 
Scaling Yii2 Application
Scaling Yii2 ApplicationScaling Yii2 Application
Scaling Yii2 ApplicationPetra Barus
 
Web application framework
Web application frameworkWeb application framework
Web application frameworkPankaj Chand
 
MVC4 framework
MVC4 frameworkMVC4 framework
MVC4 frameworkimarkovic
 
Basic concepts for python web development
Basic concepts for python web developmentBasic concepts for python web development
Basic concepts for python web developmentNexSoftsys
 
A site in 15 minutes with yii
A site in 15 minutes with yiiA site in 15 minutes with yii
A site in 15 minutes with yiiAndy Kelk
 
A Microsoft primer for PHP devs
A Microsoft primer for PHP devsA Microsoft primer for PHP devs
A Microsoft primer for PHP devsguest0a62e8
 
Entity framework (EF) 7
Entity framework (EF) 7Entity framework (EF) 7
Entity framework (EF) 7Paul Graham
 

What's hot (20)

Zend framework 01 - introduction
Zend framework 01 - introductionZend framework 01 - introduction
Zend framework 01 - introduction
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 
Yii2 by Peter Jack Kambey
Yii2 by Peter Jack KambeyYii2 by Peter Jack Kambey
Yii2 by Peter Jack Kambey
 
yii1
yii1yii1
yii1
 
Panada: An Introduction by Iskandar Soesman
Panada: An Introduction by Iskandar SoesmanPanada: An Introduction by Iskandar Soesman
Panada: An Introduction by Iskandar Soesman
 
Comparing web frameworks
Comparing web frameworksComparing web frameworks
Comparing web frameworks
 
PHP Indonesia Meetup - What's New in Yii2 and PHP5.5
PHP Indonesia Meetup - What's New in Yii2 and PHP5.5PHP Indonesia Meetup - What's New in Yii2 and PHP5.5
PHP Indonesia Meetup - What's New in Yii2 and PHP5.5
 
ColdFusion framework comparison
ColdFusion framework comparisonColdFusion framework comparison
ColdFusion framework comparison
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
 
Feature and Future of ASP.NET
Feature and Future of ASP.NETFeature and Future of ASP.NET
Feature and Future of ASP.NET
 
Mainframe, the fast PHP framework
Mainframe, the fast PHP frameworkMainframe, the fast PHP framework
Mainframe, the fast PHP framework
 
Scaling Yii2 Application
Scaling Yii2 ApplicationScaling Yii2 Application
Scaling Yii2 Application
 
Web application framework
Web application frameworkWeb application framework
Web application framework
 
MVC4 framework
MVC4 frameworkMVC4 framework
MVC4 framework
 
Basic concepts for python web development
Basic concepts for python web developmentBasic concepts for python web development
Basic concepts for python web development
 
A site in 15 minutes with yii
A site in 15 minutes with yiiA site in 15 minutes with yii
A site in 15 minutes with yii
 
A Microsoft primer for PHP devs
A Microsoft primer for PHP devsA Microsoft primer for PHP devs
A Microsoft primer for PHP devs
 
Entity framework (EF) 7
Entity framework (EF) 7Entity framework (EF) 7
Entity framework (EF) 7
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Asp.net mvc 4
Asp.net mvc 4Asp.net mvc 4
Asp.net mvc 4
 

Similar to PHP Framework Battle

Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixPeter Nazarov
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPressTaylor Lovett
 
UPenn on Rails intro
UPenn on Rails introUPenn on Rails intro
UPenn on Rails introMat Schaffer
 
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Petko Mikhailov
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware ProgrammingPostSharp Technologies
 
Headless cms architecture
Headless cms architectureHeadless cms architecture
Headless cms architectureKevin Wenger
 
2011 NetUG HH: ASP.NET MVC & HTML 5
2011 NetUG HH: ASP.NET MVC & HTML 52011 NetUG HH: ASP.NET MVC & HTML 5
2011 NetUG HH: ASP.NET MVC & HTML 5Daniel Fisher
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedAlexander Makarov
 
PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015kyphpug
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overviewumesh patil
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsDaniel Stange
 
Debugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseDebugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseOSSCube
 
How to build a JavaScript toolkit
How to build a JavaScript toolkitHow to build a JavaScript toolkit
How to build a JavaScript toolkitMichael Nelson
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1Derek Jacoby
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntAshley Roach
 

Similar to PHP Framework Battle (20)

Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPress
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
UPenn on Rails intro
UPenn on Rails introUPenn on Rails intro
UPenn on Rails intro
 
Codeigniter framework
Codeigniter framework Codeigniter framework
Codeigniter framework
 
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
 
Headless cms architecture
Headless cms architectureHeadless cms architecture
Headless cms architecture
 
2011 NetUG HH: ASP.NET MVC & HTML 5
2011 NetUG HH: ASP.NET MVC & HTML 52011 NetUG HH: ASP.NET MVC & HTML 5
2011 NetUG HH: ASP.NET MVC & HTML 5
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 
CodeIgniter
CodeIgniterCodeIgniter
CodeIgniter
 
PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overview
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce Apps
 
Debugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseDebugging with Zend Studio for Eclipse
Debugging with Zend Studio for Eclipse
 
How to build a JavaScript toolkit
How to build a JavaScript toolkitHow to build a JavaScript toolkit
How to build a JavaScript toolkit
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
 

More from Achievers Tech

Accessibility: A Journey to Accessible Rich Components
Accessibility: A Journey to Accessible Rich ComponentsAccessibility: A Journey to Accessible Rich Components
Accessibility: A Journey to Accessible Rich ComponentsAchievers Tech
 
My sql explain cheat sheet
My sql explain cheat sheetMy sql explain cheat sheet
My sql explain cheat sheetAchievers Tech
 
Agile - The Xtreme Labs Way
Agile - The Xtreme Labs WayAgile - The Xtreme Labs Way
Agile - The Xtreme Labs WayAchievers Tech
 
Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL QueriesAchievers Tech
 
Your Web Application Is Most Likely Insecure
Your Web Application Is Most Likely InsecureYour Web Application Is Most Likely Insecure
Your Web Application Is Most Likely InsecureAchievers Tech
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsAchievers Tech
 
Scaling High Traffic Web Applications
Scaling High Traffic Web ApplicationsScaling High Traffic Web Applications
Scaling High Traffic Web ApplicationsAchievers Tech
 

More from Achievers Tech (7)

Accessibility: A Journey to Accessible Rich Components
Accessibility: A Journey to Accessible Rich ComponentsAccessibility: A Journey to Accessible Rich Components
Accessibility: A Journey to Accessible Rich Components
 
My sql explain cheat sheet
My sql explain cheat sheetMy sql explain cheat sheet
My sql explain cheat sheet
 
Agile - The Xtreme Labs Way
Agile - The Xtreme Labs WayAgile - The Xtreme Labs Way
Agile - The Xtreme Labs Way
 
Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL Queries
 
Your Web Application Is Most Likely Insecure
Your Web Application Is Most Likely InsecureYour Web Application Is Most Likely Insecure
Your Web Application Is Most Likely Insecure
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
Scaling High Traffic Web Applications
Scaling High Traffic Web ApplicationsScaling High Traffic Web Applications
Scaling High Traffic Web Applications
 

Recently uploaded

Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 

Recently uploaded (20)

Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 

PHP Framework Battle

  • 2. • Slides and code will be posted on the meetup group • Video will be posted on: achievers.com/tech • Tell your friends!
  • 3. About Me • Dev Team Lead @ Achievers • Professional Web Framework Experience: – J2EE with Spring, Hibernate – PHP with CodeIgniter – Ruby on Rails • Not an expert in Zend Framework, CakePHP or Symfony
  • 6. Goal 1. Give you “flavor” of a few frameworks 2. Share some scientific and subjective comparisons 3. Make you better equipped to compare and choose the right framework
  • 7. What I’m not doing… • In-depth framework code walkthrough of all features and functions • Handing you a silver bullet
  • 8. Agenda 1. Overview of frameworks 2. Review basic concepts – MVC, ORMs 3. The application – requirements, db schema 4. Code walkthrough 5. Performance and other comparisons 6. Final thoughts
  • 10. Big Sites CakePHP Zend Framework Symfony CodeIgniter askmen.com legaldownload.net cfl.ca dictionary.com usafootball.com onewishlist.net flash-wars.com codeguru.com gamestous.com manageme.in ted.com expressionengine.com Sources: http://book.cakephp.org/1.2/view/510/Sites-in-the-wild http://framework.zend.com/wiki/pages/viewpage.action?pageId=14134 http://trac.symfony-project.org/wiki/ApplicationsDevelopedWithSymfony
  • 11. “You can write shitty code in any language, any framework”
  • 12. Review - MVC Source: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller • Most web frameworks are MVC these days • Lots of inconsistencies with the “model” layer HTTP Request HTML Business Logic & DB Access
  • 13. Review - ORM • Object Relational Mapping • Maps database records to objects • 1-to-1 table to object class – E.g. job table -> job class • Layer of abstraction to: – Make code more maintainable – Enable stronger OO programming class TechTalk{ } table: tech_talk O R M
  • 15. The Application • A basic job board where people can: – Add jobs – View a listing of jobs – Look at a post in more detail • So simple, you could probably code it in your sleep
  • 17. Setup 1. Download framework * 2. Configure your app with your db 3. Point your web server to the directory (i.e. vhost in apache) 4. Start coding
  • 19. Zend Code Summary • Nice command line tools -> less typing • Hard object instantiations play nice with IDE • Good, OO separation of layers, including db access, business logic, and forms • Cons: We’ll discuss later ;)
  • 21. CI Code Summary • Super lightweight • Very few conventions or “magic” – Doesn’t force things on you – Very explicit • Lots of well documented tools and libraries
  • 23. CAKE Summary • Rails-like convention over configuration • Very powerful, with convenient tools like scaffolding and strong relational mapping • Lots of “magic” that you need to be aware of
  • 25. Documentation • Zend: – Complete, but fragmented – hard to follow. • CI – Great • CAKE – Outstanding
  • 26. Other Comparisons Zend CI CAKE i18n Y Y Y unit testing Y N * Y templating Y Y * Y security utils Y Y Y authentication Y N Y caching Y Y Y
  • 27. Performance • Source: http://www.ruilog.com/blog/view/b6f0e42cf7 05.html • Simple MVC logic, no DB connection • See site for full hardware specs
  • 30. System Load Average in 1 Minute 1.65 5.1 10.02 1.44 0 2 4 6 8 10 12 CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
  • 31. Avg. Response Time (Milliseconds) 7.24 14.73 20.22 12.79 0 5 10 15 20 25 CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
  • 32. Number of Function Calls 491 834 1789 792 0 200 400 600 800 1000 1200 1400 1600 1800 2000 CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
  • 33. Number of Included Files 0 10 20 30 40 50 60 70 CodeIgniter 2.1 CakePHP 2.0.4 Zend 1.11.11 Symfony 2.0.6
  • 35. My Two Cents • Too much abstraction is bad • Understand the tradeoffs • You will need to break out of the framework • Stay curious

Editor's Notes

  1. -PHP Developers? -Experience with Zend, Cake, CodeIgniter, RoR, J2EE frameworks?-Had to choose a web framework for your company
  2. Choosing a web frameworkis a lot like this. Claims to be:More enjoyable to useBetter securityBetter layers of separation
  3. ZendRun by Zend technologiesCakeStarted in 2005Modeled on RoRIn 2009, some members left to start the Lithium framework
  4. All frameworks “work” and have their benefitsThe reality is that
  5. Poll audience -&gt; what things do you look for
  6. MySQLUsually would use singular labels for table nameInts, varchars, and datetime
  7. Zend topics to cover:Zend command line utilities (zf)zf create project jobs_zendModel layerDifference between model and db_tablezf create model xzf create db-table job jobs (or create test)db tabledb table objects have built in functions and are 1-to-1 to tables (but not necessarily an orm). Simple DAOs. Override variables that define table, primary, and other options.Can write custom “queries” in db table objectsModelsMeant to encapsulate business logicDon’t extend anythingStrong object declaration makes for good IDE experienceIntroduce skinny controller, fat model ControllerIndex Contoller is defaultNaming conventions -&gt; xAction, and url patterns -&gt; not that cleanViewsBasic manipulation of dataSide notes:-good separation of staging, production, etc. out of the box
  8. Go to wikipedia framework comparisons if you want more
  9. AbstractionJavascript and html abstraction can lead to problems, working around framework to get what you wantQuery abstraction from ORM should be used with cautionTradeoffsRAD frameworks with lots of magic have their benefits, but also abstract devs from underlying performance issuesLite frameworks offer great performance, but you need to develop your own standards, especially for your own teamsBreakout-For almost any serious application, you’ll need to change or modify something about the framework-At Achievers, we needed to modify CI routing, logging, application loading, security filtering, etc. Understand the extendability of your applicationStay curiousLook under the covers always, and don’t be scaredUnderstand what’s happening behind the scenesUltimately, it’s the developer, not the framework