ورود به حساب

نام کاربری گذرواژه

گذرواژه را فراموش کردید؟ کلیک کنید

حساب کاربری ندارید؟ ساخت حساب

ساخت حساب کاربری

نام نام کاربری ایمیل شماره موبایل گذرواژه

برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید


09117307688
09117179751

در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید

دسترسی نامحدود

برای کاربرانی که ثبت نام کرده اند

ضمانت بازگشت وجه

درصورت عدم همخوانی توضیحات با کتاب

پشتیبانی

از ساعت 7 صبح تا 10 شب

دانلود کتاب Modernizing Legacy Applications in PHP

دانلود کتاب مدرن سازی برنامه های قدیمی در PHP

Modernizing Legacy Applications in PHP

مشخصات کتاب

Modernizing Legacy Applications in PHP

ویرایش:  
نویسندگان:   
سری:  
ISBN (شابک) : 9781787124707, 1787124703 
ناشر: Packt Publishing 
سال نشر: 2016 
تعداد صفحات: 286 
زبان: English 
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) 
حجم فایل: 5 مگابایت 

قیمت کتاب (تومان) : 31,000



کلمات کلیدی مربوط به کتاب مدرن سازی برنامه های قدیمی در PHP: غیرداستانی، علوم کامپیوتر، برنامه نویسی، علم، فناوری



ثبت امتیاز به این کتاب

میانگین امتیاز به این کتاب :
       تعداد امتیاز دهندگان : 14


در صورت تبدیل فایل کتاب Modernizing Legacy Applications in PHP به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.

توجه داشته باشید کتاب مدرن سازی برنامه های قدیمی در PHP نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.


توضیحاتی در مورد کتاب مدرن سازی برنامه های قدیمی در PHP

کد خود را در یک سری مراحل کوچک و خاص تحت کنترل بگیرید.

همانطور که این بازسازی های افزایشی را به ترتیب اعمال می کنید، هر کدام بر روی آخرین آنها ساخته می شوند، به طور پیوسته برنامه PHP قدیمی خود را از یک آشفتگی اسپاگتی تبدیل خواهید کرد. به یک برنامه سازمان یافته، مدرن، قابل آزمایش، عاری از مسائل جهانی و نگرانی های مختلف.


توضیحاتی درمورد کتاب به خارجی

Get your code under control in a series of small, specific steps.

As you apply these incremental refactorings in order, each one building on the last, you will steadily transform your legacy PHP application from a spaghetti mess to an organized, modern, testable application, free of globals and mixed concerns.



فهرست مطالب

Cover......Page 1
Copyright......Page 3
Credits......Page 4
Foreword......Page 6
About the Author......Page 8
Acknowledgement......Page 9
www.PacktPub.com......Page 10
Table of Contents......Page 12
Preface......Page 20
Chapter 1: Legacy Applications......Page 22
File Structure......Page 23
Page Scripts......Page 24
Rewrite or Refactor?......Page 25
The Pros and Cons of Rewriting......Page 26
The Context-switching problem......Page 27
The Schedule Problem......Page 28
Iterative Refactoring......Page 29
Refactoring to a Framework......Page 30
Review and next steps......Page 31
Revision control......Page 32
Editor/IDE......Page 33
Test suite......Page 34
Review and next steps......Page 35
PSR-0......Page 36
As a Global Function......Page 37
As a Static or Instance method......Page 39
Autoloader Priority......Page 41
What are the Performance Implications Of Autoloading?......Page 42
How Do Class Names Map To File Names?......Page 43
Review and next steps......Page 44
Consolidate Class Files......Page 46
Find a candidate include......Page 47
Remove the related include calls......Page 48
Commit, Push, Notify QA......Page 50
Consolidate functions into class files......Page 51
Convert the function file to a class file......Page 52
Change function calls to static method calls......Page 53
Move the class file......Page 54
Should we remove the autoloader include call?......Page 55
What if the one-class-per-file rule is disagreeable?......Page 56
What if a definition file also executes logic?......Page 57
What about third-party libraries?......Page 59
What about system-wide libraries?......Page 60
For functions, can we use instance methods instead of static methods?......Page 61
Review and next steps......Page 62
Global Dependencies......Page 64
The replacement process......Page 66
Convert global variables to properties......Page 67
Convert global properties to constructor parameters......Page 68
Convert instantiations to use parameters......Page 69
What if we find a global in a static method?......Page 71
What about class names in variables?......Page 73
What about superglobals?......Page 74
Review and next steps......Page 76
Embedded instantiation......Page 78
Find a new keyword......Page 80
Extract One-Time creation to dependency injection......Page 81
Extract repeated creation to factory......Page 82
Change instantiation calls......Page 84
What About Exceptions and SPL Classes?......Page 85
What about Intermediary Dependencies?......Page 86
Isn't this a lot of code?......Page 89
Should a factory create collections?......Page 90
Can we automate all these Injections?......Page 91
Review and next steps......Page 92
Fighting test resistance......Page 94
The way of Testivus......Page 95
Install PHPUnit......Page 96
Create a tests/ directory......Page 97
Write a test case......Page 98
Come On, Really, Can We Do This Later?......Page 100
What about hard-to-test classes?......Page 101
Do we need to test Third-party libraries?......Page 102
Review and next steps......Page 103
Embedded SQL Statements......Page 104
The extraction process......Page 105
Move SQL to a Gateway class......Page 106
Method names......Page 107
An initial Gateway class method......Page 108
Defeating SQL Injection......Page 109
Write a test......Page 111
Test, Commit, Push, Notify QA......Page 113
What about INSERT, UPDATE, and DELETE Statements?......Page 114
What about Repetitive SQL strings?......Page 115
What about complex query strings?......Page 117
What about queries inside non-Gateway classes?......Page 121
Can we extend from a base Gateway class?......Page 122
What about multiple queries and complex result structures?......Page 123
What if there is no Database Class?......Page 126
Review and next steps......Page 128
Chapter 9: Extract Domain Logic to Transactions......Page 130
Domain logic patterns......Page 131
The Extraction Process......Page 133
Discover and Extract Relevant Domain Logic......Page 134
Example Extraction......Page 135
Write tests for the extracted transactions......Page 137
What about repeated Domain Logic?......Page 138
Can a transaction be a class instead of a Method?......Page 139
What about Domain logic embedded in Non-Domain classes?......Page 140
Review and next steps......Page 141
Embedded presentation logic......Page 142
The Extraction process......Page 143
Rearrange the Page script and Spot Check......Page 144
Create a views/ Directory......Page 145
Add Proper Escaping......Page 147
The tests/views/ directory......Page 149
What about Headers and Cookies?......Page 153
What if we already have a Template system?......Page 155
What about Streaming Content?......Page 156
What if we have lots of Presentation variables?......Page 158
What about class methods that generate output?......Page 160
What about Business Logic Mixed into the presentation?......Page 161
Review and next steps......Page 162
Embedded action logic......Page 164
Rearrange the Page Script and Spot Check......Page 165
Spot Check the Rearranged Code......Page 166
Create a Skeleton Class File......Page 167
Move the Action Logic and Spot Check......Page 168
Convert Controller to Dependency Injection and Spot Check......Page 169
Can we pass parameters to the Controller method?......Page 170
What If the Controller contains include Calls?......Page 172
Review and next steps......Page 173
Embedded include Calls......Page 174
The Replacement process......Page 176
Replacing a Single include Call......Page 177
Replace the original include Call......Page 178
Discover coupled variables through testing......Page 179
Convert to Dependency Injection and test......Page 181
Commit, Push, Notify QA......Page 183
Review and next steps......Page 184
Intermingled resources......Page 186
Coordinate with operations personnel......Page 187
Create a document root directory......Page 188
Reconfigure the server......Page 189
Move public resources......Page 190
Review and next steps......Page 191
Coupled Paths......Page 192
Add a Front Controller......Page 193
Create a pages/ Directory......Page 194
Reconfigure the Server......Page 196
Move Page scripts......Page 197
Commit, Push, Coordinate......Page 198
Review and next steps......Page 199
Repeated logic......Page 200
Modify the Front controller......Page 201
Remove Logic from Page Scripts......Page 202
What if the Setup Work Is Inconsistent?......Page 203
Review and next steps......Page 204
What is a Dependency Injection Container?......Page 206
Adding a DI Container......Page 207
Add a DI Container Include File......Page 208
Add a Router Service......Page 209
Modify the Front Controller......Page 210
Extract Page Scripts to Services......Page 211
How can we refine our service definitions?......Page 214
Can we reduce the size of the router service?......Page 216
What if we cannot update to PHP 5.3?......Page 217
Review and next steps......Page 219
Opportunities for improvement......Page 220
Review and next steps......Page 222
Appendix A: Typical Legacy Page Script......Page 224
Appendix B: Code before Gateways......Page 234
Appendix C: Code after Gateways......Page 242
Appendix D: Code after Transaction Scripts......Page 250
Appendix E: Code before Collecting Presentation Logic......Page 258
Appendix F: Code after Collecting Presentation Logic......Page 262
Appendix G: Code after Response View File......Page 266
Appendix H: Code after Controller Rearrangement......Page 270
Appendix I: Code after Controller Extraction......Page 272
Appendix J: Code after Controller Dependency Injection......Page 276
Index......Page 280




نظرات کاربران