TAILIEUCHUNG - Developing Large Web Applications- P28

Developing Large Web Applications- P28:This book presents a number of techniques for applying established practices of good software engineering to web development—that is, development primarily using the disparate technologies of HTML, CSS, JavaScript, and server-side scripting languages. Whereas there are many books on how to use languages, how to use libraries, and how to approach software engineering, this is the first book to codify many of the techniques it presents. These techniques will make the components of your own web applications more reusable, maintainable, and reliable | Figure 10-3. A reusable container for a web page Organizing Components 251 Pages and modules The base classes for pages and modules are excellent examples of components that are used across an entire web application. By placing them in a directory called common or something similar at the top of the directory structure you convey their sitewide scope. Each file is named after the class that it contains . common . common . common You include these files whenever you implement your own classes for specific pages and modules. Example 10-1 shows NavBar derived from the Module base class which requires . a We re not going to examine the details of many of the classes in this chapter. You can learn more about their implementations in Chapter 7. Example 10-1. Deriving the Navigation Bar module from Module php require_once . common class NavBar extends Module You need to include to derive this class from Module. . The top-level common directory is also a logical place to put classes for specific modules that you expect to use across the entire web application. Each file is named after the module class that it contains . common . common . common Layouts and containers Layouts and containers tend to be useful across an entire web application as well. Because layouts and containers fulfill a somewhat unique role it may be helpful to place them in their own subdirectory separate from the other common components. This 252 Chapter 10 Application Architecture directory contains files for specific layouts and containers as well as a file containing the Layout base class itself . common layout . common layout . common layout . common layout . common layout . common layout . In Chapter 7 you saw that layouts actually have a lot in common with modules. As a result Layout is derived from

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.