Model-View-Controller pattern in WWW applications

No Thumbnail Available

URL

Journal Title

Journal ISSN

Volume Title

Helsinki University of Technology | Diplomityö
Checking the digitized thesis and permission for publishing
Instructions for the author

Date

2004

Major/Subject

Vuorovaikutteinen digitaalinen media

Mcode

T-111

Degree programme

Language

en

Pages

58

Series

Abstract

This thesis explains the Model-View-Controller (MVC) software engineering pattern and demonstrates ways to use it to clarify the structure of web applications. It also analyses separately the implementation of each component (Model, View and Controller) of two database driven example projects. The first project, Dashboard, has a completely manually written MVC implementation and the second project, Divi, uses the Jakarta Struts framework as a basis for development. Divi also uses auto-generated code for database wrapping. It is concluded that the MVC pattern is suited to web environment, even if all of its properties can't be implemented. It is up to the developer and complexity of the project to choose the methods of implementation. Hand tailored code produces a more compact application, but is slower to write and more difficult to maintain. Using a framework as a basis provides a standard way to write an application. Jakarta Struts has a configuration file that is a central point in all the application's functionality and navigation. The framework may also be extended to meet the developer's needs.

Tässä työssä kuvataan ohjelmistotekniikassa käytettävä Model-View-Controller (MVC) suunnittelumalli ja esitellään tapoja, joilla sitä voidaan käyttää selkeyttämään web-sovellusten rakennetta. Työ myös analysoi kunkin komponentin (Model, View ja Controller) toteutustavan kahdessa tietokantapohjaisessa esimerkkiprojektissa. Ensimmäisessä projektissa, Dashboardissa, on kokonaan käsin kirjoitettu MVC-toteutus ja toisessa projektissa, Divissä, käytetään Jakarta Struts -sovelluskehystä kehitystyön pohjana. Divin tietokantaluokissa käytetään myös automaattista koodin generointia. Työssä todetaan, että MVC-malli soveltuu hyvin web-ympäristöön, vaikkei sen kaikkia ominaisuuksia voidakaan tällöin toteuttaa. Toteutustapojen valinta riippuu kehittäjästä ja projektin monimutkaisuudesta. Käsin räätälöidyllä koodilla voidaan saada aikaan kompaktimpi sovellus, mutta sen kehittäminen on hitaampaa ja ylläpito vaikeampaa. Sovelluskehystä käyttämällä sovellus voidaan kirjoittaa vakioidulla tavalla. Jakarta Strutsissa on keskitetty asetustiedosto, joka ohjaa sovelluksen toimintoja ja navigaatiota. Sovelluskehystä on myös mahdollista laajentaa kehittäjän tarpeiden mukaan.

Description

Supervisor

Vuorimaa, Petri

Thesis advisor

Viitanen, Jaakko

Keywords

Model-View-Controller, World Wide Web, patterns, Structs

Other note

Citation