Index
A
- Active Record
- about / Domain logic patterns
- autoloader
- coding / Add Autoloader Code
- creating, as global function / As a Global Function
- creating, as closure / As a Closure
- creating, as static and instance method / As a Static or Instance method
- prioritizing / Autoloader Priority
- performance implications / What are the Performance Implications Of Autoloading?
- Autoloader include Call
B
- base Gateway class
- business logic
- versus presentation logic / Embedded presentation logic
C
- CakePHP
- reference link / Framework-based Legacy Applications
- candidate include calls
- files, picking / How should we pick files for candidate include calls?
- characterization test
- about / Test suite
- characterization tests
- class
- inline definition / What if a Class or Function is defined inline?
- class-to-file mapping
- examples / How Do Class Names Map To File Names?
- classes
- directory location, selecting / A Single Location for Classes
- autoloader, coding / Add Autoloader Code
- autoloader, creating as global function / As a Global Function
- autoloader, creating as closure / As a Closure
- autoloader, creating as static and instance method / As a Static or Instance method
- aliasing, with use statement / Convert instantiations to use parameters
- testing, difficulties / What about hard-to-test classes?
- class files
- consolidating / Consolidate Class Files
- candidate include, searching / Find a candidate include
- moving / Move the class file
- related include calls, removing / Remove the related include calls
- codebase, spot checking / Spot check the codebase
- code, committing / Commit, Push, Notify QA
- code, pushing / Commit, Push, Notify QA
- QA team, notifying / Commit, Push, Notify QA
- single class, converting from include to autoloading / Do ... While
- functions, consolidating into / Consolidate functions into class files
- code coverage
- about / What about code coverage?
- reference link / What about code coverage?
- complex Query strings
- complex result structures
- constructor parameters
- global properties, converting to / Convert global properties to constructor parameters
- container service
- creating / Create a Container Service
- URL path, routing / Route the URL Path to the Container Service
- cookies
- about / What about Headers and Cookies?
- coupled paths
- about / Coupled Paths
- decoupling / Did we really Decouple the Paths?
- cross-site scripting (XSS)
- about / Add Proper Escaping
- reference / Add Proper Escaping
- custom autoloader
D
- Database class
- definition file
- logic, executing / What if a definition file also executes logic?
- similar class names / What if two classes have the same name?
- DELETE statement
- dependency injection
- issues / Embedded instantiation
- replacement process / The replacement process
- extra code / Isn't this a lot of code?
- automating / Can we automate all these Injections?
- dependency injection container
- about / What is a Dependency Injection Container?
- reference link / What is a Dependency Injection Container?
- adding / Adding a DI Container
- include file, adding / Add a DI Container Include File
- router service, adding / Add a Router Service
- front controller, modifying / Modify the Front Controller
- page scripts, extracting to services / Extract Page Scripts to Services
- domain logic
- print / Are printing and echoing part of Domain Logic?
- echo / Are printing and echoing part of Domain Logic?
- in Gateway classes / What about Domain Logic in Gateway classes?
- in non-domain classes / What about Domain logic embedded in Non-Domain classes?
- domain logic patterns
- about / Domain logic patterns
- transaction script / Domain logic patterns
- domain model / Domain logic patterns
- table module / Domain logic patterns
- service layer / Domain logic patterns
- extracting / The Extraction Process
- Gateway classes, searching / Search for uses of Gateway
- relevant domain logic, discover / Discover and Extract Relevant Domain Logic
- relevant domain logic, extracting / Discover and Extract Relevant Domain Logic
- extraction, example / Example Extraction
- code, checking / Spot check the remaining original code
- extracted transactions, testing / Write tests for the extracted transactions
- checking / Spot check again, Commit, Push, Notify QA
- committing / Spot check again, Commit, Push, Notify QA
- Gateway calls, testing / Do ... While
E
- editor/IDE
- about / Editor/IDE
- embedded action logic
- about / Embedded action logic
- extraction process / The Extraction Process
- searching for embedded action logic / Search for Embedded Action Logic
- page script, rearraning / Rearrange the Page Script and Spot Check
- spot check, rearraning / Rearrange the Page Script and Spot Check
- code blocks, identifying / Identify Code Blocks
- code, moving to related block / Move Code to Its Related Block
- rearranged code, spot checking / Spot Check the Rearranged Code
- Controller class, extracting / Extract a Controller Class
- class name, picking / Pick a Class Name
- Skeleton class file, creating / Create a Skeleton Class File
- action logic, moving / Move the Action Logic and Spot Check
- Controller, converting to dependency injection / Convert Controller to Dependency Injection and Spot Check
- Controller test, writing / Write a Controller Test
- code, commiting / Commit, Push, Notify QA
- tests, pushig to repository / Commit, Push, Notify QA
- notify QA / Commit, Push, Notify QA
- Do ... While / Do ... While
- parameters, passing to Controller method / Can we pass parameters to the Controller method?
- multiple actions, performing with Controller / Can a Controller have Multiple actions?
- include calls, in controller block / What If the Controller contains include Calls?
- embedded domain logic
- about / Embedded Domain Logic
- embedded include calls
- about / Embedded include Calls
- embedded instantiation
- about / Embedded instantiation
- embedded presentation logic
- about / Embedded presentation logic
- extraction process / The Extraction process
- searching for / Search for Embedded presentation logic
- view files tests, writing / Write View File Tests
- template system / What if we already have a Template system?
- streaming content / What about Streaming Content?
- presentation variables / What if we have lots of Presentation variables?
- class methods / What about class methods that generate output?
- business logic / What about Business Logic Mixed into the presentation?
- reviewing / Review and next steps
- embedded SQL statements
- about / Embedded SQL Statements
- extraction process / The extraction process
- SQL statements, searching / Search for SQL statements
- Gateway class method / An initial Gateway class method
- exceptions
- extraction process
- about / The Extraction process
- searching for embedded presentation logic / Search for Embedded presentation logic
- page script, rearranging / Rearrange the Page script and Spot Check
- spot check, rearranging / Rearrange the Page script and Spot Check
F
- factory
- collections, creating / Should a factory create collections?
- Factory object
- about / Embedded instantiation
- file structure
- about / File Structure
- framework
- legacy application, converting / Conversion to Framework
- front controller
- modifying / Modify the Front Controller
- function
- inline definition / What if a Class or Function is defined inline?
- function file conversion, to class file
- about / Convert the function file to a class file
- function calls, changing to static method calls / Change function calls to static method calls
- static method calls, spotchecking / Spot check the static method calls
- class file, moving / Move the class file
- functions, consolidating into class files
- about / Consolidate functions into class files
- candidate include, searching / Find a candidate include
- function file, converting to class file / Convert the function file to a class file
- single class file, converting from include to autoloading / Do ... While
G
- $GLOBALS
- about / What about $GLOBALS?
- Gateway class
- SQL statements, extracting / Move SQL to a Gateway class
- Gateway classes
- domain logic / What about Domain Logic in Gateway classes?
- Gateway class method
- about / An initial Gateway class method
- SQL Injection, defeating / Defeating SQL Injection
- test, writing / Write a test
- code, replacing / Replace the original code
- testing / Test, Commit, Push, Notify QA
- pushing / Test, Commit, Push, Notify QA
- committing / Test, Commit, Push, Notify QA
- SQL statements, searching / Do ... While
- global dependencies
- creating / Global Dependencies
- replacement process / The replacement process
- global variable, searching / Find a global variable
- global variable, converting to properties / Convert global variables to properties
- testing / Spot check the class
- global properties, converting to constructor parameters / Convert global properties to constructor parameters
- checking / Spot check, Commit, Push, Notify QA
- QA, notifying / Spot check, Commit, Push, Notify QA
- classes, converting to use dependency injection / Do ... While
- global properties
- converting, to constructor parameters / Convert global properties to constructor parameters
- instantiations, converting / Convert instantiations to use parameters
- global variable
- searching / Find a global variable
- converting, to properties / Convert global variables to properties
H
- headers
- about / What about Headers and Cookies?
I
- include
- multiple class, defining / What if an include defines more than one class?
- include calls
- originating, in non-class files / What about include calls originating in non-class files?
- include calls, replacement process
- about / The Replacement process
- include calls, searching / Search for include Calls
- single include call, replacing / Replacing a Single include Call
- multiple include calls, replacing / Replacing Multiple include Calls
- include file, copying to class method / Copy include file to Class Method
- original include call, replacing / Replace the original include Call
- coupled variables, discovering through testing / Discover coupled variables through testing
- other include calls, replacing / Replace other include Calls and Test
- test, replacing / Replace other include Calls and Test
- include file, deleting / Delete the include file and test
- test, deleting / Delete the include file and test
- test, writing / Write a test and refactor
- code, refactoring / Write a test and refactor
- Dependency Injection, converting / Convert to Dependency Injection and test
- committing / Commit, Push, Notify QA
- pushing / Commit, Push, Notify QA
- include calls, replacing / Do ... While
- include files
- logic, receiving in class / Common QuestionsCan one class receive logic from many include files?
- inconsistent naming
- discovering / What if we used inconsistent naming?
- INSERT statement
- instance methods
- using, instead of static methods / For functions, can we use instance methods instead of static methods?
- process, automating / Can we automate this process?
- instantiation calls
- modifying / Change instantiation calls
- checking / Spot Check, Commit, Push, Notify QA
- new keyword, searching / Do ... While
- intermediary dependencies
- intermingled resources
- about / Intermingled resources
L
- legacy application
- opportunities, for improvement / Opportunities for improvement
- converting, to framework / Conversion to Framework
- legacy applications, prerequisites
- revision control / Revision control
- PHP 5.0 / PHP version
- editor/IDE / Editor/IDE
- style guide / Style Guide
- test suite / Test suite
- legacy frameworks
- about / Legacy Frameworks
- framework-based legacy applications / Framework-based Legacy Applications
- refactoring to / Refactoring to a Framework
M
- multiple queries
- MysqlDatabase class
N
- N+1 problem
- new keyword
- non-domain classes
- domain logic / What about Domain logic embedded in Non-Domain classes?
- non-Gateway classes
O
- one-class-per-file rule / What if the one-class-per-file rule is disagreeable?
P
- page scripts
- about / Page Scripts
- container service, creating / Create a Container Service
- URL path, routing to container service / Route the URL Path to the Container Service
- spot checking / Spot Check and Commit
- comitting / Spot Check and Commit
- conversion / Do ... While
- committing / Remove pages/, Commit, Push, Notify QA
- removing / Remove pages/, Commit, Push, Notify QA
- pushing / Remove pages/, Commit, Push, Notify QA
- QA, notifying / Remove pages/, Commit, Push, Notify QA
- include files, removing / What if there are includes In the Page Script?
- Patterns of Enterprise Application Architecture (PoEAA)
- about / Domain logic patterns
- PHP
- reference link, for testing / Setting up a test suite
- PHP 5.0
- about / PHP version
- PHP 5.3
- updating / What if we cannot update to PHP 5.3?
- PHP application
- about / The typical PHP application
- file structure / File Structure
- page scripts / Page Scripts
- rewriting / Rewrite or Refactor?
- refactoring / Rewrite or Refactor?
- rewrites, pros and cons / The Pros and Cons of Rewriting
- rewrites, limitations / Why Don't Rewrites Work?
- PHPUnit
- installing / Install PHPUnit
- presentation, extracting to view file and spot check
- about / Extract Presentation to View file and Spot Check
- views/ Directory, creating / Create a views/ Directory
- view file name, picking / Pick a View File name
- presentation block, moving to view file / Move Presentation Block to View file
- proper escaping, adding / Add Proper Escaping
- presentation logic
- versus business logic / Embedded presentation logic
- private methods
- protected methods
- PSR-0
- about / PSR-0
- public resources, separation process
- about / The separation process
- operations personnel, coordinating with / Coordinate with operations personnel
- document root directory, creating / Create a document root directory
- server, reconfiguring / Reconfigure the server
- public resources, extracting / Move public resources
- committing / Commit, push, coordinate
- coordinating / Commit, push, coordinate
- pushing / Commit, push, coordinate
- importance / Is This Really Necessary?
R
- repeated domain logic
- repeated logic
- in page scripts / Repeated logic
- removing / The Removal Process
- front controller, modifying / Modify the Front controller
- logic, removing from page scripts / Remove Logic from Page Scripts
- spot checking / Spot Check, Commit, Push, Notify QA
- committing / Spot Check, Commit, Push, Notify QA
- pushing / Spot Check, Commit, Push, Notify QA
- QA, notifying / Spot Check, Commit, Push, Notify QA
- repetitive SQL strings
- replacement process, dependency injection
- new keyword, searching / Find a new keyword
- one-time creation, extracting / Extract One-Time creation to dependency injection
- repeated creation, extracting to factory / Extract repeated creation to factory
- Response object
- need for / Embedded presentation logic
- revision control
- about / Revision control
- rewrites, limitations
- context-switching problem / The Context-switching problem
- knowledge problem / The Knowledge problem
- schedule problem / The Schedule Problem
- iterative refactoring / Iterative Refactoring
- router service
- adding / Add a Router Service
- size, reducing / Can we reduce the size of the router service?
- Ruby on Rails
- about / Domain logic patterns
S
- services
- page scripts, extracting / Extract Page Scripts to Services
- refining / How can we refine our service definitions?
- services.php file
- size, reducing / Can we reduce the size of the services.php file?
- setup work
- inconsistency / What if the Setup Work Is Inconsistent?
- SPL classes
- SQL Injection
- about / An initial Gateway class method
- SQL statements
- searching / Search for SQL statements
- extracting, to Gateway class / Move SQL to a Gateway class
- namespace, determining / Namespace and Class names
- class names, determining / Namespace and Class names
- method names, selecting / Method names
- SQL transactions
- static class method
- global variable, using / What if we find a global in a static method?
- instantiations, converting / Is there an alternative conversion process?
- style guide
- for codebase / Style Guide
- superglobals
- about / What about superglobals?
T
- tests
- writing / Fighting test resistance, The way of Testivus
- writing, for application classes / Pick a class to test
- passing / Do ... While
- pushing / Do ... While
- committing / Do ... While
- importance / Come On, Really, Can We Do This Later?
- modifying / Can we change a test after we write it?
- test suite
- selecting / Test suite
- setting up / Setting up a test suite
- PHPUnit, installing / Install PHPUnit
- tests/ directory, creating / Create a tests/ directory
- test case, writing / Write a test case
- TextMate / The Pros and Cons of Rewriting
- third-party libraries
- about / What about third-party libraries?
- system-wide libraries / What about system-wide libraries?
- testing / Do we need to test Third-party libraries?
- third-party libraries;about / What about third-party libraries?
- transactions
- approaches / Can a transaction be a class instead of a Method?
U
- UPDATE statement
- URL paths, decoupling process
- about / The Decoupling Process
- operations, coordinating with / Coordinate with Operations
- front controller, creating / Add a Front Controller
- pages/ directory, creating / Create a pages/ Directory
- server, reconfiguring / Reconfigure the Server
- spot checking / Spot check
- page scripts, moving / Move Page scripts
- committing / Commit, Push, Coordinate
- pushing / Commit, Push, Coordinate
- coordinating / Commit, Push, Coordinate
V
- variables
- with class names / What about class names in variables?
- retaining / Add a DI Container Include File
- view file tests
- writing / Write View File Tests, Writing a View File Test
- tests/views/ directory / The tests/views/ directory
- correctness of content, asserting / Asserting Correctness Of Content
- code, pushing to repository / Commit, Push, Notify QA
- code, commiting / Commit, Push, Notify QA
- notify QA / Commit, Push, Notify QA
- Do ... While / Do ... While
Z
- Zend\Escaper
- reference / Add Proper Escaping