Actions for Pro PHP refactoring
Pro PHP refactoring / Francesco Trucchia and Jacopo Romei ; technical reviewer: Aaron Saray
- Author
- Trucchia, Francesco
- Published
- [New York] : Apress, [2010]
- Copyright Date
- ©2010
- Physical Description
- 1 online resource (xxi, 335 pages) : illustrations
- Additional Creators
- Romei, Jacopo and Saray, Aaron
Access Online
- Series
- 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.
- 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.
- Subject(s)
- ISBN
- 9781430227281 (electronic)
1430227281 (electronic)
9781430227274 (pbk.)
1430227273 - Digital File Characteristics
- text file
PDF - Bibliography Note
- Includes bibliographical references and index.
View MARC record | catkey: 37420096