Learning OOP in PHP
A collection of resources to learn object-oriented programming and related concepts for PHP developers.
Please see CONTRIBUTING for details and contribute. ;)
Tutorials
OOP Fundamentals
Object-oriented programming fundamentals tutorials.
OOP Advanced
Object-oriented programming advanced tutorials.
Object-Oriented Design
Object-oriented design tutorials.
- Object-Oriented Design in PHP (►$) - An introduction to object-oriented design in PHP.
- Object Oriented Design Cheat Sheet - A cheat sheet about object-oriented design.
- Principles Of Object Oriented Design - An introduction to some principles about object-oriented design.
- Foundations Of OO Design - Some thoughts about object-oriented design.
- How to Write Code That Embraces Change - An introduction to OOD principles like cohesion, orthogonality, coupling, SOLID and others.
- Build seven good object-oriented habits in PHP - A tutorial about good habits in OOP in PHP.
- 3 Key Software Principles You Must Understand - An introduction to DRY, KISS and YAGNI principles.
- From STUPID to SOLID Code! - An introduction to SOLID principles.
- Don't be STUPID: GRASP SOLID! - An introduction to SOLID principles in PHP.
- Don't Be Stupid, Grasp Solid - Slides - An introduction to SOLID and other OOD principles in PHP.
- The SOLID Principles - A series of tutorials about SOLID principles in PHP.
- The Single Responsibility Principle - An introduction to Single Responsibility Principle in PHP.
- The Open/Closed Principle - An introduction to Open/Closed Principle in PHP.
- Constructors and Breaking the Liskov Substitution Principle - An introduction to Liskov Substitution Principle in PHP.
- Inversion of Control – The Hollywood Principle - An introduction to Inversion of Control Principle in PHP.
- The Dependency Inversion Principle - An introduction to Dependency Inversion Principle in PHP.
- SRP: The Single Responsibility Principle - An article explaining the Single Responsibility Principle.
- The Open-Closed Principle - An article explaining the Open/Closed Principle.
- The Liskov Substitution Principle - An article explaining the Liskov Substitution Principle.
- The Interface Segregation Principle - An article explaining the Interface Segregation Principle.
- The Dependency Inversion Principle - An article explaining the Dependency Inversion Principle.
- Inversion of Control Containers and the Dependency Injection Pattern - An article about Inversion of Control Containers and the Dependency Injection Pattern.
- DIP in the Wild - An article about Dependency Inversion Principle.
- Reducing Coupling - An article about reducing coupling.
- Tell Don't Ask - An introduction to Tell Don't Ask principle.
- Introduction to the Law of Demeter - An introduction to the Law of Demeter.
- You Aren't Gonna Need It - An introduction to YAGNI principle.
- Premature Optimization - An introduction to Premature Optimization anti-pattern.
- Primitive Obsession - An introduction to Primitive Obsession anti-pattern.
- God Class - An introduction to God Class anti-pattern.
- Object Calisthenics - An introduction to Object Calisthenics.
- Your code sucks, let's fix it! - An introduction to Object Calisthenics in PHP.
- Domain-Driven Design - An introduction to Domain-Driven Design.
- The Null Object Pattern - Polymorphism in Domain Models - An introduction to the Null Object Pattern in PHP.
- An Introduction to Services - An introduction to Services in PHP.
- Evolving Toward a Persistence Layer - An introduction to Persistence Layer implementation in PHP.
- Building a Domain Model – An Introduction to Persistence Agnosticism and Building a Domain Model – Integrating Data Mappers - A tutorial about creating a Domain Model in PHP.
- Handling Collections of Aggregate Roots – the Repository Pattern - An introduction to the Repository Pattern in PHP.
- Value Objects - An introduction to Value Objects in PHP.
- What is the difference between Entities and Value Objects? - A tutorial explaining the difference between Entities and Value Objects.
- What’s the difference between Active Record and Data Mapper? - A tutorial explaining the difference between Active Record and Data Mapper patterns.
- Managing Class Dependencies: An Introduction to Dependency Injection, Service Locators, and Factories, Part 1 and Managing Class Dependencies: An Introduction to Dependency Injection, Service Locators, and Factories, Part 2 - An introduction to Dependency Injection, Service Locators and Factories.
- Money Pattern: The Right Way to Represent Value-Unit Pairs - An introduction to the Money Pattern in PHP.
- Working with Money and Currency in PHP - A tutorial about how to work with Money and Currency in PHP.
- Working with Products, Orders and Sales in PHP - A tutorial about how to work with Products, Orders and Sales in PHP.
- Reusing Implementation – a Walk-through of Inheritance, Composition, and Delegation - A tutorial about code reusing and OOP in PHP.
- Design Tech Talk Series Presents: OO Design for Testability (►) - A talk about Object-Oriented Design a testability.
- The Clean Code Talks - Don't Look For Things! (►) - Another talk about Object-Oriented Design a testability.
- Programming With Anthony - Paradigm Soup (►) - An introduction to programming paradigms and its differences.
- Programming With Anthony - Dependency Injection (►) - An introduction to Dependency Injection.
- What is Dependency Injection? - An introduction to Dependency Injection in PHP.
- Dependency Injection with PHP 5.3 - Slides about Dependency Injection in PHP.
- Why use a Dependency Injection Container? - A tutorial of what is and when to use a Dependency Injection Container.
- Dependency Injection with Pimple - An introduction to Dependency Injection and how use Pimple for that.
- Dependency Injection Is Not The Same As The Dependency Inversion Principle - A tutorial explaining the difference between Dependency Injection and Dependency Inversion Principle.
- Catalog of Patterns of Enterprise Application Architecture - A catalog of Patterns of Enterprise Application Architecture.
Design Patterns
Design patterns tutorials.
Refactoring
Refactoring tutorials.
Architecture
Architecture tutorials.
Miscellaneous
Not related to OOP but interesting resources.
Videos
Videos about object-oriented programming and related concepts.
Slides
Slides about object-oriented programming and related concepts.
- The OOP in PHP - An introductory tutorial to OOP concepts and terminology using PHP's object model as an example.
Courses
Courses about object-oriented programming and related concepts.
Books
Fantastic and must-read books about object-oriented programming, analysis, design and related concepts.
People
Some fantastic and influential PHP and non-PHP developers.
- Adam Culp - Consultant at Zend Technologies and Sunshine PHP organizer.
- Alvaro Videla - Creator of PHP library for RabbitMQ and co-author of RabbitMQ in Action.
- Andi Gutmans - CEO and co-founder of Zend and PHP co-architect.
- Andy Hunt - One of the original authors of Agile Manifesto and co-author of The Pragmatic Programmer book.
- Anthony Ferrara - Co-author of PHP Internals book and Developer Advocate for Google.
- Benjamin Eberlei - Project-leader of Doctrine ORM and contributor to the Symfony2 Framework.
- Bernhard Schussek - Member of Symfony2 core development and creator of Puli library.
- Bruno Skvorc - Web developer and PHP editor in Sitepoint.
- Cal Evans - PHP developer and open source contributor.
- Chad Fowler - Developer, speaker and author of The Passionate Programmer book.
- Christophe Coevoet - Member of Symfony2 core development and open source contributor to projects like Doctrine ORM.
- David Zuelke - PHP developer at Heroku and regular speaker.
- Dayle Rees - Laravel evangelist and author of Laravel Code Bright and Code Happy books.
- Derick Rethans - Author of Xdebug and PHP engineer/evangelist on MongoDB.
- Erika Heidi - Author of Vagrant Cookbook and Phansible project and developer evangelist at Digital Ocean.
- Fabien Potencier - CEO and co-founder of SensioLabs and founder and project lead of Symfony Framework.
- Guilherme Blanco - PHP developer and open source contributor to projects like Doctrine ORM and Zend and Symfony frameworks.
- Hugo Hamon - PHP developer and head of training in SensioLabs.
- Igor Wiedler - Creator of Silex micro-framework and open-source contributor to projects like Symfony and Composer.
- Javier Eguiluz - Symfony evangelist in SensioLab and creator of easybook project.
- Jeffrey Way - Creator of Laracasts and Laravel contributor and evangelist.
- Jeremy Mikola - Engineer at MongoDB, open source contributor to projects like Doctrine ODM and Symfony Framework, and co-organizer of WurstCon.
- Johannes Schmitt - Founder of Scrutinizer CI and open source contributor to projects like Symfony.
- Jordi Boggiano - Founder of Toran Proxy, co-creator and project lead of Composer and Monolog and Symfony core developer.
- Josh Lockhart - Creator of Slim Framework and PHP The Right Way site.
- Julien Pauli - Co-author of PHP Internals book and open source contributor.
- Kent Beck - One of the original authors of Agile Manifesto and creator of Exteme Programming and Test Driven Development.
- Konstantin Kudryashov - Creator of Behat and PhpSpec test frameworks.
- Kris Wallsmith - PHP developer and creator of Assetic framework and Buzz library.
- Larry Garfield - PHP developer and core contributor of Drupal.
- Lukas Kahwe Smith - PHP developer and open source contributor to projects like Doctrine ORM and Symfony Framework.
- Marcello Duarte - PHP developer and co-creator of PhpSpec test framework.
- Martin Fowler - One of the original authors of Agile Manifesto and author of the best selling books about software engineering like Patterns of Enterprise Application Architecture and Refactoring books.
- Matthew Weier O'Phinney - Principal Enginner at Zend Technologies and project lead for Zend Framework and Apigility.
- Matthias Noback - PHP developer and author of books like A Year with Symfony and Principles of Package Design.
- Marco Pivetta - PHP developer and core team member of Doctrine ORM and team member of Zend Framework.
- Michael Dowling - Software enginner at Amazon Web Services and creator of Guzzle library.
- Mike van Riel - PHP developer and lead developer of phpDocumentor and Cilex projects.
- Nikita Popov - Co-author of PHP Internals book, open source contributor and creator of PHP Parser library.
- Nils Adermann - PHP developer and co-creator of Composer.
- Pablo Godel - PHP developer, open source contributor and co-organizer of Sunshine PHP.
- Paul Jones - PHP developer, creator of Aura PHP, open source contributor and author of Modernizing Legacy Applications in PHP.
- Phil Sturgeon - Founder of PyroCMS, open source contributor and author of Build APIs You Won't Hate book.
- Philip Brown - PHP developer and writer in Culttt website.
- Pádraic Brady - Creator of Mockery library and open source contributor to projects like Zend Framework.
- Rafael Dohms - PHP developer and evangelist, open source contributor and organizer of Amsterdam PHP.
- Rasmus Lerdorf - Creator of PHP and open source contributor.
- Rob Allen - PHP developer, Zend Framework contributor and co-author of Zend Framework in Action book.
- Robert C. Martin - One of the original authors of Agile Manifesto and author of the best selling books about software engineering like Clean Code and Agile Principles, Patterns, and Practices in C# books.
- Ryan Weaver - PHP developer, trainer and consultant at KnpLabs and member of Symfony core team.
- Sara Golemon - Open source contributor to projects like PHP runtime and HHVM and author of Extending and Embedding PHP book.
- Sebastian Bergmann - PHP developer, open source contributor and creator of PHPUnit test framework.
- Taylor Otwell - PHP developer and creator of Laravel Framework.
- Ward Cunningham - Programmer pioneer in Design Patterns and Extreme Programming.
- William Durand - PHP developer, open source contributor and creator of Geocoder library.
- Zeev Suraski - CTO and co-founder of Zend and PHP co-architect.
Some Questions
I found not related to PHP resources. Is this correct?
The project name is "Learning OOP in PHP". But, despite the name, object oriented programming is a concept related to a lot of other languages like C++, Java, C#, Python, Ruby and so on. That said, exists a lot of fantastic resources like videos and tutorials about object-oriented programming made in another programming languages and I considered reasonable include them here in this reference.
There are some tutorials that aren't in the correct section?
I tried to keep this reference as simple as possible and divided it in a few areas. But there are some problems! Feel free to make any suggestions and contribute.