Cover image for Real-World Solutions for Developing High-Quality PHP Frameworks and Applications.
Real-World Solutions for Developing High-Quality PHP Frameworks and Applications.
Title:
Real-World Solutions for Developing High-Quality PHP Frameworks and Applications.
Author:
Bergmann, Sebastian.
ISBN:
9781118098226
Personal Author:
Edition:
1st ed.
Physical Description:
1 online resource (410 pages)
Contents:
Real-World Solutions for Developing High-Quality PHP Frameworks and Applications -- Contents -- Foreword -- Introduction -- Part I: Foundations -- Chapter 1: Software Quality -- External Quality -- Internal Quality -- Technical Debt -- Constructive Quality Assurance -- Clean Code -- Explicit and Minimal Dependencies -- Clear Responsibilities -- No Duplication -- Short Methods with Few Execution Branches -- Software Metrics -- Cyclomatic Complexity and npath Complexity -- Change Risk Anti-Patterns (CRAP) Index -- Non-Mockable Total Recursive Cyclomatic Complexity -- Global Mutable State -- Cohesion and Coupling -- Tools -- PHPUnit -- phploc -- PHP Copy-Paste-Detector (phpcpd) -- PHP Dead Code Detector (phpdcd) -- PHP_Depend (pdepend) -- PHP Mess Detector (phpmd) -- PHP_CodeSniffer (phpcs) -- bytekit-cli -- PHP_CodeBrowser (phpcb) -- CruiseControl and phpUnderControl -- Hudson -- Arbit -- Conclusion -- Chapter 2: Software Testing -- Black Box and White Box Tests -- How Many Tests Are Needed? -- System Tests -- Browser Testing -- Automated Tests -- Test Isolation -- Acceptance Tests -- Limits of System Tests -- Unit Tests -- Return Values -- Dependencies -- Side Effects -- Real-Life Example -- Analyzing the Code to Test -- Setting Up a Test Environment -- Avoid Global Dependencies -- Test Independently from Data Sources -- Testing Asynchronous Events -- Storing Changes in the Database -- Unpredictable Results -- Encapsulating Input Data -- Further Reflections -- Conclusion -- Part II: Best Practices -- Chapter 3: Typo3: The Agile Future of a Ponderous Project -- Introduction -- The History of TYPO3: Thirteen Years in Thirteen Paragraphs -- Daring to Start Over! -- Our Experience with Testing -- Policies and Techniques -- Bittersweet Elephant Pieces -- Test-Driven Development -- Tests as Documentation -- Continuous Integration -- Clean Code.

Refactoring -- Programming Guidelines -- Domain-Driven Design -- Course of Action in Development -- Developing New Code -- Extending and Modifying Code -- Optimizing Code -- Speed -- Readability -- Finding and Fixing Bugs -- Disposing of Old Code -- Test Recipes -- Inadvertently Functional Unit Test -- Access to the File System -- Constructors in Interfaces -- Testing Abstract Classes -- Testing Protected Methods -- Use of Callbacks -- Into the Future -- Chapter 4: Unit Testing Bad Practices -- Why Test Quality Matters -- Bad Practices and Test Smells -- Duplication in Test Code -- Assertion Roulette and Eager Test -- Fragile Test -- Obscure Test -- Problems with Global State -- Indirect Testing -- Obscure Test Names -- Lying Test -- Slow Test -- Conditional Logic in Tests -- Self-validating Tests -- Web-surfing Tests -- Mock Overkill -- Skip Epidemic -- Conclusion -- Chapter 5: Quality Assurance at Digg Inc. -- Problems We Are Facing -- Legacy Code Base -- How Do We Solve These Problems? -- Size Does Matter -- Team Size -- Project Size -- Code Size -- Unit Testing and You -- Choosing a Testing Framework -- Working with an Expert -- One Week in a Room -- Training Our Team -- Writing Testable Code -- Avoid Static Methods -- Dependency Injection -- Mock Objects -- Overview -- Database -- Loosely Coupled Dependencies -- Subject/Observer for Testing Class Internals -- Memcached -- Mocking a Service-Oriented Architecture -- Model -- Service Query -- Service Endpoint -- The Base Classes -- Digg's Quality Assurance Process -- Testing -- Planning the Testing Effort -- Tasks -- Automation -- Benefits -- Testing Early -- Testing Often -- Challenges -- Conclusion -- Part III: Servers and Services -- Chapter 6: Testing Service-Oriented APIs -- The Problems -- Solutions -- API Credentials -- API Limits -- Offline Testing of Service Protocols.

Offline Testing of Concrete Services -- Conclusion -- Chapter 7: Testing a WebDAV Server -- About the eZ WebDAV Component -- WebDAV -- Architecture -- Development Challenges -- Requirements Analysis -- TDD after RFC -- Testing a Server -- Automated Acceptance Tests with PHPUnit -- Capturing Test Trails -- Test Recipe -- Integration into PHPUnit -- A Custom Test Case -- The Acceptance Test Suite -- Acceptance Tests by Example -- Conclusion -- Part IV: Architecture -- Chapter 8: Testing symfony and symfony Projects -- Testing a Framework -- The symfony Release Management Process -- Long-term Support -- Code Coverage -- Tests versus Real Code -- Running the Test Suite -- Main Lessons Learned -- Never Use the Singleton Design Pattern in PHP -- Decouple Your Code with Dependency Injection -- Lower the Number of Dependencies between Objects with an Event Dispatcher -- Testing Web Applications -- Lowering the Barrier of Entry of Testing -- Unit Tests -- Easy to Install -- Easy to Learn -- Fun to Use -- Functional Tests -- The Browser Simulator -- The Fixtures -- The CSS3 Selectors -- Testing Forms -- Debugging -- Conclusion -- Chapter 9: Testing the ezcGraph Component -- Development Philosophy -- Graph Component -- Architecture -- Test Requirements -- Driver Mocking -- Mock the Driver -- Multiple Assertions -- Structs -- Expectation Generation -- Conclusion -- Testing Binary Data -- The Drivers -- Expectation Generation -- SVG -- XML Comparison -- Floating-point Problems -- Bitmap Creation -- Bitmap Comparison -- GD Version Differences -- Flash -- The Assertion -- Conclusion -- Chapter 10: Testing Database Interaction -- Introduction -- Reasons Not to Write Database Tests -- Why We Should Write Database Tests -- What We Should Test -- Writing Tests: Mocking Database Connections -- Writing Tests: PHPUnit Database Extension -- The Database Test Case Class.

