Web Development with JavaServer Pages

Скачать в pdf «Web Development with JavaServer Pages»

Each layer plays an important role in an application’s architecture and will be discussed briefly in the sections which follow. It is often advantageous to treat each tier as an independent portion of your application. Isolating the logical portions of the application helps ensure that you’ve covered all the bases in the design, focuses attention on creating a robust architecture, and lays the groundwork for the implementation.

Do not confuse logical separation of responsibilities with actual separation of components. Each tier does not necessarily need to be implemented by separate components. Some or all of the tiers can be combined into single components to red
uce application complexity, at the expense of modularity and high-level abstraction.

The presentation layer

This tier includes the client-side display elements, such as HTML, XML, or Java applets. The presentation layout tier can be thought of as the user interface for the application because it is used to get input from the end user and display the application’s results. In the MVC paradigm, the presentation layout tier fills the role of the view. It is an application specific presentation of the information owned by the application logic, or model in MVC terms.

The presentation layout tier is not concerned with how the information was obtained, or from where. Its responsibilities lie only in displaying the information itself, while delegating any other activity up the chain to other tiers. For example, in an application which involves submitting a search query through a web form only the form itself and the corresponding results are the responsibility of the presentation layer. What happens in between, the processing of the request and the retrieval of the results, is not.

Скачать в pdf «Web Development with JavaServer Pages»