Real-world solutions for developing high-quality PHP frameworks and applications
Contributors:
Priebsch, Stefan., author.
4289343
Access Online
Summary/Review:
Presents information and a variety of case studies focusing on creating sustainable applications and frameworks using PHP.
Summary/Review:
Presents information and a variety of case studies focusing on creating sustainable applications and frameworks using PHP.
Show/hide reviews and other info
Provided by Syndetics | Terms of Use
-
Subjects
-
Details
Full Bibliographic Record Publication information: Indianapolis, Ind. : Wiley Pub., ©2011. ISBN: 0470872497 ISBN: 1118098226 ISBN: 1283397862 ISBN: 6613397865 ISBN: 9780470872499 ISBN: 9781118098226 ISBN: 9781283397865 ISBN: 9786613397867 Language: English Language Note: English. Record ID: 4289343 Format: eBook Physical description: 1 online resource (xxix, 378 pages) : illustrations Date acquired: September 30, 2022 More creator details: Sebastian Bergmann, Stefan Priebsch. Series statement: Wrox guides Series title: Wrox guides. Contents note: Access to the File System -- Constructors in Interfaces -- Testing Abstract Classes -- Testing Protected Methods -- Use of Callbacks -- Into the Future -- ch. 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 -- ch. 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. Contents note: 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 -- ch. 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 -- Priority of Optimization -- Conclusion -- ch. 16 Security -- What Is Security? -- Secure by Design -- Operations -- Physical Access. Contents note: 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 -- ch. 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. Contents note: Machine generated contents note: ch. 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 -- ch. 2 Software Testing -- Black Box and White Box Tests -- How Many Tests Are Needed? -- System Tests -- Browser Testing -- Automated Tests -- Test Isolation -- Acceptance Tests. Contents note: 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 -- ch. 6 Testing Service-Oriented APIS -- The Problems -- Solutions -- API Credentials -- API Limits -- Offline Testing of Service Protocols -- Offline Testing of Concrete Services -- Conclusion -- ch. 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 -- ch. 8 Testing Symfony And Symfony Projects -- Testing a Framework -- The symfony Release Management Process -- Long-term Support -- Code Coverage -- Tests versus Real Code. Contents note: 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 -- ch. 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 -- ch. 10 Testing Database Interaction -- Introduction -- Reasons Not to Write Database Tests. Contents note: Software Development -- No Security by Obscurity -- Separation of Concerns -- A Matter of Rights -- Error Handling -- Basic Settings -- What Does Security Cost? -- The Most Common Problems -- A10. Unvalidated Redirects and Forwards -- A9. Insufficient Transport Layer Protection -- A8. Failure to Restrict URL Access -- A7. Insecure Cryptographic Storage -- A6. Security Misconfiguration -- A5. Cross Site Request Forgery (CSRF/XSRF) -- A4. Insecure Direct Object References -- A3. Broken Authentication and Session Management -- A2. Cross-Site Scripting (XSS) -- A1. Injection -- Conclusion -- ch. 17 Conclusion. Contents note: 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 -- ch. 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. Contents note: 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 -- ch. 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 -- ch. 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. Contents note: 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 -- ch. 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. Contributor: Priebsch, Stefan., author. Contributor: O'Reilly for Higher Education (Firm), distributor. Electronic access: Access online Access URL: https://ezproxy.torontopubliclibrary.ca/login?url=https://learning.oreilly.com/library/view/~/9780470872499/?ar