TAILIEUCHUNG - PHP Objects, Patterns, and Practice- P4

PHP Objects, Patterns, and Practice- P4: This book takes you beyond the PHP basics to the enterprise development practices used by professional programmers. Updated for PHP with new sections on closures, namespaces, and continuous integration, this edition will teach you about object features such as abstract classes, reflection, interfaces, and error handling. You’ll also discover object tools to help you learn more about your classes, objects, and methods. | CHAPTER 7 WHAT ARE DESIGN PATTERNS WHY USE THEM PHP and Design Patterns There is little in this chapter that is specific to PHP which is characteristic of our topic to some extent. Many patterns apply to many object-capable languages with few or no implementation issues. This is not always the case of course. Some enterprise patterns work well in languages in which an application process continues to run between server requests. PHP does not work that way. A new script execution is kicked off for every request. This means that some patterns need to be treated with more care. Front Controller for example often requires some serious initialization time. This is fine when the initialization takes place once at application startup but more of an issue when it must take place for every request. That is not to say that we can t use the pattern I have deployed it with very good results in the past. We must simply ensure that we take account of PHP-related issues when we discuss the pattern. PHP forms the context for all the patterns that this book examines. I referred to object-capable languages earlier in this section. You can code in PHP without defining any classes at all although with PEAR s continuing development you will probably manipulate objects to some extent . Although this book focuses almost entirely on object-oriented solutions to programming problems it is not a broadside in an advocacy war. Patterns and PHP can be a powerful mix and they form the core of this book they can however coexist quite happily with more traditional approaches. PEAR is an excellent testament to this. PEAR packages use design patterns elegantly. They tend to be object-oriented in nature. This makes them more not less useful in procedural projects. Because PEAR packages are self-enclosed and hide their complexity behind clean interfaces they are easy to stitch into any kind of project. Summary In this chapter I introduced design patterns showed you their structure using the Gang of .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.