Design Patterns



With designing a large-scale of web based application systems, many issues must be considered such as the design of user interface, navigation options, information structure, and personalization. To overcome such design complexity a design pattern has to be followed to create a final product that is both usable and useful. In providing such design, end-users and stakeholders usually express their desires to participate and contribute their efforts to the design decision during the design process. Design pattern is created to design a solution to recurrent (repeated) problems where non-technical terms are used for a wider audience to understand such solutions. It’s a useful tool to improve communications among different audience, and also to integrate the end-user prospective in the design process. However, individuals who might implement certain pattern might follow different strategies that might have some influence in the quality of the proposed solution (Carroll and Rosson, 2009).

Wallace (2000) explained that common problems can have different techniques to solve such problems, and design patterns generally arise over time in trying to solve such problems by choosing and refining the best technique that can solve these problems. Once such techniques are defined, the next step is to describe these patterns in a way that can make them more comprehensive to a wide range of audience. For this reason, a formal web programming patterns were constructed to help creating a common solution in web development.

Design patterns describe the formal solution for a certain problem, and also a document of such pattern has to describe the problem, its solution and the consequences of using such pattern. Once the pattern is considered and documented it can assist in solving related problems and the same technique can be used to solve other problems. For example, with formally described design pattern for web development that captured the knowledge of experts, web developers can use such design pattern to build their own web sites, and help improve the ability of web developers to communicate their ideas to others, and also follow the pattern of possible solutions (Wallace, 2000).

In designing a web application, developers need to gain many skills in different levels of many phases in web design such as human interactions, user interface design; information design, scripting, database design, database queries, and code library development. In all of the above level of design phases, a framework will be required to be implemented in all of these phases, and such framework should be able to describe patterns that can be used in web programming that is capable to explain the design considerations across any or all of the above levels (Wallace, 2000).

Why we are using a Design Pattern

Using a design pattern to solve a certain problem is the same as reusing other developer’s code to approach a solution for a programming problem. Design pattern is the guide that developers can use to direct them to a solution that has been tested and been working toward the same problems. Design pattern is used in web development to use good design principles toward easier solution and guarantee results (Homer, 2007).

Patrizio (2005) stated that a software design pattern defined as the description of solution to a problem that might face architects, designers, or programmers. It’s a convenient way for reusing designs, and codes among projects. Like objects that can be reusable among different applications, design patterns can give such capability in designing web applications. A pattern language is known as collections of interrelated patterns, and the language is consists of links of patterns to create an application structure or flow. Design patterns allow the developers to do the following:


  • Develop applications in all major language using the best modeling practices.
  • Avoid the common mistakes that could happen in object-oriented development.
  • Allow the definition of different layers during the development lifecycle such as requirements, architectures and designs.
  • Reusing patterns will reduce the development time since patterns can cut down on repetitive tasks.
  • Design patterns leverage the expertise of others to speed the development process.

Different Design Patterns

Williams (2002) explained that with the MVC (Model View Controller) design pattern, any program can be divided into three common parts: the Model, the View and the Controller:

View This part is available for users to see. It translates data into screen presentation that interact with end-users. However, it doesn’t actually contain the data.

Model – This part contains the data that will be available to the end-user based on certain requests, and informs the View when the changes in the presentation is required based on the changes in the data.

Controller – This part accepts user’s commands, and modifies the Model accordingly to render the data to the user within the View part.

Williams (2002) also explained that a good example of such pattern is a spreadsheet program that runs on a personal computer, by applying such architecture, the Model will be the place to store the formulae and other data. When the commands such as Save to a file or load a file is issued the Model will handle this action, while the Controller will handle any other process when end-user tries to change something within the spreadsheet. Such design pattern has several benefits in design phase, and some of these benefits are:


  • The creation of multiple user interfaces is simplified by using the MVC pattern.
  • MVC design pattern increase the chances of the code reuse.
  • Developers can write and debug modules independently.
  • Make the code easier to be modified, and divide the work required between the server and the client.

Patrizio (2005) stated that design pattern can be divided into different groups based on the aims of the pattern and their types. For example, some patterns control the way the application behaves based on how the user reacts with the application, other patterns provide presentation logic that show specific views that make up the user interface, and other groups of patterns that defines techniques for persisting and access data. Some of these design patterns are:


  • Presentation Logic 
  • Model-View-Controller (MVC) – Improve the reusability of the code since the model separate the three components required to generate and manage user interface.
  • Model-View-Presenter (MVP)
  • User Case Controller
  • Host or Behavioural
  • Command
  • Publish-Subscribe/Observer
  • Plug-in/Module/Intercepting Filter
  • Structural
  • Service Agent/Proxy/Broker – Removes dependencies between a service and the client by using intermediate brokers.
  • Provider/Adapter – Allow incompatible classes to communicate together by changing the interface of one class to the expected interface by the other.
  • Creational
  • Factory/Builder/Injection
  • Singleton – It is useful for exposing static methods and read-only data that don’t rely on instance data.
  • Persistence
  • Repository – Virtualizing storage of entities such as database or XML file as strongly types rather than data sets or data rows.


Lam (2003) explained that the general method that can be used in solving several problems is called Design Pattern where it defines a solution to common problems. Design pattern is created based on proven solutions that are implemented through different projects that proved it’s capability of solving problems, and that it can be re-used for different problems as a pattern. Design pattern is a proposed solution rather than a template that is used for a specific implementation. Also, a design pattern is not a framework but it is considered to be a design framework. Design pattern are useful in the following phases of the development environment:


  • Maintenance
  • Readability
  • Documentation
  • In a large team of development
  • Developing a code that can be used by other

System designers and architects should look for the repeatable patterns that can be used within companies. Such pattern can be used as guidelines for developing reusable code and developing robust applications. In MVC design pattern, the Model is responsible for the data displayed by the View and the Controller is responsible to manage such data (Advantage, 2002).


 Advantage, e. (2002) ASP.Net Supports Classic MVC design pattern for Web applications [Online]. Available from: (Accessed: 20 March 2010).

 Carroll, J. & Rosson, M. (2009) Web Design Patterns: Investigating User Goals and Browsing Strategies [Online]. Available from: (Accessed: 20 March 2010).

 Homer, A. (2007) Design Patterns for ASP.Net Developers [Online]. Available from: (Accessed: 20 March 2010).

 Lam, J. (2003) Introduction to Design Patterns Using PHP [Online]. Available from:

(Accessed: 20 March 2010).

 Patrizio, A. (2005) An Introduction to Patterns in Asset-based Development [Online]. Available from: (Accessed: 20 March 2010).

 Wallace, N. (2000) Design Patterns in Web Programming [Online]. Available from:

(Accessed: 20 March 2010).

 Williams, A. (2002) Design Patterns for Web Programming [Online]. Available from:;jsessionid=O44YC5ELNO5IVQE1GHOSKH4ATMY32JVN

(Accessed: 20 March 2010).











Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: