TAILIEUCHUNG - Interface-Oriented Design phần 8

Nội dung của ReserveOneWayAirfare có thể ngắn hơn, nếu máy chủ được trạng thái. Các máy chủ sẽ cần phải nhớ những gì Các lựa chọn đã được truyền. Sau đó ReserveOneWayAirfare có thể chỉ chứa một chỉ số vào vùng lựa chọn của tài liệu QuotationForOneWayAirfare. | Analysis 142 Figure Web browser results Analysis Let s create some IRI cards for potential interfaces. We stated that we are going to display the information in a web browser. However the display of information should not be coupled to how we obtain the information. Otherwise changing a provider for a piece of information can have ramifications throughout the system. So we create data gatherer interfaces as well as data formatter interfaces. Instead of showing the actual cards we save a little paper and just list the proposed interfaces IndividualDataGatherer - Retrieves one type of information . weather from an information provider IndividualDataFormatter - Formats information of a single information type WebConglomerator - Formats information from IndividualDataFormatters Analysis 143 These interfaces may seem a bit too abstract to help us really understand the system. So using the prototype page in the previous section let s examine the data we need to gather in a concrete instance. The only caveat is that we do not want to limit ourselves to a particular type of information. Generalization of these interfaces can be deferred to a later time. We just want to keep in mind that if interfaces may be generalized we do not make any decisions that would obviously make that generalization harder. A Concrete Gatherer We do a little checking of potential sources for weather information for a DataGatherer. It turns out that if you do not have a recognizable city some sources return either an error message or a multiple-choice selection. However all the sources can use a ZIP code to uniquely identify a location. So the first step in obtaining weather information is to find the ZIP code for a location. So we start with a LocationFinder to obtain the ZIP code or the city state if a ZIP code is entered. This initial interface looks like this data interface Location City State Zip interface LocationFinder Location find_by_city_state City State signals .

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.