Relevance of design patterns within web applications

Relevance of design patterns within web applications

4.11 - 1251 ratings - Source

Inhaltsangabe: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 classi?ed 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 1a1,, 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. Inhaltsverzeichnis:Table of Contents: Abstracti Prefaceii 1.Introduction1 2.Analysis of web programming languages2 2.1Definition of recognition characteristics3 2.1.1Regular classes4 2.1.2Abstract classes5 2.1.3Static attributes and methods6 2.1.4Scopes7 2.1.5Inheritance through expansion8 2.1.6Inheritance through implementation9 2.2Examination of de?ned characteristics10 2.2.1ActionScript11 2.2.2AJAX/JavaScript13 2.2.3ASP15 2.2.4PHP17 2.2.5Ruby19 3.Analysis of open source applications21 3.1Definition of recognition characteristics22 3.1.1Analysis by hand23 3.1.2Analysis by recognition characteristics24 3.1.3Analysis by UML to code generator26 3.1.4Analysis by manuals27 3.2Examination of de?ned characteristics28 3.2.1Coppermine Photo Gallery29 3.2.2Drupal31 3.2.3phpBB33 3.2.4WordPress34 3.2.5Zend Framework35 4.Examples of design patterns37 4.1Model View Controller Pattern38 4.2Intercepting Filter Pattern40 4.3Registry Pattern42 4.4Template View Pattern44 4.5View Helper Pattern46 5.Survey of web developers48 5.1Definition of the inquiry questions49 5.2Evaluation of the inquiry questions50 6.Conclusion53 6.1Conclusion of web language results54 6.2Conclusion of open source application results55 6.3Conclusion of web developer survey56 6.4Final words57 Bibliography61 Textprobe: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 ?le 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 di?erent ways to implement the Model-View-Controller. The concrete implementation of the Model-View-Controller depends on the requirements of the speci?c 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 ?ow and the view for the outputs. In accord with (McA08) the Model View Controller Pattern simpli?es 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.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.

Title:Relevance of design patterns within web applications
Author:Niels Lange - 2011-06-21


You Must CONTINUE and create a free account to access unlimited downloads & streaming