Design Pattern Based Web Applications

  • یوسف مهرداد

Pattern-based web applications have become popular since they promote reusability and consistency. In few cases, patterns do not produce the desired effect because of lack of experience in applying them. This situation forces one to think of a suitable re-engineering solution for such applications. The objectives of the paper are three fold. It provides a survey of different pattern-based web applications that will be useful for the application designers. It highlights some of the web applications where patterns have been inappropriately handled. A few re-engineering initiatives for such cases are also analyzed.

Pattern Name

Applicability

Consequences

Remark

Command Processor

• Separates request for a service from its execution.

• Ideal for the development of hyper-controllable applications.

• This pattern provides flexibility in handling requests and their functionalities.

• It also allows commands to be executed in separate threads of control.

• Implementation of indirections costs storage and time thereby leading to efficiency loss.

A reengineering strategy with Memento, Observer, Visitor and Singleton may replace the functionality of Command Processor.

Document View

• Document holds the core functionality and data, View combines the ‘View’ and ‘Presentation above’

• Suited for 2-Tier Client-Server architecture

Document-View-Presentation

• The Document holds the core functionality and the data; view to manage the display (render + accept service request) and Presentation deals with output and user input

• Reuse the rendering output

• Pluggable presentation component

• Thin user interface

• Ideal for multiple window based applications

• Increased Complexity

Model/View/Controller

• Dividing an application into functionality(model), display(view) and user input(controller)

• Easy maintenance of multiple views of the same model.

• Synchronized and ‘pluggable’ views..

• Uncontrollable number of updates.

• Close coupling between views and controllers

The model can be made to skip unnecessary updates.

Navigation Strategy

• Ideal to apply when there is a need to establish a relation between two or more objects at different times.

• Used in situations where objects stored in a database are to be retrieved whenever an associated object raises a demand.

• The pattern encourages dynamic creation and linking of nodes in an active hypermedia environment.

• Allows one to define different kinds of links as well as end points.

• Used to improve memory requirements by deferring the retrieval of the target code only when needed.

• Increased number of objects and communication overhead between the classes involved.

The Prototype pattern can be used to overcome the barriers of the pattern.

NavigationObserver

• Maintenance of navigation history

• Maintenance of different viewers for the history

• Enabling the backtracking in the navigational path.

• Decouples navigation from its history and history from the display of it.

• Provides application independent functionality for the style of viewing the history.

• Causes overhead when attempts are made to filter certain types of nodes in the history.

A reengineering effort made by introducing an alternate architecture involving singleton or mediator.

Presentation/ Abstraction / Control

• Defines a structure in the form of levels of cooperative agents. Each agent is divided in to Presentation, Abstraction and Control components

• New agents can easily be added / dropped at any time.

• Easy implementation of multi tasking

• Increased system complexity

Provides a maintainable and extensible structure with clear separation of concepts between different system tasks.

Reference: Journal of Object Technology
Quote:
“There’s an old story about the person who wished his computer were as easy to use as his telephone. That wish has come true, since I no longer know how to use my telephone.” Bjarne Stroustrup

https://bibalan.com/?p=343
یوسف مهرداد

یوسف مهرداد


کانال تلگرام

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

برای خروج از جستجو کلید ESC را بفشارید