Establishing the Test Database Connection -- Creating Data Sets -- XML Data Sets -- Flat XML Data Sets -- CSV Data Sets -- YAML Data Sets -- Database Data Sets -- Data Set Decorators -- Generating Data Sets -- Data Operations -- Creating Tests -- Testing the Loading of Data -- Testing the Modification of Data -- Using the Database Tester -- Applying Test-Driven Design to Database Testing -- Using Database Tests for Regression Testing -- Testing Problems with Data -- Testing Problems Revealed by Data -- Conclusion -- Part V: Q&A in the Large -- Chapter 11: Quality Assurance at studiVZ -- Introduction -- About studiVZ -- Acceptance Tests -- Acceptance Tests in Agile Environments -- Selenium -- The Selenium Extension of PHPUnit -- The Technical Setup of studiVZ -- Development Environment -- Test Environment -- Best Practices -- Sins of Our Youth -- Monolithic Tests -- Static Users -- Strategy Change -- Atomic Tests with Dynamic Test Data -- Robust Selenium Tests -- Test Scope Must Be Clear -- Common Functionality or Browser Compatibility as Well? -- Fix Tests Right Away! -- Stabilize Locators, and Use IDs -- Speed, the Sore Subject -- Recipes for Last-Minute Features -- Tests Are Software Too -- Capture and Replay versus Programming Tests -- The Team: A Good Mix -- We Need a DSL -- Internal DSL -- Testing_SeleniumDSL 1.0 -- Problem: Context Sensitivity -- Testing_SeleniumDSL 2.0 - A Draft -- State and Outlook on Version 2.0 -- Conclusion -- Chapter 12: Continuous Integration -- Introduction -- Continuous Integration -- Configuration -- Build Management and Automated Tests -- Version Management -- Continuous Integration -- Static Analysis -- Code Clones -- Refactoring -- Software Metrics -- Classic Metrics -- Object-Oriented Metrics -- RATS -- Installation -- Configuration -- Static Tests -- Programming Conventions -- Coding Guidelines.

Gradual Introduction into Legacy Projects -- Coding Standards in the Daily Work -- Syntax Analysis -- Dynamic Tests -- Reporting -- Notification in the Case of Errors -- Statistics -- PHP_CodeBrowser -- Deliverables -- Operations -- Advanced Topics -- Continuous Deployment -- Using a Reverse Proxy -- Continuous Integration and Agile Paradigms -- Conclusion -- Chapter 13: swoodoo: A True Agile Story -- Introduction -- Evolution: Only the Strong Survive -- How We Reached the eXtreme Side -- And While We Are Working... -- The Art of Evolution -- Lack of Experience -- The Java-developer-coding-in-PHP Phenomenon -- The Nobody-but-me-understands-my-code Developer -- Conclusion -- Part VI: Non-Functional Aspects -- Chapter 14: Usability -- Anything Goes, But What Is the Price? -- Design Aspects -- Accessibility -- Readability -- Labels for Form Elements -- Navigating by Keyboard -- Effective Contrast -- Logo Links to Home Page -- Alternative Texts for Images -- Background Image in Background Color -- Usable Print Version -- Visible Links -- Good Bookmarks -- No Frames -- Scalable Fonts -- Technical Aspects -- Performance -- Semantic Code -- Fewer Requests -- CSS Sprites -- JavaScript on Bottom, CSS on Top -- Link CSS Instead of Importing -- JavaScript -- User Guidance -- The "Fold" Myth -- Feedback on Interaction -- Navigation -- Pop-ups and Other Annoyances -- Habits and Expectations -- Fault Tolerance and Feedback -- Testing Usability -- Conclusion -- Chapter 15: Performance Testing -- Introduction -- Tools -- Environmental Considerations -- Load Testing -- Apache Bench -- Pylot -- Other Load Testing Tools -- Profiling -- Callgrind -- KCachegrind -- APD -- Xdebug -- XHProf -- OProfile -- System Metrics -- strace -- Sysstat -- Custom Instrumentation -- Common Pitfalls -- Development versus Production Environments -- CPU Time -- Micro-Optimizations.

PHP as the Glue.
Abstract:
Learn to develop high-quality applications and frameworks in PHP Packed with in-depth information and step-by-step guidance, this book escorts you through the process of creating, maintaining and extending sustainable software of high quality with PHP. World-renowned PHP experts present real-world case studies for developing high-quality applications and frameworks in PHP that can easily be adapted to changing business requirements. . They offer different approaches to solving  typical development and quality assurance problems that every developer needs to know and master. Details the process for creating high-quality PHP frameworks and applications that can easily be adapted to changing business requirements Covers the planning, execution, and automation of tests for the different layers and tiers of a Web application Demonstrates how to establish a successful development process Shares real-world case studies from well-known companies and their PHP experts With this book, you'll learn to develop high-quality PHP frameworks and applications that can easily be maintained with reasonable cost and effort.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Added Author:
Electronic Access:
Click to View
Holds: Copies: