SlideShare a Scribd company logo
PHPEE?  The Enterprise PHP Architecture John Coggeshall Zend Technologies http://www.zend.com/
Who am I? Senior Technical Consultant for Zend Author of PHP 5 Unleashed Member of Zend Education Advisory Board Maintainer of the Tidy, XMLRPCi, BLENC extensions for PHP 5
Why am I here? Obviously to talk about PHP in the Enterprise But more to the point, where PHP fits in the Enterprise stack Make an attempt to clarify the differences between PHP 5 / J2EE / .NET Drink Beer
Let's start off at the beginning A few things I've noticed: Defining what exactly is an “Enterprise Application” is pretty difficult People mistake “Enterprise Applications” for technologies employing things such as J2EE / .NET / PHP People don't identify Enterprise Architectures as a collection of patterns
What's Enterprise anyway Can you define “Enterprise” application? Scalable Large Object Oriented Oracle-based Distributed Cash-Cow High Availability Java Based Complex Many Users
What's Enterprise anyway Can you define “Enterprise” application? Scalable Large Object Oriented Oracle-based Distributed Cash-Cow High Availability Java Based Complex Many Users Does any of those things really define much of anything to you?
A Definition I like..ish... From Martin Fowler's “Patterns of Enterprise Application Architecture”... A lot of data Persistent data Access to Data Concurrently Integration
Devil in the Details Sounds like a great academic definition As always, the implementation is  just a little  more complex Implied Characteristics Scalability Availability Integrity
From Theory to Practice Whatever your definition of Enterprise is, someone has to actually design an implementation A lot of people mistake implementations for the definition That ends up costing them a lot of money they might not have otherwise spent.
Enterprise Architectures Is J2EE an Enterprise Architecture? Is .NET an Enterprise Architecture? Short answer: Sure Longer Answer: They are implementations of a set of Enterprise Design Patterns
Design Patterns I'm pretty sure most of us know what these are. Formally they are defined as: A name The core of a problem it aims to solve The core of the solution to that problem The consequences of using that solution
Enterprise Design Patterns Deal with the details Enterprise Design Patterns Deal with the details - Scalability - High Availability - Integrity
Enterprise Design Patterns Design Patterns can be applied to more than just working with OO code They can be applied to conceptual architectures Could be implemented by any language with the aforementioned Enterprise capabilities
So..? J2EE is one application of design patterns to create an Enterprise Architecture Accomplishes most of the goals required by large-scale Enterprise applications But: Generic Problems Lead to Generic Solutions
Not everything is a nail While J2EE succeeds in many ways, it's really not designed for the “Web Problem” The amount of effort put into even simple applications is crazy There are simpler ways to do this stuff
This is where PHP comes in In general, PHP developers can produce the same web site as a JSP developer in 25-50% less time That's not BS either PayPal's Sample Integration for PHP took me about 8 days, the Java guy had been working on it for about a month.
I'm not saying Java sucks It's not that Java/J2EE sucks, PHP is just better at the web problem On the other hand, PHP pretty much sucks at the Enterprise backend problem But with our power's combined.... ♥ Java
The PHP / Java Bridge This is pretty sexy:
Using a Screwdriver If J2EE is really good at the back-end.. ... and PHP is really good at the front end ... and they can play nice together I think you get the picture Remember, you can implement the same design patterns in PHP 5 as you do in J2EE!
Example PHP/Java Architecture
For those who are pure PHP Of course PHP is more than able to develop Enterprise applications alone Many of the same patterns that apply to J2EE/.NET will work the same in PHP To answer: PHP works great in Enterprise environments, it just doesn't force you into a pre-designed mold (good and bad)
PHP Specific Patterns There are a lot of Design Patterns which apply specifically to PHP in Enterprise Environments Esp. when dealing with specific types of technology (Apache, MySQL, etc). Let's check a few of them out
Scaling with MySQL I assume you know about MySQL. Replication is hot, if you do things right in PHP Scales great until your writes exceed what can be done on a single machine That's almost not true anymore, but for now it is.
MySQL Architecture Often when writing Heavy-hitting PHP applications the biggest issue is the back-end database When doing a pure PHP implementation, good MySQL knowledge is important Let's look at a great MySQL architectural pattern
MySQL Replication Pattern
MySQL Replication Pattern Works great, but you have to account for it in your PHP applications Application DB abstractions should provide different facilities at the API level for reading/writing to the DB and perhaps a third for FULLTEXT searching Even if you don't need it now, a little planning goes a long way
Leverage mod_rewrite If you're web application has a lot of semi-static content Content that  could  change so it has to be stored in the DB, but almost never does .. And you're running on Apache This Design Pattern is killer!
Leverage mod_rewrite Most people in PHP would implement a page like this: http://www.example.com/show_article.php?id=5 This would be responsible for generating the semi-static page HTML for the browser
Leverage mod_rewrite Instead of generating the HTML for the browser, make this script generate another PHP script that contains mostly static content Keep things like personalization code, but make the actual article itself static in the file Write the file to disk in a public folder under document root
Leverage mod_rewrite If you put them in this directory http://www.example.com/articles/5.php You can create a mod_rewrite rule such that http://www.example.com/articles/5.php  maps to http://www.example.com/show_article.php?id=5 Since show_article.php writes files to articles, once it's been generated no more DB reads!
Leverage mod_rewrite Simple and Elegant Solution Allows you to keep pages “personalized” Very easy to Maintain Credit goes to Theo Schlossnagle (?)
Improving PHP Performance Improving the speed of PHP can be done very easily using an opcode cache
So, if you want pure PHP
Or you have an existing back-end....
PHP  is  enterprise ready! Thank you! Questions? Buy My Book!

More Related Content

PPT
Top 30 Scalability Mistakes
John Coggeshall
 
PPT
Top 10 Scalability Mistakes
John Coggeshall
 
ODP
Professional PHP: an open-source alternative for enterprise development [Antw...
Combell NV
 
PDF
WordPress Plugin - Chameleon
Fahad Mahmood
 
PDF
Everyones invited! Meet accesibility requirements with ColdFusion
ColdFusionConference
 
PDF
Form Function Class 6, Manila, Philippines 14/11/2015
Holger Bartel
 
PPT
Browser As Platform
Kai Feng Zhang
 
PPTX
Cf objective2014 software-craftsmanship
ColdFusionConference
 
Top 30 Scalability Mistakes
John Coggeshall
 
Top 10 Scalability Mistakes
John Coggeshall
 
Professional PHP: an open-source alternative for enterprise development [Antw...
Combell NV
 
WordPress Plugin - Chameleon
Fahad Mahmood
 
Everyones invited! Meet accesibility requirements with ColdFusion
ColdFusionConference
 
Form Function Class 6, Manila, Philippines 14/11/2015
Holger Bartel
 
Browser As Platform
Kai Feng Zhang
 
Cf objective2014 software-craftsmanship
ColdFusionConference
 

What's hot (14)

KEY
Writing Your First Plugin
George Ornbo
 
PPTX
XML for Humans: Non-geek Discussion of a Geek-chic Topic
Publishing Smarter
 
KEY
corporateJavascript
climboid
 
PPT
Top 10 Scalability Mistakes
John Coggeshall
 
KEY
Charts, PDFs, and PHP
jerkob
 
PPTX
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Chris Love
 
PDF
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
GreeceJS
 
PPT
PHP Framework
celeroo
 
PPT
Apache Con 2008 Top 10 Mistakes
John Coggeshall
 
PPTX
How to Convert Flash Training Course Library to iPad/HTML5
David Goodman
 
PPT
Drupal theming 101
Exove
 
PPTX
PHP framework difference
iScripts
 
PPT
Gluing it all together: How teams can build enterprise JavaScript application...
Codemotion
 
PDF
Francesco Ciriaci Get Plone To Business!
Vincenzo Barone
 
Writing Your First Plugin
George Ornbo
 
XML for Humans: Non-geek Discussion of a Geek-chic Topic
Publishing Smarter
 
corporateJavascript
climboid
 
Top 10 Scalability Mistakes
John Coggeshall
 
Charts, PDFs, and PHP
jerkob
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Chris Love
 
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
GreeceJS
 
PHP Framework
celeroo
 
Apache Con 2008 Top 10 Mistakes
John Coggeshall
 
How to Convert Flash Training Course Library to iPad/HTML5
David Goodman
 
Drupal theming 101
Exove
 
PHP framework difference
iScripts
 
Gluing it all together: How teams can build enterprise JavaScript application...
Codemotion
 
Francesco Ciriaci Get Plone To Business!
Vincenzo Barone
 
Ad

Similar to Enterprise PHP (20)

PDF
Beginning PHP
Mohammed Safwat
 
PPT
Enterprise PHP (PHP London Conference 2008)
Ivo Jansch
 
PDF
Core J2EE Patterns 1st Edition Deepak Alur
arjczwycbw525
 
PPTX
Wordpress hacks
With in Health
 
PPTX
Share point developer who’s that
Kanji AnilKumar
 
PPTX
Stream SQL eventflow visual programming for real programmers presentation
streambase
 
PDF
Building resuable and customizable Vue components
Filip Rakowski
 
PDF
Joomla tempates talk
Chad Windnagle
 
PPTX
Php vs. asp.net how to choose the right one
Concetto Labs
 
PDF
High-level View of Web & WordPress Development (transcript)
Alain Schlesser
 
PPTX
Modern JavaScript Talk
Derek Binkley
 
PDF
learn mvc project in 7 day
Quach Long
 
DOCX
PHP Lesson
Rithirun Meas
 
PPTX
Php rules
christopher mabunda
 
PDF
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap Creative
 
PDF
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
PixelCrayons
 
PPTX
PHP Vs ASP.NET : How to Choose the Right One?
netdroidtech
 
PDF
Node.js vs PHP, What should SMBs prefer for web development.pdf
Mindfire LLC
 
PDF
Phparchitect Box Of Php Eric Mann Eric Van Johnson Chris Tankersley
qashtutjahjo
 
DOCX
Digita World Marketing
sunnyhashmi4
 
Beginning PHP
Mohammed Safwat
 
Enterprise PHP (PHP London Conference 2008)
Ivo Jansch
 
Core J2EE Patterns 1st Edition Deepak Alur
arjczwycbw525
 
Wordpress hacks
With in Health
 
Share point developer who’s that
Kanji AnilKumar
 
Stream SQL eventflow visual programming for real programmers presentation
streambase
 
Building resuable and customizable Vue components
Filip Rakowski
 
Joomla tempates talk
Chad Windnagle
 
Php vs. asp.net how to choose the right one
Concetto Labs
 
High-level View of Web & WordPress Development (transcript)
Alain Schlesser
 
Modern JavaScript Talk
Derek Binkley
 
learn mvc project in 7 day
Quach Long
 
PHP Lesson
Rithirun Meas
 
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap Creative
 
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
PixelCrayons
 
PHP Vs ASP.NET : How to Choose the Right One?
netdroidtech
 
Node.js vs PHP, What should SMBs prefer for web development.pdf
Mindfire LLC
 
Phparchitect Box Of Php Eric Mann Eric Van Johnson Chris Tankersley
qashtutjahjo
 
Digita World Marketing
sunnyhashmi4
 
Ad

More from John Coggeshall (20)

PPTX
Virtualization for Developers
John Coggeshall
 
PPTX
Migrating to PHP 7
John Coggeshall
 
PPTX
Peek at PHP 7
John Coggeshall
 
PPTX
ZF2 Modules: Events, Services, and of course, modularity
John Coggeshall
 
PPT
PHP Development for Google Glass using Phass
John Coggeshall
 
PPTX
Virtualization for Developers
John Coggeshall
 
PPTX
Development with Vagrant
John Coggeshall
 
PPTX
Introduction to Zend Framework 2
John Coggeshall
 
PPTX
10 things not to do at a Startup
John Coggeshall
 
PPTX
Virtualization for Developers
John Coggeshall
 
PPTX
Puppet
John Coggeshall
 
PPT
Building PHP Powered Android Applications
John Coggeshall
 
PPT
Ria Applications And PHP
John Coggeshall
 
PPT
Beyond the Browser
John Coggeshall
 
PPT
Ria Development With Flex And PHP
John Coggeshall
 
PPT
Enterprise PHP: A Case Study
John Coggeshall
 
PPT
Building Dynamic Web Applications on i5 with PHP
John Coggeshall
 
PPT
PHP Security Basics
John Coggeshall
 
PPT
Migrating from PHP 4 to PHP 5
John Coggeshall
 
PPT
Ajax and PHP
John Coggeshall
 
Virtualization for Developers
John Coggeshall
 
Migrating to PHP 7
John Coggeshall
 
Peek at PHP 7
John Coggeshall
 
ZF2 Modules: Events, Services, and of course, modularity
John Coggeshall
 
PHP Development for Google Glass using Phass
John Coggeshall
 
Virtualization for Developers
John Coggeshall
 
Development with Vagrant
John Coggeshall
 
Introduction to Zend Framework 2
John Coggeshall
 
10 things not to do at a Startup
John Coggeshall
 
Virtualization for Developers
John Coggeshall
 
Building PHP Powered Android Applications
John Coggeshall
 
Ria Applications And PHP
John Coggeshall
 
Beyond the Browser
John Coggeshall
 
Ria Development With Flex And PHP
John Coggeshall
 
Enterprise PHP: A Case Study
John Coggeshall
 
Building Dynamic Web Applications on i5 with PHP
John Coggeshall
 
PHP Security Basics
John Coggeshall
 
Migrating from PHP 4 to PHP 5
John Coggeshall
 
Ajax and PHP
John Coggeshall
 

Recently uploaded (20)

PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 

Enterprise PHP

  • 1. PHPEE? The Enterprise PHP Architecture John Coggeshall Zend Technologies http://www.zend.com/
  • 2. Who am I? Senior Technical Consultant for Zend Author of PHP 5 Unleashed Member of Zend Education Advisory Board Maintainer of the Tidy, XMLRPCi, BLENC extensions for PHP 5
  • 3. Why am I here? Obviously to talk about PHP in the Enterprise But more to the point, where PHP fits in the Enterprise stack Make an attempt to clarify the differences between PHP 5 / J2EE / .NET Drink Beer
  • 4. Let's start off at the beginning A few things I've noticed: Defining what exactly is an “Enterprise Application” is pretty difficult People mistake “Enterprise Applications” for technologies employing things such as J2EE / .NET / PHP People don't identify Enterprise Architectures as a collection of patterns
  • 5. What's Enterprise anyway Can you define “Enterprise” application? Scalable Large Object Oriented Oracle-based Distributed Cash-Cow High Availability Java Based Complex Many Users
  • 6. What's Enterprise anyway Can you define “Enterprise” application? Scalable Large Object Oriented Oracle-based Distributed Cash-Cow High Availability Java Based Complex Many Users Does any of those things really define much of anything to you?
  • 7. A Definition I like..ish... From Martin Fowler's “Patterns of Enterprise Application Architecture”... A lot of data Persistent data Access to Data Concurrently Integration
  • 8. Devil in the Details Sounds like a great academic definition As always, the implementation is just a little more complex Implied Characteristics Scalability Availability Integrity
  • 9. From Theory to Practice Whatever your definition of Enterprise is, someone has to actually design an implementation A lot of people mistake implementations for the definition That ends up costing them a lot of money they might not have otherwise spent.
  • 10. Enterprise Architectures Is J2EE an Enterprise Architecture? Is .NET an Enterprise Architecture? Short answer: Sure Longer Answer: They are implementations of a set of Enterprise Design Patterns
  • 11. Design Patterns I'm pretty sure most of us know what these are. Formally they are defined as: A name The core of a problem it aims to solve The core of the solution to that problem The consequences of using that solution
  • 12. Enterprise Design Patterns Deal with the details Enterprise Design Patterns Deal with the details - Scalability - High Availability - Integrity
  • 13. Enterprise Design Patterns Design Patterns can be applied to more than just working with OO code They can be applied to conceptual architectures Could be implemented by any language with the aforementioned Enterprise capabilities
  • 14. So..? J2EE is one application of design patterns to create an Enterprise Architecture Accomplishes most of the goals required by large-scale Enterprise applications But: Generic Problems Lead to Generic Solutions
  • 15. Not everything is a nail While J2EE succeeds in many ways, it's really not designed for the “Web Problem” The amount of effort put into even simple applications is crazy There are simpler ways to do this stuff
  • 16. This is where PHP comes in In general, PHP developers can produce the same web site as a JSP developer in 25-50% less time That's not BS either PayPal's Sample Integration for PHP took me about 8 days, the Java guy had been working on it for about a month.
  • 17. I'm not saying Java sucks It's not that Java/J2EE sucks, PHP is just better at the web problem On the other hand, PHP pretty much sucks at the Enterprise backend problem But with our power's combined.... ♥ Java
  • 18. The PHP / Java Bridge This is pretty sexy:
  • 19. Using a Screwdriver If J2EE is really good at the back-end.. ... and PHP is really good at the front end ... and they can play nice together I think you get the picture Remember, you can implement the same design patterns in PHP 5 as you do in J2EE!
  • 21. For those who are pure PHP Of course PHP is more than able to develop Enterprise applications alone Many of the same patterns that apply to J2EE/.NET will work the same in PHP To answer: PHP works great in Enterprise environments, it just doesn't force you into a pre-designed mold (good and bad)
  • 22. PHP Specific Patterns There are a lot of Design Patterns which apply specifically to PHP in Enterprise Environments Esp. when dealing with specific types of technology (Apache, MySQL, etc). Let's check a few of them out
  • 23. Scaling with MySQL I assume you know about MySQL. Replication is hot, if you do things right in PHP Scales great until your writes exceed what can be done on a single machine That's almost not true anymore, but for now it is.
  • 24. MySQL Architecture Often when writing Heavy-hitting PHP applications the biggest issue is the back-end database When doing a pure PHP implementation, good MySQL knowledge is important Let's look at a great MySQL architectural pattern
  • 26. MySQL Replication Pattern Works great, but you have to account for it in your PHP applications Application DB abstractions should provide different facilities at the API level for reading/writing to the DB and perhaps a third for FULLTEXT searching Even if you don't need it now, a little planning goes a long way
  • 27. Leverage mod_rewrite If you're web application has a lot of semi-static content Content that could change so it has to be stored in the DB, but almost never does .. And you're running on Apache This Design Pattern is killer!
  • 28. Leverage mod_rewrite Most people in PHP would implement a page like this: http://www.example.com/show_article.php?id=5 This would be responsible for generating the semi-static page HTML for the browser
  • 29. Leverage mod_rewrite Instead of generating the HTML for the browser, make this script generate another PHP script that contains mostly static content Keep things like personalization code, but make the actual article itself static in the file Write the file to disk in a public folder under document root
  • 30. Leverage mod_rewrite If you put them in this directory http://www.example.com/articles/5.php You can create a mod_rewrite rule such that http://www.example.com/articles/5.php maps to http://www.example.com/show_article.php?id=5 Since show_article.php writes files to articles, once it's been generated no more DB reads!
  • 31. Leverage mod_rewrite Simple and Elegant Solution Allows you to keep pages “personalized” Very easy to Maintain Credit goes to Theo Schlossnagle (?)
  • 32. Improving PHP Performance Improving the speed of PHP can be done very easily using an opcode cache
  • 33. So, if you want pure PHP
  • 34. Or you have an existing back-end....
  • 35. PHP is enterprise ready! Thank you! Questions? Buy My Book!