Bachelor + Master Publishing
811 Bachelorarbeiten, 533 Masterarbeiten, 10.103 Diplomarbeiten

Relevance of design patterns within web applications

Relevance of design patterns within web applications
Über dieses Buch
  • Art: Bachelorarbeit
  • Autor: Niels Lange
  • Abgabedatum: Februar 2010
  • Umfang: 85 Seiten
  • Dateigröße: 4,0 MB
  • Note: 1,9
  • Institution / Hochschule: Hochschule Furtwangen Deutschland
  • Bibliografie: ca. 55
  • ISBN (eBook): 978-3-8428-1561-2
  • Sprache: Englisch
  • Prämierung:
  • Arbeit zitieren: Lange, Niels Februar 2010: Relevance of design patterns within web applications, Hamburg: Diplomica Verlag
  • Schlagworte: Design Pattern, Software Architecture, Best Practice, Web Application

Bachelorarbeit von Niels Lange

Abstract:

In 1994 the Gang of Four, consisting of Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, published the book Design Pattern - Elements of Reusable Object-Oriented Software. Within that book the four information scientists described 23 design patterns, which they classified into the categories Creational Design Pattern, Structural Design Pattern and Behavioral Design Pattern.

Even though design patterns exist since 15 years at present, they have not lost relevance. Due to new concepts the usage of design patterns within web application is increasing.

Meanwhile all 23 established design patterns are available as PHP implementations. Aside web languages like AJAX, JavaScript, XHTML and CSS also appreciate the strength of design patterns.

At first web languages like AJAX, PHP, et cetera will be analyzed if they qualify for the usage of design patterns. At second the usage of design patterns within open source web applications like Typo3, Joomla, Wordpress, et cetera will be examined. At third various web developers of 1&1, web.de, Telekom, et cetera will be interviewed to investigate if and in which amount design patterns are used by companies.

Intention of this thesis is to determine the relevance of design pattern within web applications. Thereby advantages will also be shown like disadvantages. Also the question, if design patterns should be used by default or only if the concerning project reached a specific size, will be answered.

Table of Contents:

Abstract i
Preface ii
1. Introduction 1
2. Analysis of web programming languages 2
2.1 Definition of recognition characteristics 3
2.1.1 Regular classes 4
2.1.2 Abstract classes 5
2.1.3 Static attributes and methods 6
2.1.4 Scopes 7
2.1.5 Inheritance through expansion 8
2.1.6 Inheritance through implementation
2.2 Examination of defined characteristics 10
2.2.1 ActionScript 11
2.2.2 AJAX/JavaScript 13
2.2.3 ASP 15
2.2.4 PHP 17
2.2.5 Ruby 19
3. Analysis of open source applications 21
3.1 Definition of recognition characteristics 22
3.1.1 Analysis by hand 23
3.1.2 Analysis by recognition characteristics 24
3.1.3 Analysis by UML to code generator 26
3.1.4 Analysis by manuals 27
3.2 Examination of defined characteristics 28
3.2.1 Coppermine Photo Gallery 29
3.2.2 Drupal 31
3.2.3 phpBB 33
3.2.4 WordPress 34
3.2.5 Zend Framework 35
4. Examples of design patterns 37
4.1 Model View Controller Pattern 38
4.2 Intercepting Filter Pattern 40
4.3 Registry Pattern 42
4.4 Template View Pattern 44
4.5 View Helper Pattern 46
5. Survey of web developers 48
5.1 Definition of the inquiry questions 49
5.2 Evaluation of the inquiry questions 50
6. Conclusion 53
6.1 Conclusion of web language results 54
6.2 Conclusion of open source application results 55
6.3 Conclusion of web developer survey 56
6.4 Final words 57
Bibliography 61

Text Sample:

Chapter 4.1, Model View Controller Pattern:

From all known design patterns the Model-View-Controller pattern is one of the most abstract pattern. It is more a concept than a common design pattern. Therefore the Model-View-Controller can be implemented on reams of ways. The concrete implementation depends on the respective programing language, the ambition of the application and the preference of the developer. According to (Swe05) the Model View Controller Pattern was invented in the latest 1970’s by Trygve Reenskaug at Xeroxs Palo Alto Research Center (PARC). Originally the Model View Controller, that was designed to solve GUI problems, was implemented in Smalltalk-80. But let us take a look what the Model View Controller Pattern is used to.

Motivation:

A common problem by developing web applications is the separation between business-logic and view. Just in script languages like PHP it seams like this is a huge problem. For example PHP was originally developed for the view part while the core was written in C code. Now that also the core can be written in PHP developers have to consider the original field of application. But within enterprise application that separation is not only a nice-to-have but a must. It is necessary to separate the business-logic from the view.

Purpose:

The Model-View-Controller pattern was developed to divide an application into three parts: the model, the view and the controller. The model is like the template of the object. It contains setters and getters to manipulate the model. That means that some of the business-logic is located inside the model. Thereby the model is not equal to the database even if many developers think so. But beside to store data within a database it is also possible to store data within a text file or even in the memory of the server. And what to do if using web services is desired? If you create a Google Maps based web application you will not store every result of Google Maps within your own database, will you? These examples show why a model is not equal to a database. Like the model, also the controller contains business-logic. But instead of business-logic to manipulate the model it contains business-logic to handle requests. The controller receives a request, ask the model for some data and put that received data in the scope of the view. The view is the third and last part of the Model-View-Controller and at the same time the only part a user is able to see. The view receives its data directly from the controller. That means that model and view do not know each other. Their only connection will be realized through the controller.

Implementation:

As written above there are many different ways to implement the Model-View-Controller. The concrete implementation of the Model-View-Controller depends on the requirements of the specific project. Therefore instead of implementing a concrete Model-View-Controller I advice to use a MVC based framework just like Zend Framework, Cake PHP or Symfony.

Definition:

According to (Fow03) the Model View Controller Pattern divides an application into three layers. These layers are the model that contains the business logic of the objects, the controller that contains the business logic of the data flow and the view for the outputs. In accord with (McA08) the Model View Controller Pattern simplifies the development and maintenance of applications.

Consequences:

Instead of procedural written applications using the Model View Controller Patterns means that the core has to be written object oriented. Thus using the Model View Controller can slow down the performance of the application. However using the Model View Controller Pattern can accelerate the development process extremely. The worse performance has no bearing to the saving of time. Therefore the Model View Controller Pattern should be used by every developer as it is an essential part of solid software.

Arbeit zitieren:
Lange, Niels Februar 2010: Relevance of design patterns within web applications, Hamburg: Diplomica Verlag

Schlagworte:
Design Pattern, Software Architecture, Best Practice, Web Application

diplom.de
Bachelor + Master Publishing

Hermannstal 119 k
22119 Hamburg

Fon: +49 (0) 40 655992-0
Fax: +49 (0) 40 655992-22

Service-Telefon

Rufen Sie uns an:
+49 (0) 40 655992-0

Mo-Fr
09.00-16.00 Uhr

diplom.de in den Medien

Folgen Sie uns bei Twitter & werden Sie diplom.de-Fan bei Facebook!
Schreibtipps unserer Lektoren, Neuigkeiten aus dem Verlagsalltag und das Expertenwissen unserer Autoren als Tweet & Post!
Wir freuen uns auf Sie!

diplom.de BACHELOR + MASTER PUBLISHING

Bachelorarbeiten, Masterarbeiten, Diplomarbeiten, Magisterarbeiten, Dissertationen und andere Abschlussarbeiten aus allen Fachbereichen und Hochschulen können Sie bei uns als eBook sofort per Download beziehen oder sich auf CD oder als Buch zusenden lassen. Seit mehr als 15 Jahren ist diplom.de der seriöse, professionelle und erfolgreiche Partner für die Veröffentlichung wissenschaftlicher Abschlussarbeiten.

© Diplomica Verlag GmbH 1996-2011, AG Hamburg HRB 80293 - GF Björn Bedey, USt-IdNr.: DE214910002 - Verkehrsnummer: 12285 - Impressum
Index der Arbeiten - Index der Autoren