Object-oriented PHP concepts, techniques, and code. - Includes index
معرفی کتاب «Object-oriented PHP concepts, techniques, and code. - Includes index» نوشتهٔ Peter Lavin، منتشرشده توسط نشر No Starch Press در سال 2006. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Object-oriented PHP concepts, techniques, and code. - Includes index» در دستهٔ بدون دستهبندی قرار دارد.
I have used PHP procedurally for several years, and had some inkling of OOP, but no formal introduction yet. I was happy with the three introductory chapters laying the groundwork for the body of the book. I was also able to implement the classes developed as examples in this book with some added/modified methods. The author is a highly talented programmer and gives the reader an insight into his use and development of meaningful classes. The back cover presents this effort as an introduction to Object Oriented Programming, and fair enough, the concepts are clear. The summary also presents this as an 'easy to follow' guide to OO PHP. Not. It is one thing to sit in your recliner and read text and say, "Uh huh. Got it" and quite another to actually understand how to build the examples and implement them so that your time is not wasted. It is possible to use this book to learn OO PHP, but only with great willingness to search far and wide for supporting documentation to items mysteriously introduced without explanation. I seriously doubt any reviewer that rated this effort highly, stepped through the code line by line, chapter by chapter, entering their own programming notes into their code and understanding each step. For me, the time required to research all of the items introduced in each chapter to the point of knowing the 'why' of each step was excessive. A specific example of an item being introduced without proper explanation is the introduction of the 'Iterator' interface in Chapter 10. There is no mention that interfaces are part of the Standard PHP Library (SPL), or that the Iterator functions are listed there. At least, in the context of the chapter, that is how it read to me. No explanation of how we know the behaviors or properties. I found myself digging into PHP's C/C++ source code to understand subjects glossed over in the text of the book. Further reading at the end of Ch. 11, almost two chapters later, then referenced the fact that Iterator was a built-in function and where to find the info. A little deeper digging reveals that in fact, reference was made in one of the introductory chapters, ch. 3, p.14. The 'we won't deal with the details here, but the download files have the proper code' or the information is somewhere else does not seem reader friendly. This is the default method in this book, making it frustrating to extract the knowledge in a meaningful, time effective way. I guess I have become spoiled to the books written by author Larry Ullman and hold other instructional texts to that standard. If Ullman introduces a concept, he covers the details and has every line of code actually IN the text of the book. The process of actually including the code, not just highlight snippets, evidently causes a more thorough thought process on the part of the author and results in clear, easily understood explanations rather than opaque references to behaviors and definitions that the reader must seek out. It is great accomplishment just to write a book, and I am grateful to all authors and this one in particular for sharing his knowledge. The style of reading required, i.e. reading pseudo 'back to front' in various sections was somewhat disconcerting. My view is that if you already know Object Oriented Programming and probably already know PHP OOP and have a thorough knowledge of the SPL, this is a great resource. I believe if this book were re-packaged so that expectations for the content were different, it would be a 5-star book. The knowledge gained from stepping through is useful and lasting, and expensive time-wise. COVER......Page 1 BRIEF CONTENTS......Page 5 CONTENTS IN DETAIL......Page 7 ACKNOWLEDGMENTS......Page 13 INTRODUCTION......Page 15 Requirements......Page 16 Overview of Contents......Page 17 Companion Website......Page 19 Resources......Page 20 WHAT A TANGLED WEB WE WEAVE......Page 21 Do We Really Need Objects?......Page 22 The PHP Culture......Page 24 BASICS OF OBJECT-ORIENTED PROGRAMMING......Page 25 Class......Page 26 Object Reuse and Inheritance......Page 27 Where to Go from Here......Page 29 OBJECT-ORIENTED FEATURES NEW TO PHP 5......Page 31 Built-in Classes......Page 32 Backward Compatibility......Page 34 Where to Go from Here......Page 35 SHOW A LITTLE CLASS......Page 37 Design......Page 38 Not the Da Vinci Code......Page 39 Creating an Instance......Page 41 But Will It Fly?......Page 43 MOD UR CLASS......Page 45 Upgrading to PHP 5......Page 46 Modifying Your Class......Page 49 Summary of Changes......Page 53 THE THUMBNAILIMAGE CLASS......Page 55 What Does a Designer Do?......Page 56 The ThumbnailImage Class......Page 57 Putting It All Together......Page 64 Where to Go from Here......Page 65 How Will the Navigator Behave?......Page 67 What Will It Look Like?......Page 68 The Code......Page 69 The getNavigator Method......Page 74 Where to Go from Here......Page 76 USING THE PAGENAVIGATOR CLASS......Page 77 CSS and Reusability......Page 78 Paging with Class......Page 80 Where to Go from Here......Page 83 Using What You Know......Page 85 The MySQLConnect Class......Page 86 The MySQLResultSet Class......Page 89 Using the Page Navigator......Page 90 Where to Go After the Navigator......Page 94 IMPROVEMENT THROUGH INHERITANCE......Page 95 Extending a Class Through Inheritance......Page 96 Replacing Errors with Exceptions......Page 99 The MySQLException Class......Page 100 Changes to the MySQLConnect Class......Page 101 Catching Exceptions......Page 103 Implementing an Interface......Page 104 Where to Go from Here......Page 109 Abstract Classes......Page 111 Polymorphism......Page 113 Static Classes......Page 114 Design Patterns......Page 116 Where to Go from Here......Page 118 KEEPING IT FRESH......Page 119 SimpleXML......Page 120 Site-Specific Search......Page 123 Would You Want to Do It Procedurally?......Page 130 MORE MAGIC METHODS......Page 131 __get and __set......Page 132 __isset and __unset......Page 133 __call......Page 134 __autoload......Page 135 __clone......Page 136 A Note About Overloading......Page 142 CREATING DOCUMENTATIONUSING THE REFLECTION CLASSES......Page 145 The Reflection Group of Classes......Page 146 The Documenter Class......Page 150 Using the Documenter Class......Page 154 Reflecting......Page 157 EXTENDING SQLITE......Page 159 Directory Structure......Page 160 Getting Started......Page 161 Creating a Table......Page 162 Views......Page 163 Triggers......Page 164 Extending SQLiteDatabase......Page 165 Override the Query Methods......Page 166 Utility Methods......Page 171 User-Defined Functions......Page 174 Uses and Limitations of SQLite......Page 176 USING PDO......Page 177 Converting the SQLite Application......Page 178 Additional Capabilities of PDO......Page 181 Assessment......Page 184 SETTING UP PHP 5......Page 185 php.ini Settings......Page 186 CONVERSION TABLE: PHP 4 AND PHP 5......Page 189 GLOSSARY......Page 193 INDEX......Page 199 COVER 1 BRIEF CONTENTS 5 CONTENTS IN DETAIL 7 ACKNOWLEDGMENTS 13 INTRODUCTION 15 What Does This Book Have to Offer? 16 Who Should Read This Book? 16 Requirements 16 Overview of Contents 17 Companion Website 19 Resources 20 WHAT A TANGLED WEB WE WEAVE 21 Do We Really Need Objects? 22 The PHP Culture 24 BASICS OF OBJECT-ORIENTED PROGRAMMING 25 Class 26 Objects Need Access Modifiers 27 Object Reuse and Inheritance 27 Where to Go from Here 29 OBJECT-ORIENTED FEATURES NEW TO PHP 5 31 Access Modifiers 32 Built-in Classes 32 Backward Compatibility 34 Where to Go from Here 35 SHOW A LITTLE CLASS 37 Design 38 Not the Da Vinci Code 39 Creating an Instance 41 What Have You Accomplished? 43 But Will It Fly? 43 MOD UR CLASS 45 Upgrading to PHP 5 46 Modifying Your Class 49 Summary of Changes 53 THE THUMBNAILIMAGE CLASS 55 What Does a Designer Do? 56 The ThumbnailImage Class 57 Displaying a Thumbnail 64 Putting It All Together 64 Where to Go from Here 65 BUILDING THE PAGENAVIGATOR CLASS 67 How Will the Navigator Behave? 67 What Will It Look Like? 68 The Code 69 The getNavigator Method 74 Where to Go from Here 76 USING THE PAGENAVIGATOR CLASS 77 DirectoryItems Change 78 CSS and Reusability 78 Paging with Class 80 Where to Go from Here 83 DATABASE CLASSES 85 Using What You Know 85 One Lump or Two? 86 The MySQLConnect Class 86 The MySQLResultSet Class 89 Using the Page Navigator 90 Where to Go After the Navigator 94 IMPROVEMENT THROUGH INHERITANCE 95 The Standard PHP Library 96 Extending a Class Through Inheritance 96 Replacing Errors with Exceptions 99 The MySQLException Class 100 Changes to the MySQLConnect Class 101 Catching Exceptions 103 Implementing an Interface 104 Where to Go from Here 109 ADVANCED OBJECT-ORIENTED PROGRAMMING CONCEPTS 111 Abstract Classes 111 Polymorphism 113 Static Classes 114 Design Patterns 116 Where to Go from Here 118 KEEPING IT FRESH 119 SimpleXML 120 Site-Specific Search 123 Complex Tasks Made Easy 130 Would You Want to Do It Procedurally? 130 MORE MAGIC METHODS 131 __get and __set 132 __isset and __unset 133 __call 134 __autoload 135 __sleep and __wakeup 136 __clone 136 A Note About Overloading 142 CREATING DOCUMENTATIONUSING THE REFLECTION CLASSES 145 What Are the Reflection Classes? 146 The Reflection Group of Classes 146 What Format Do You Want? 150 The Documenter Class 150 Using the Documenter Class 154 Reflecting 157 EXTENDING SQLITE 159 Brief Overview 160 Directory Structure 160 How It’s Done 161 Getting Started 161 Creating a Table 162 Views 163 Triggers 164 PHP Implementation of SQLite 165 Extending SQLiteDatabase 165 Override the Query Methods 166 Utility Methods 171 User-Defined Functions 174 Uses and Limitations of SQLite 176 USING PDO 177 Pros and Cons 178 Converting the SQLite Application 178 Additional Capabilities of PDO 181 Assessment 184 SETTING UP PHP 5 185 php.ini Settings 186 CONVERSION TABLE: PHP 4 AND PHP 5 189 GLOSSARY 193 INDEX 199 Bookmarks,built,with,Aerialist.,All,bookmarks,are,good. Bookmarks built with Aerialist.,All bookmarks are good. Object-Oriented PHP shows developers how to take advantage of the new object-oriented features of PHP. Working within the context of concrete examples, the book begins with code compatible with PHP 4 and 5, and then focuses on object-orientation in PHP 5. The author's practical approach uses numerous code examples, which will help developers get up to speed with object oriented PHP quickly, and show them how to apply what they learn to everyday situations. All code samples are available for download on the book's companion site. Object-Oriented PHP shows developers how to take advantage of the new object-oriented features of PHP. Working from concrete examples, the book begins with code compatible with PHP 4 and 5, and then focuses on object orientation in PHP 5. The author's practical approach uses numerous code examples, which will help developers get up to speed quickly and show them how to apply what they've learned to everyday situations. All code samples are available for download on the book's companion website.
دانلود کتاب Object-oriented PHP concepts, techniques, and code. - Includes index