PHP Objects, Patterns and Practice, 4th Edition, Matt Zandstra.pdf
(
8077 KB
)
Pobierz
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Contents at a Glance
About the Author ��������������������������������������������������������������������������������������������������������������
�
xxi
About the Technical Reviewer ����������������������������������������������������������������������������������������
�
xxiii
Acknowledgments �����������������������������������������������������������������������������������������������������������
�
xxv
Introduction �������������������������������������������������������������������������������������������������������������������
�
xxvii
■
Chapter 1: PHP: Design and Management
������������������������������������������������������������������������
�
1
■
Chapter 2: Objects
�����������������������������������������������������������������������������������������������������������
�
�7
■
Chapter 3: Object Basics
�����������������������������������������������������������������������������������������������
��
11
■
Chapter 4: Advanced Features
���������������������������������������������������������������������������������������
�
37
■
Chapter 5: Object Tools
��������������������������������������������������������������������������������������������������
��
81
■
Chapter 6: Objects and Design
�������������������������������������������������������������������������������������
�
111
■
Chapter 7: What Are Design Patterns? Why Use Them?
����������������������������������������������
��
131
■
Chapter 8: Some Pattern Principles
�����������������������������������������������������������������������������
�
139
■
Chapter 9: Generating Objects
�������������������������������������������������������������������������������������
��
153
■
Chapter 10: Patterns for Flexible Object Programming
������������������������������������������������
�
175
■
Chapter 11: Performing and Representing Tasks
���������������������������������������������������������
�
195
■
Chapter 12: Enterprise Patterns
�����������������������������������������������������������������������������������
�
227
■
Chapter 13: Database Patterns
�������������������������������������������������������������������������������������
�
277
■
Chapter 14: Good (and Bad) Practice
���������������������������������������������������������������������������
�
321
■
Chapter 15: An Introduction to PEAR and Pyrus
�����������������������������������������������������������
�
327
■
Chapter 16: Generating Documentation with phpDocumentor
�������������������������������������
�
351
v
■
Contents at a GlanCe
■
Chapter 17: Version Control with Git
���������������������������������������������������������������������������
��
365
■
Chapter 18: Testing with PHPUnit
��������������������������������������������������������������������������������
��
383
■
Chapter 19: Automated Build with Phing
���������������������������������������������������������������������
�
409
■
Chapter 20: Continuous Integration
�����������������������������������������������������������������������������
��
431
■
Chapter 21: Objects, Patterns, Practice
������������������������������������������������������������������������
�
457
■
Appendix A: Bibliography
���������������������������������������������������������������������������������������������
�
465
■
Appendix B: A Simple Parser
���������������������������������������������������������������������������������������
��
467
Index��������������������������������������������������������������������������������������������������������������������������������
�
489
vi
Introduction
When I irst conceived of this book, object-oriented design in PHP was an esoteric topic. he intervening years
have not only seen the inexorable rise of PHP as an object-oriented language, but also the march of the framework.
Frameworks are incredibly useful, of course. hey manage the guts and the glue of many (perhaps, these days, most)
Web applications. What’s more, they often exemplify precisely the principles of design that this book explores.
here is, though, a danger for developers here, as there is in all useful APIs. his is the fear that one might ind
oneself relegated to
userland
, forced to wait for remote gurus to ix bugs or add features at their whim. It’s a short
step from this standpoint to a kind of exile in which one is left regarding the innards of a framework as advanced
magic, and one’s own work as not much more than a minor adornment stuck up on top of a mighty unknowable
infrastructure.
Although I’m an inveterate reinventor of wheels, the thrust of my argument is not that we should all throw away
our frameworks and build MVC applications from scratch (at least not always). It is rather that, as developers, we
should understand the problems that frameworks solve, and the strategies they use to solve them. We should be able
to evaluate frameworks not only functionally but in terms of the design decisions their creators have made, and to
judge the quality of their implementations. And yes, when the conditions are right, we should go ahead and build our
own spare and focused applications, and, over time, compile our own libraries of reusable code.
I hope this book goes some way toward helping PHP developers maintain design-oriented insight into their
platforms and libraries, and provides some of the conceptual tools needed when it’s time to go it alone.
I recently took a year or so out to return to school. his is something I recommend for all sorts of reasons. One
beneit is the new perspective you gain afterwards when you revisit a once-familiar world. I came back to consulting
and found that most of my old clients and contacts had taken the plunge and migrated to Git (I follow suit in this
edition). And everyone, but everyone, was calling their development methodology
agile.
However, of my irst four new
clients, three asked me to help evaluate hastily-built and inlexible codebases. Each project required the retroitting
of unit tests, the creation of basic documentation, and the design of automated build mechanisms before refactoring
could safely commence. I found myself drawing heavily on the tools and practices I discuss in the last section of
this book. I very much hope you ind them as useful and powerful as I do, and they help you to create robust and
lexible systems.
xxvii
Plik z chomika:
masterkom
Inne pliki z tego folderu:
Pro PHP Application Performance.pdf
(11188 KB)
Pro PHP MVC.pdf
(5026 KB)
PHP Objects, Patterns and Practice, 4th Edition, Matt Zandstra.pdf
(8077 KB)
PHP Objects, Patterns and Practice, 3rd Edition, Matt Zandstra.pdf
(9290 KB)
Włodzimierz Gajda - PHP, MySQL i MVC. Tworzenie witryn WWW opartych na bazie danych.pdf
(51147 KB)
Inne foldery tego chomika:
# Informatyka
• Zbiór książek o INFORMATYCE
[C][C++]
Apache server
BackTrack , WiFi Zone , WiFi Fu
Zgłoś jeśli
naruszono regulamin