Description |
1 online resource (xxi, 335 pages) : illustrations |
|
text file |
|
PDF |
Series |
The expert's voice in open source |
|
Expert's voice in open source.
|
Bibliography |
Includes bibliographical references and index. |
Summary |
Many businesses and organizations depend on older high-value PHP software that risks abandonment because it is impossible to maintain. The reasons for this may be that the software is not well designed; there is only one developer (the one who created the system) who can develop it because he didn't use common design patterns and documentation; or the code is procedural, not object oriented. With this book, you'll learn to identify problem code and refactor it to create more effective applications using test-driven design. What you'll learn * What refactoring is and why you need to refactor co. |
Contents |
Cover -- Table of Contents -- About the Authors -- About the Technical Reviewer -- Acknowledgments -- Introduction -- Chapter 1 Introduction -- Lesson Learned -- Hidden Gems -- You DonT Know What YouVe Got Til Its Gone -- Call of Duty -- Chapter 2 Finding 8220;Bad Smells8221; in Code -- Why Code Can Smell -- Duplicated Code -- Long Method -- Large Class -- Long Parameter List -- Divergent Change -- Shotgun Surgery -- Feature Envy -- Data Clamps -- Primitive Obsession -- Switch Statements -- Lazy Class -- Speculative Generality -- Temporary Field -- Data Class -- Comments -- Procedural Code -- Chapter 3 Introduction to Refactoring -- The Concept: What Refactoring Is -- The Reason: Whats the Goal of Refactoring? -- Architecture and Structure, They Fade Away -- Reworking Chaos Into Well-Designed Code -- An Example, At Last -- Look Ma! No Comments! -- Once Is Better Than Twice -- Goliath Died in the End -- Chapter 4 Principles and Rules -- Why Should You Do Refactoring? -- Refactoring Improves the Design of Our Software -- Refactoring Makes Software Easier to Understand -- Refactoring Helps You Find Bugs -- Refactoring Increases Our Productivity -- When Should We Do Refactoring? -- The Rule of Three -- Refactoring When You Add Functionality -- Refactoring When You Need to Fix a Bug -- When You ShouldnT Do Refactoring -- Some Simple Rules -- Test Before Refactoring -- Small and Simple Changes -- Never Change Functionality -- Follow the Bad Smells -- Follow Refactoring Techniques Step-By-Step -- Summary -- Chapter 5 Test-First Development -- Building Value One-Way -- Chaos in a Cage -- Unit Tests -- Functional Tests -- You Don'T Know What YouVe Got Til Its Gone -- Trust Me: Communication -- Listen to What You Say, and Write It Down -- Pleasant Constraints -- Create Trust -- Test-Driven Development -- Summary -- Chapter 6 Refactoring Tools -- Php Ide -- Refactoring Activities -- Cross-Platform Open-Source Ide -- Unit Tests With Phpunit -- What Is It? -- Installation -- How to Write Unit Tests -- How to Run Tests -- How to Organize Our Tests -- Test Doubles -- Phpunit Conclusion -- Functional Test With Selenium -- What Is It? -- Installation -- How to Record and Run Functional Tests -- How to Organize Selenium Tests -- Automated Test Execution With Selenium Rc -- Selenium Conclusion -- The Best of Two Worlds -- Selenium Rc and Phpunit -- Selenium Functional Test With Phpunit -- Summary -- Chapter 7 Structuring Behavior -- Extract Method -- Motivation -- Mechanics -- Example: No Local Variables -- Example: Using Local Variables -- Example: Reassigning a Local Variable -- Inline Method -- Motivation -- Mechanics -- Example -- Inline Temp. |
Subject |
PHP (Computer program language)
|
|
Software refactoring.
|
|
Internet programming.
|
|
PHP (Langage de programmation) |
|
Logiciels -- Refactorisation. |
|
Programmation Internet. |
|
Internet programming |
|
PHP (Computer program language) |
|
Software refactoring |
Added Author |
Romei, Jacopo. Author.
|
|
Saray, Aaron. Reviewer.
|
Other Form: |
Print version: Trucchia, Francesco. Pro PHP refactoring. [Berkley, Calif.] : Apress, ©2010 9781430227274 (OCoLC)694641678 |
ISBN |
9781430227281 (electronic) |
|
1430227281 (electronic) |
|
(pbk.) |
Standard No. |
10.1007/978-1-4302-2728-1. doi |
|