دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش: 6
نویسندگان: Matt Zandstra
سری:
ISBN (شابک) : 1484267907, 9781484267905
ناشر: Apress
سال نشر: 2021
تعداد صفحات: 842
زبان: English
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 10 مگابایت
در صورت تبدیل فایل کتاب PHP 8 Objects, Patterns, and Practice: Mastering OO Enhancements, Design Patterns, and Essential Development Tools به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب اشیا ، الگوها و تمرین PHP 8: تسلط بر پیشرفتهای OO ، الگوهای طراحی و ابزارهای ضروری توسعه نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
Learn how to develop elegant and rock-solid systems using
PHP, aided by three key elements: object fundamentals,
design principles, and best practices. The 6th edition of
this popular book has been fully updated for PHP 8,
including attributes, constructor property promotion, new
argument and return pseudo-types, and more. It also covers
many features new since the last edition including typed
properties, the null coalescing operator, and void return
types. This book provides a solid grounding in PHP's
support for objects, it builds on this foundation to
instill core principles of software design and then covers
the tools and practices needed to develop, test, and deploy
robust code.
PHP 8 Objects, Patterns, and Practice begins by covering PHP's object-oriented features. It introduces key topics including class declarations, inheritance, and reflection. The next section is devoted to design patterns. It explains the principles that make patterns powerful. You’ll cover many of the classic design patterns including enterprise and database patterns. The last segment of the book covers the tools and practices that can help turn great code into a successful project. The section shows how to manage multiple developers and releases with git, and how to manage builds and dependencies with Composer. It also explores strategies for automated testing and continuous integration.
After reading and using this book, you will have mastered object-oriented enhancements, design patterns, and the essential development tools available for PHP 8.
What You Will Learn
Who This Book Is For
Anyone with at least a basic knowledge of PHP who wants to use its object-oriented features in their projects. It is also for PHP coders who want to learn about the practices and tools (version control, testing, continuous integration, etc) that can make projects safe, elegant and stable.
Table of Contents About the Author About the Technical Reviewer Acknowledgments Introduction Part I: Objects Chapter 1: PHP: Design and Management The Problem PHP and Other Languages About This Book Objects Patterns Practice What’s New in the Sixth Edition Summary Chapter 2: PHP and Objects The Accidental Success of PHP Objects In the Beginning: PHP/FI Syntactic Sugar: PHP 3 PHP 4 and the Quiet Revolution Change Embraced: PHP 5 PHP 7: Closing the Gap PHP 8: The Consolidation Continues Advocacy and Agnosticism: The Object Debate Summary Chapter 3: Object Basics Classes and Objects A First Class A First Object (or Two) Setting Properties in a Class Working with Methods Creating a Constructor Method Constructor Property Promotion Default Arguments and Named Arguments Arguments and Types Primitive Types Primitive Types: An Example Some Other Type-Checking Functions Type Declarations: Object Types Type Declarations: Primitive Types mixed Types Union Types Nullable Types Return Type Declarations Inheritance The Inheritance Problem Working with Inheritance Constructors and Inheritance Invoking an Overridden Method Public, Private, and Protected: Managing Access to Your Classes Accessor Methods Typed Properties The ShopProduct Classes Summary Chapter 4: Advanced Features Static Methods and Properties Constant Properties Abstract Classes Interfaces Traits A Problem for Traits to Solve Defining and Using a Trait Using More Than One Trait Combining Traits and Interfaces Managing Method Name Conflicts with insteadof Aliasing Overridden Trait Methods Using Static Methods in Traits Accessing Host Class Properties Defining Abstract Methods in Traits Changing Access Rights to Trait Methods Late Static Bindings: The static Keyword Handling Errors Exceptions Throwing an Exception Subclassing Exception Cleaning Up After try/catch Blocks with finally Final Classes and Methods The Internal Error Class Working with Interceptors Defining Destructor Methods Copying Objects with __clone() Defining String Values for Your Objects Callbacks, Anonymous Functions, and Closures Anonymous Classes Summary Chapter 5: Object Tools PHP and Packages PHP Packages and Namespaces Namespaces to the Rescue Using the File System to Simulate Packages Naming the PEAR Way Include Paths Autoload The Class and Object Functions Looking for Classes Learning About an Object or Class Getting a Fully Qualified String Reference to a Class Learning About Methods Learning About Properties Learning About Inheritance Method Invocation The Reflection API Getting Started Time to Roll Up Your Sleeves Examining a Class Examining Methods Examining Method Arguments Using the Reflection API Attributes Summary Chapter 6: Objects and Design Defining Code Design Object-Oriented and Procedural Programming Responsibility Cohesion Coupling Orthogonality Choosing Your Classes Polymorphism Encapsulation Forget How to Do It Four Signposts Code Duplication The Class Who Knew Too Much The Jack of All Trades Conditional Statements The UML Class Diagrams Representing Classes Attributes Operations Describing Inheritance and Implementation Associations Aggregation and Composition Describing Use Using Notes Sequence Diagrams Summary Part II: Patterns Chapter 7: What Are Design Patterns? Why Use Them? What Are Design Patterns? A Design Pattern Overview Name The Problem The Solution Consequences The Gang of Four Format Why Use Design Patterns? A Design Pattern Defines a Problem A Design Pattern Defines a Solution Design Patterns Are Language Independent Patterns Define a Vocabulary Patterns Are Tried and Tested Patterns Are Designed for Collaboration Design Patterns Promote Good Design Design Patterns Are Used by Popular Frameworks PHP and Design Patterns Summary Chapter 8: Some Pattern Principles The Pattern Revelation Composition and Inheritance The Problem Using Composition Decoupling The Problem Loosening Your Coupling Code to an Interface, Not to an Implementation The Concept That Varies Patternitis The Patterns Patterns for Generating Objects Patterns for Organizing Objects and Classes Task-Oriented Patterns Enterprise Patterns Database Patterns Summary Chapter 9: Generating Objects Problems and Solutions in Generating Objects The Singleton Pattern The Problem Implementation Consequences Factory Method Pattern The Problem Implementation Consequences Abstract Factory Pattern The Problem Implementation Consequences Prototype The Problem Implementation Pushing to the Edge: Service Locator Splendid Isolation: Dependency Injection The Problem Implementation Dependency Injection with Attributes Consequences Summary Chapter 10: Patterns for Flexible Object Programming Structuring Classes to Allow Flexible Objects The Composite Pattern The Problem Implementation Consequences Composite in Summary The Decorator Pattern The Problem Implementation Consequences The Facade Pattern The Problem Implementation Consequences Summary Chapter 11: Performing and Representing Tasks The Interpreter Pattern The Problem Implementation Interpreter Issues The Strategy Pattern The Problem Implementation The Observer Pattern Implementation The Visitor Pattern The Problem Implementation Visitor Issues The Command Pattern The Problem Implementation The Null Object Pattern The Problem Implementation Summary Chapter 12: Enterprise Patterns Architecture Overview The Patterns Applications and Layers Cheating Before We Start Registry The Problem Implementation Registry, Scope, and PHP Consequences The Presentation Layer Front Controller The Problem Implementation ApplicationHelper CommandResolver Request A Command Overview Consequences Application Controller The Problem Implementation The Front Controller Implementation Overview The Configuration File Parsing the Configuration File Managing the Component Data The Command Class A Concrete Command Consequences Page Controller The Problem Implementation Consequences Template View and View Helper The Problem Implementation Consequences The Business Logic Layer Transaction Script The Problem Implementation Consequences Domain Model The Problem Implementation Consequences Summary Chapter 13: Database Patterns The Data Layer Data Mapper The Problem Implementation Handling Multiple Rows Using a Generator in Place of the Iterator Interface Acquiring Collection Objects Consequences Identity Map The Problem Implementation Consequences Unit of Work The Problem Implementation Consequences Lazy Load The Problem Implementation Consequences Domain Object Factory The Problem Implementation Consequences The Identity Object The Problem Implementation Consequences The Selection Factory and Update Factory Patterns The Problem Implementation Consequences What’s Left of Data Mapper Now? Summary Part III: Practice Chapter 14: Good (and Bad) Practice Beyond Code Borrowing a Wheel Playing Nice Giving Your Code Wings Standards Vagrant Testing Continuous Integration Summary Chapter 15: PHP Standards Why Standards? What Are PHP Standards Recommendations? Why PSR in Particular? Who Are PSRs for? Coding with Style PSR-1 Basic Coding Standard Opening and Closing Tags Side Effects Naming More Rules and an Example PSR-12 Extended Coding Style Starting and Ending a PHP Document Starting and Ending a Class Working with Traits Declaring Properties and Constants Starting and Ending a Method Single-Line Declarations Multiline Declarations Return Types Lines and Indentation Calling Methods and Functions Flow of Control Checking and Fixing Your Code PSR-4 Autoloading The Rules That Matter to Us Summary Chapter 16: PHP Using and Creating Components with Composer What Is Composer? Installing Composer Installing a (Set of) Package(s) Installing a Package from the Command Line Versions require-dev Composer and Autoload Creating Your Own Package Adding Package Information Platform Packages Distribution Through Packagist Keeping It Private Summary Chapter 17: Version Control with Git Why Use Version Control? Getting Git Using an Online Git Repository Configuring a Git Server Creating the Remote Repository Preparing the Repository for Local Users Providing Access to Users Closing Down Shell Access for the git User Beginning a Project Cloning the Repository Updating and Committing Adding and Removing Files and Directories Adding a File Removing a File Adding a Directory Removing Directories Tagging a Release Branching a Project Summary Chapter 18: Testing with PHPUnit Functional Tests and Unit Tests Testing by Hand Introducing PHPUnit Creating a Test Case Assertion Methods Testing Exceptions Running Test Suites Constraints Mocks and Stubs Tests Succeed When They Fail Writing Web Tests Refactoring a Web Application for Testing Simple Web Testing Introducing Selenium Getting Selenium PHPUnit and Selenium Introducing php-webdriver Creating the Test Skeleton Connecting to Selenium Writing the Test A Note of Caution Summary Chapter 19: Automated Build with Phing What Is Phing? Getting and Installing Phing Composing the Build Document Targets Properties Conditionally Setting Property Values with the Condition Task Types FileSet PatternSet FilterChain Tasks Echo Copy Input Delete Summary Chapter 20: Vagrant The Problem A Little Setup Choosing and Installing a Vagrant Box Mounting Local Directories on the Vagrant Box Provisioning Setting Up the Web Server Setting Up MariaDB Configuring a Hostname Wrapping It Up Summary Chapter 21: Continuous Integration What Is Continuous Integration? Preparing a Project for CI CI and Version Control Phing Unit Tests Documentation Code Coverage Coding Standards Installing Jenkins Installing Jenkins Plug-ins Setting Up the Git Public Key Installing a Project Running the First Build Configuring the Reports Triggering Builds Test Failures Summary Chapter 22: Objects, Patterns, Practice Objects Choice Encapsulation and Delegation Decoupling Reusability Aesthetics Patterns What Patterns Buy Us Tried and Tested Patterns Suggest Other Patterns A Common Vocabulary Patterns Promote Design Patterns and Principles of Design Favor Composition over Inheritance Avoid Tight Coupling Code to an Interface, Not an Implementation Encapsulate the Concept That Varies Practice Testing Standards Version Control Automated Build Continuous Integration What I Missed Summary Appendix A: Bibliography Books Articles Sites Appendix B: A Simple Parser The Scanner The Parser Index