tailieunhanh - Designing Enterprise Applicationswith the J2EETM Platform, Second Edition phần 10
và sử dụng một tập tin mặc định (không có hậu tố nội địa hóa) như một dự phòng. Cách tiếp cận trang mỗi-miền địa phương có những lợi ích sau đây: • Greater customizability Sử dụng bó tài nguyên để tùy chỉnh một kết quả JSP trang duy nhất trong các trang có cấu trúc cơ bản là giống nhau cho tất cả các miền địa phương. | ARCHITECTURE OF THE SAMPLE APPLICATION 375 up functions. It also uses a Business Delegate to bridge the EJB and Web tiers particularly if its entity beans are implemented with a remote client view. The Business Delegate is an object that hides the data retrieval details such as remote exceptions. A Value Object may be used to limit the number of remote access calls. Other components take care of the presentation of the retrieved data. The Screen View is a JSP page that builds the next screen to display to the user. It relies on a Composite View which is a template containing the page structure header footer and so forth . It also relies on a View Helper either a JavaBean component or a helper object that extracts the dynamic content for the page from the retrieved data. The Screen Flow Manager object keeps track of the next page in the sequence of pages. Figure reflects a remote view architecture. In actuality the sample application Web site uses a local architecture approach. While this approach limits distribution to one VM it does provide increased performance and the ability to have fine-grained method access. It also enables the application to leverage all the container-managed persistence capabilities offered by the EJB container. Using a local or a remote architecture affects the design of the application and its deployment strategy. Figure would have fewer layers had it reflected this local client view design. With a local client view the design can include finer granularity between components. Local method calls do not have the overhead of remote method calls. Because there are few layers and tiers are co-located it is not necessary to use value objects or business delegates. Value objects are not necessary for entity beans implemented with a local client view. Deployment is also affected by use of a local or remote architecture. An application implementing a local architecture must be deployed in one unit. Applications with a remote architecture
đang nạp các trang xem trước