更新时间:2021-07-14 09:51:14
封面
版权页
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Why "Good PHP Developer" Isnt an Oxymoron
Coding style - the PSR standards
Revising object-oriented programming
Setting up the environment with Composer
The Gang of Four (GoF)
Summary
Chapter 2. Anti-Patterns
Why anti-patterns matter
Not invented here syndrome
God objects
Environment variables in PHP source
Singletons (and why you should be using dependency injection)
Database as IPC
Auto-increment database IDs
Cronjob imitating service
Software in place of architecture
Interface Bloat
Cart before the horse
Separation of development and operations
Excessive separation of development responsibilities
Error suppression operator
Blind faith
Sequential coupling
The big rewrite
Tester-Driven Development
Bloated optimization
Uneducated manager syndrome
Wrong rocky foundations
Long methods
Magic numbers
Chapter 3. Creational Design Patterns
Software design process
Simple Factory
Factory Method
Abstract Factory pattern
Lazy initialization
Builder pattern
Prototype pattern
Chapter 4. Structural Design Patterns
Agile software architecture
Decorator
Adapter
FlyWeight
Composite
Bridge
Proxy pattern
Facade
Chapter 5. Behavioral Design Patterns
Personality traits for passionate programmers
Observer pattern (SplObserver/SplSubject)
Iterators
Generators
Template Method design pattern
Chain of Responsibility
Strategy design pattern
Specification design pattern
Scheduled Task pattern
Chapter 6. Architectural Patterns
Model-View-Controller (MVC)
Service-oriented architecture
Microservices
Asynchronous queueing
Chapter 7. Refactoring
What is refactoring?
Test test and test again
Code smells
What do I tell my manager?
Chapter 8. How to Write Better Code
Nature of a HTTP request
RESTful API design
When in doubt – KISS
Software development life cycle
On Scrum and real Agility
You need to sack people sometimes
Lean project management
YAGNI and defering decisions
Monitoring
Tests fight legacy
Behavior-Driven Development