Model 1

Model 1

In the design of Java Web applications, there are two commonly used design models, referred to as Model 1 and Model 2.[1]

A diagram of a Model 2 implementation.
A simplified diagram of a Model 1 implementation.

In Model 1, a request is made to a JSP or servlet and then that JSP or servlet handles all responsibilities for the request, including processing the request, validating data, handling the business logic, and generating a response. The Model 1 architecture is commonly used in smaller, simple task applications due to its ease of development.

Although conceptually simple, this architecture is not conducive to large-scale application development because, inevitably, a great deal of functionality is duplicated in each JSP. Also, the Model 1 architecture unnecessarily ties together the business logic and presentation logic of the application. Combining business logic with presentation logic makes it hard to introduce a new 'view' or access point in an application. For example, in addition to an HTML interface, you might want to include a Wireless Markup Language (WML) interface for wireless access. In this case, using Model 1 will unnecessarily require the duplication of the business logic with each instance of the presentation code.

Multiple view pages can also share content, business logic, validation, and other features by including reusable elements or components. For example, in Java JSP the application developer can define a new taglib that implements the shared features. File includes is an additional mechanism that promotes reuse. Thus, it is possible to make a "Model 1" architecture have comparable features to "Model 2" architecture with the advantage that application do not need to implement processing code in a general-purpose language that are most suitable to complex computations. A suitable designation for this would be a "Model 1.5" architectures, where application code is invoked only in the (rare) instances where non-stereotyped or complex processing is required.

See also

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Model 2A — Model 2 Le Model 2 est un système de jeu vidéo destiné aux salles d arcade, commercialisé par Sega en 1993. Sommaire 1 Description 2 Spécifications techniques 2.1 Model 2 …   Wikipédia en Français

  • Model 2B — Model 2 Le Model 2 est un système de jeu vidéo destiné aux salles d arcade, commercialisé par Sega en 1993. Sommaire 1 Description 2 Spécifications techniques 2.1 Model 2 …   Wikipédia en Français

  • Model 2C — Model 2 Le Model 2 est un système de jeu vidéo destiné aux salles d arcade, commercialisé par Sega en 1993. Sommaire 1 Description 2 Spécifications techniques 2.1 Model 2 …   Wikipédia en Français

  • Model 2a — Model 2 Le Model 2 est un système de jeu vidéo destiné aux salles d arcade, commercialisé par Sega en 1993. Sommaire 1 Description 2 Spécifications techniques 2.1 Model 2 …   Wikipédia en Français

  • Model 2b — Model 2 Le Model 2 est un système de jeu vidéo destiné aux salles d arcade, commercialisé par Sega en 1993. Sommaire 1 Description 2 Spécifications techniques 2.1 Model 2 …   Wikipédia en Français

  • Model 2c — Model 2 Le Model 2 est un système de jeu vidéo destiné aux salles d arcade, commercialisé par Sega en 1993. Sommaire 1 Description 2 Spécifications techniques 2.1 Model 2 …   Wikipédia en Français

  • model — mod‧el [ˈmɒdl ǁ ˈmɑːdl] noun 1. [countable] a particular type or design of a vehicle or machine: • the cheapest model in the Volkswagen range • Our photocopier is the latest model. see also brand1, make2 …   Financial and business terms

  • Model — Mod el, n. [F. mod[ e]le, It. modello, fr. (assumed) L. modellus, fr. modulus a small measure, dim. of modus. See {Mode}, and cf. {Module}.] 1. A miniature representation of a thing, with the several parts in due proportion; sometimes, a… …   The Collaborative International Dictionary of English

  • model — [mäd′ l] n. [Fr modèle < It modello, dim. of modo < L modus,MODE] 1. a) a small copy or imitation of an existing object, as a ship, building, etc., made to scale b) a preliminary representation of something, serving as the plan from which… …   English World dictionary

  • Model S — Un prototype de Model S Constructeur …   Wikipédia en Français

  • model — n Model, example, pattern, exemplar, ideal, standard, beau ideal, mirror are comparable when they denote something set or held before one for guidance or imitation in conduct or endeavor. Model applies to a person or thing set before one for… …   New Dictionary of Synonyms

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”