freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java設計模式與j2ee設計模式-展示頁

2024-08-12 09:41本頁面
  

【正文】 re able to add and remove these filters unobtrusively, without requiring changes to our existing code.We are able, in effect, to decorate our main processing with a variety of mon services, such as security, logging, debugging, and so forth. These filters are ponents that are independent of the main application code, and they may be added or removed declaratively. For example, a deployment configuration file may be modified to set up a chain of filters. The same configuration file might include a mapping of specific URLs to this filter chain. When a client requests a resource that matches this configured URL mapping, the filters in the chain are each processed in order before the requested target resource is invoked.. Front Controller—前端控制器模式ContextThe presentationtier request handling mechanism must control and coordinate processing of each user across multiple requests. Such control mechanisms may be managed in either a centralized or decentralized manner.ProblemThe system requires a centralized access point for presentationtier request handling to support the integration of system services, content retrieval, view management, and navigation. When the user accesses the view directly without going through a centralized mechanism, two problems may occur:Each view is required to provide its own system services, often resulting in duplicate code. View navigation is left to the views. This may result in mingled view content and view navigation. Additionally, distributed control is more difficult to maintain, since changes will often need to be made in numerous places.ForcesCommon system services processing pletes per request. For example, the security service pletes authentication and authorization checks. Logic that is best handled in one central location is instead replicated within numerous views. Decision points exist with respect to the retrieval and manipulation of data. Multiple views are used to respond to similar business requests. A centralized point of contact for handling a request may be useful, for example, to control and log a user39。s intermediate data model and serve as business data adapters.There are multiple strategies for implementing the view ponent. The JSP View Strategy suggests using a JSP as the view ponent. This is the preferred strategy, and it is the one most monly used. The other principal strategy is the Servlet View Strategy, which utilizes a servlet as the view (see the section Strategies for more information).Encapsulating business logic in a helper instead of a view makes our application more modular and facilitates ponent reuse. Multiple clients, such as controllers and views, may leverage the same helper to retrieve and adapt similar model state for presentation in multiple ways. The only way to reuse logic embedded in a view is by copying and pasting it elsewhere. Furthermore, copyandpaste duplication makes a system harder to maintain, since the same bug potentially needs to be corrected in multiple places.A signal that one may need to apply this pattern to existing code is when scriptlet code dominates the JSP view. The overriding goal when applying this pattern, then, is the partitioning of business logic outside of the view. While some logic is best encapsulated within helper objects, other logic is better placed in a centralized ponent that sits in front of the views and the helpersthis might include logic that is mon across multiple requests, such as authentication checks or logging services, for example. Refer to the Intercepting Filter on page 4 and Front Controller on page 21 for more information on these issues.If a separate controller is not employed in the architecture, or is not used to handle all requests, then the view ponent bees the initial contact point for handling some requests. For certain requests, particularly those involving minimal processing, this scenario works fine. Typically, this situation occurs for pages that are based on static information, such as the first of a set of pages that will be served to a user to gather some information (see Dispatcher View on page 232). Additionally, this scenario occurs in some cases when a mechanism is employed to create posite pages (see Composite View on page 203).The View Helper pattern focuses on remending ways to partition your application responsibilities. For related discussions about issues dealing with directing client requests directly to a view, please refer to the section Dispatcher View on page 232.. Composite View—復合視圖模式ContextSophisticated Web pages present content from numerous data sources, using multiple subviews that prise a single display page. Additionally, a variety of individuals with different skill sets contribute to the development and maintenance of these Web pages.ProblemInstead of providing a mechanism to bine modular, atomic portions of a view into a posite whole, pages are built by embedding formatting code directly within each view.Modification to the layout of multiple views is difficult and error prone, due to the duplication of code.ForcesAtomic portions of view content change frequently. Multiple posite views use similar subviews, such as a customer inventory table. These atomic portions are decorated with different surrounding template text, or they appear in a different location within the page. Layout changes are more difficult to manage and code harder to maintain when subviews are directly embedded and duplicated in multiple views. Embedding frequently changing portions of template text directly into views also potentially affects the availability and administration of the system. The server may need to be restarted before clients see the modifications or updates to these template ponents. SolutionUse posite views that are posed of multiple atomic subviews. Each ponent of the template may be included dynamically into the whole and the layout of the page may be managed
點擊復制文檔內(nèi)容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1