The candidate confirms that the work submitted is their own and the appropriate credit has been given where reference has been made to the work of others.
I understand that failure to attribute material which is obtained from another source may be considered as plagiarism.
(Signature of student) _______________________________
An Evaluation of a Web
Development Framework using a
test case in a learning environment
Yunus Mitchla
BSc Information Systems
Summary
The aim of this project was to choose a web development framework and use it to develop a prototype system which will demonstrate web application development concepts. The problem owner would like to find out if a web development framework can help illustrate web application development concepts to her students.
The problem owner has been aware of the claims made about web development frameworks and would like an objective evaluation into the suitability of teaching her students web application development concepts using a test case. The test case is a prototype system that allows a teacher to produce and manage learning material.
In the evaluation, it was established that the prototype system demonstrates 4 web application development concepts. Using these results, it is now up to the problem owner to decide whether or not she uses a web development framework to teach her students these concepts.
Acknowledgements
I would like to thank my final year project supervisor, Lydia Lau for all her help and support throughout the project. You have provided me with invaluable feedback and advice. I would also like to thank her for being my problem owner.
I would also like to thank Pete Dew for his very helpful comments in the Mid-Project report and the Progress Meeting.
Contents Page
Summary
………...……iAcknowledgements
……….………...iiTable of Contents
……….………iii1
Introduction
……….………11.1
The Problem
………11.2
Aim
………..……….11.3
Objectives
……….…………...21.4
Minimum Requirements
………...……….21.5
Relevance to Degree Programme
………..………...31.6
Deliverables
………31.7
Schedule
……….….32
Background Research
………..………42.1
Web Development Frameworks
………..…….42.1.1
The History………...………….4
2.1.2 The MVC Pattern………...5
2.2
Possible Web Development Frameworks
………...72.2.1
Django………..……….7
2.2.2 Ruby on Rails……….8
2.2.3 Struts………..………9
2.2.4 Conclusion………...10
2.3
Web Application Development Concepts
……….………102.3.1 The Two Tier Architecture………10
2.3.2 The Three Tier Architecture……….11
2.4
Methodologies
………..122.4.1 Software Development Methodologies………...………12
2.4.2 Conclusion……….13
2.5
Database Technologies
...143
Selecting a Web Development Framework
………153.1
Introduction
………...153.2
Set of Evaluation criteria to compare Web Development Frameworks
…....153.2.1
Criteria 1: Speed of Development………13
3.2.2 Criteria 2: Documentation and Developer Community………...17
3.2.3 Criteria 3: Source Code………...19
3.2.4 Criteria 4: Innovative Features………20
3.2.5 Summary………...22
4
The Case Study – Analysis of the prototype
………..234.1
Introduction
……….…..234.2
The need for a prototype
………...……..234.3
Requirements Analysis for the prototype
……….…….234.3.1 The Interview………24
4.3.2 Summary………...25
5
The Case Study – Prototype Development Iteration 1
………..………265.1
Introduction
………..265.2
Prototype Design Iteration 1
………..…265.2.1 Design of the Database………26
5.2.2 Design of the Automatic Administrative Interface (AAI)……….27
5.3
Prototype Implementation Iteration 1
……….………..295.3.1 Implementation of the Database………..29
5.3.2 Implementation of the Automatic Administrative Interface (AAI)………...31
5.4
Prototype Testing Iteration 1
………..……...335.4.1 Testing of Automatic Administrative Interface (AAI) and the Database….34
5.5
Iteration 1 Summary
………346
The Case Study – Prototype Development Iteration 2
………...……356.1
Introduction
……….…..356.2
Prototype Design Iteration 2
………..…….356.2.1 Design of the User Interface……….35
6.3
Prototype Implementation Iteration 2
………...366.3.1 Implementation of the Main Page………37
6.3.2 Implementation of the Classlist, Lectures and Messages pages…………...38
6.3.3 Implementation of the Questions, Blog and Poll pages………39
6.4
Prototype Testing Iteration 2
………..…………416.4.1 Testing of the User Interface………41
6.5
Iteration 2 Summary
………..…….427
Evaluation
………..427.1
Introduction
……….………..427.2
Prototype System Evaluation with a teacher
………427.3
The Suitability of the prototype in teaching web application development
concepts
……….……447.3.1 The Brainstorming Session……….………..44
7.3.2 Summary……….………...46
7.4
Evaluation of Django
………...467.4.1 Introduction………...46
7.4.2 Validating the claims made about Django……….………47
7.5
Possible further Enhancements or Extensions
……….……….488
Conclusion
……….….508.1
Summary of the Problem
……….508.2
Summary of the Results
………...………...50References
………..51Appendix A – Reflection on the project
………..54Appendix B – Design and Implementation of the AAI
………..56Appendix C - Design and Implementation of the Database
……….61Appendix D - Design of the User Interface pages
………...…….66Appendix E - Implementation of the User Interface pages
………..71Appendix F – Testing of Iteration 1
………..79Appendix G – Testing of Iteration 2
……….84Appendix H – Evaluation
……….88Appendix I – Initial Project Schedule
………..90Appendix J - Revised Project Schedule
………...90Appendix K – Three Tier Architecture
………...911
Introduction
1.1 The Problem
Technologies in Internet systems are continuously changing, so it is very important that developers have the opportunity to exploit and be mindful of these new technological developments. Over the last few years, there has been a huge growth within a particular web development field; this being Web Development frameworks such as Django, Struts, Ruby on Rails and CherryPy. These make web application development easier by providing a web developer with a set of related classes, software tools and other supporting elements (Ford, 2005).
The problem owner; Lydia Lau, is a lecturer of the Internet System Technologies module and she has been aware of the emergence of web development frameworks in the last few years. She has wanted to find out more about these web development frameworks and the suitability for students to use any of these for learning the basic concepts in web application development. This has become the motivation for this project.
The problem owner would like to see if there is a web development framework available which is suitable for her students to use so that they have the opportunity to become skilled in a new development environment. She would like her students to build upon the knowledge and understanding gained in her module of concepts such as the three tier architecture model by applying and practicing them with a web development framework. The module teaches the concepts in web application development and how technologies such as JavaScript, CSS, XHTML (technologies for client-side /presentation tier), server side scripting (business logic tier) and database; are used throughout the three-tier web application architecture. The problem owner would like to have an objective evaluation of this web development framework which provides an insight into the features provided for the implementation of the concepts. In addition, the problem owner would like to know if the benefits claimed that web development frameworks provide are true. The author will develop a prototype system which has a number of web features as a basis for the evaluation.
1.2 Aim
The aim of this project is to choose a web development framework and use it to develop a prototype system which will illustrate the implementation of web application development concepts. The experience gained by the author during this development process will enable an assessment of the claims about these Web Development frameworks. It was agreed that the test case mentioned in the title will be a prototype system which enables a teacher to produce and manage some learning material.
1.3 Objectives
The objectives for this project are to;
● Produce a set of evaluation criteria to assess the suitability of these Web Development frameworks for this project and select one framework.
● Conduct requirements analysis with problem owner to gather the web application development concepts that will be demonstrated in the prototype system.
● Adopt a prototyping approach when developing the system features. Carry out a number of iterations to Design, Implement and Test the prototype.
● Conduct Evaluations: (1) the functionalities provided by the prototype system; (2) if the Web Development framework is suitable for teaching the web development concepts. (3) validate the claims made about Web Development frameworks with the authors own personal experience of using a web development framework;
1.4 Minimum requirements
The following minimum requirements agreed for this project are;
● A set of evaluation criteria which is used to compare the web development frameworks with.
● An evaluative assessment and comparison of a minimum of three emerging web development frameworks.
● Concepts that the prototype system will at least demonstrate; Interaction with the data tier, presentation of content, managing state, and the interactivity between the 3 tiers.
● Functionalities that form the requirements for the learning material. These include;
- Functionality1: Allow a class list to be managed (add, delete, edit and display student details).
- Functionality2: Allow example course questions to be set for students to answer.
- Functionality3: Allow lecture notes to be published on the prototype system.
- Functionality4: Allow messages to be managed (add, delete, edit and display for students).
Additional enhancements agreed for this project are;
● Enhancements made will be the implementation of further functionalities in the system; - Functionality5: Create a poll feature that allows the teacher to receive student’s feedback.
- Functionality 6: Create a blog type feature that allows students to post their comments about certain topics.
1.5 Relevance to Degree Programme
This project is relevant to the author’s degree as it draw from knowledge and skills attained during the three years at the School of Computing and one year’s Industrial placement experience.
As discussed, the project is based around the concepts of Internet System Technologies (SY23) and such as the three tier architecture, so these topics will be very useful for this project.
Technical skills taught in Programming and Database modules could help in developing a system using a web development framework. These include Object Oriented Software Engineering (SE20), Practical Software Development (SE24), Internet System Technologies (SY23), Introductions to Databases (DB11) and Database Principles & Practices (DB21). Various IS modules; Introduction to Information Systems (IS11) and People Centered Information Systems Development (IS33) will assist in the development methodologies and requirements gathering used to complete this project.
1.6 Deliverables
There are a number of deliverables for this project;
● A prototype for evaluating web development frameworks
● The project report.
1.7 Schedule
The initial schedule is in Appendix I and the revised schedule is in Appendix J. These were devised with listing the series of tasks that need to be carried out in Semester 1 and Semester 2 on the left. Initially, the author planned for no project work to be carried out during the Christmas and Exam period to give consideration to exam revision. But, due to the extension deadline provided for the Mid-Project report, project work was done in the first week of the holidays. In Semester Two, the development of the prototype was scheduled for completion by the middle of March due to the deadline of the Progress Meeting. After this meeting, the remaining write-up of the project was completed up until the deadline of 25th April 2007.
2
Background Research
2.1 Web Development Frameworks
2.1.1 The History
Traditionally, web servers published static pages which merely presented text and graphics. These static web pages were requested by the browser, then processed (using HTTP) and finally displayed. Since these early times, inevitability there has been a greater demand for interactivity between the client and the website. There was a need to move the websites away from ordinary content displaying (static) and more towards a dynamic desktop applications feel. This need of dynamic sites led to the development of Web Applications.
Shklar & Rosen (2003) describe a Web Application as “something more than just a website”. It is a client/server application that uses a web browser as its client program, and performs an interactive service by connecting with servers over the Internet (or Intranet). A web application presents dynamically tailored content based on request parameters, tracked user behaviors and security considerations. A web application is created by programming on top of the web. Without web applications, the web simply mobilizes and displays static information (Knuckles & Yuen, 2005).
Web applications operate above the Application layer in The Open Systems Interconnection Reference Model. This model is more commonly referred to as the seven layer OSI model and is what the modern Internet is built upon.
Figure 1.0 – The OSI model (with 1 layer added at the top)
Web applications operate above the Application layer as it is heavily reliant on the services it provides. These services can be provided by Web browsers and Web server software. A new layer may be added at the top of the stack as shown in Figure 1.0 called the Web Application layer.
A typical web application allows the user to view and manipulate the application through a web browser. It may collect data from a client who has inputted data into a form for example. This data is processed on the client side, server side or both; and then returnedto the browser for the client to view. Initially, small programs called Scripts were used to perform HTTP processing whereby they accepted HTTP requests,
Web Application Layer Application Layer Presentation Layer Session Layer Transport Layer
Network Layer Data Link Layer
did some processing on the server and sent back a response (Knight & Dai, 2002). This process was assisted with the creation of the Common Gateway Interface (CGI). CGI standardized how web servers interact and invoke scripts that could carry out such tasks (Casel, 2005). But, it was realized that the CGI approach had many drawbacks. The main one being performance issues as creating interaction across multiple pages was difficult which in turn led to the tracking of the state of the system to be problematical. Creating small and simple applications was straightforward, but maintaining complex sites became difficult and expensive. Technological solutions were developed in the late 1990s to overcome the drawback of CGI. The solutions were either client-side based, which extended the functionality of the browser to cover the issues or the solutions were server-side based. Here, the functionality of the CGI script was integrated onto the web server rather then on the page itself (Doyle & Lopes, 2005). Examples of these technological solutions developed were Java Servlets, Java Applets, HTML tagging systems (such as Coldfusion) and server side scripting systems such as Active Server Pages (ASP) and Java Server Pagers (JSP). However, these solutions were solving immediate problems like the drawbacks of CGI and allowing complex applications to be developed but were creating further problems in doing this. Knight & Dai (2002) believed that these latest technological solutions were encouraging bad software practices such as directly coding access to the database. Efforts were made to solve these problems by introducing “layering” in the complex applications into key separate areas (content, presentation and logic). This also provides boundaries (Separation of concerns) and allows techniques from object oriented programming to be used.
2.1.2 The MVC Pattern
A key example of the separation theory is the Model, View, and Controller Pattern or MVC Pattern for short. This is a software technique which displays the separation of the fundamental sections of an application. When the developer is using the MVC pattern, he/she needs to define each section in terms of their application. Casel (2005) describes this as he says that the Model represents the “domain specific representation of the world the application addresses”. In a library application this would include book, book id and the user’s surname. The developer then needs to define the View which delivers the Model into a Graphical User Interface (GUI) so it can be viewed and used. Finally, the Controller needs to be defined. This will monitor the user’s actions on the GUI and change the information within the model and within the view. The MVC pattern is an important model which many web development frameworks adhere by. This will be discussed in the next section.
The View is kept entirely isolated from the Model and Controller sections, which is a great benefit as it allows for less duplication of effort. This in turn lets the developers deliver applications where the code is easier to write and maintain.
Taken from Casel (2005)
Figure 1.1 – The MVC model from the user’s view point
With the web now being used for mainstream business activities, it meant that the systems needed to be secure. This led to the need of high-level application servers which could function in tiered and layered web architectures (Casel, 2005).
The need for technologies that could use these approaches led to the development of the two application server solutions. These were J2EE and Microsoft .NET. But, these could only be used if they were based around the use of Web Development frameworks.
Fayad & Schmidt (1997) describe a Web Development framework as a collection of reusable, generic and semi-complete elements that can be specialized to produce custom applications. Casel (2005), states that a web development framework allows the developer to make application development easier by supplying them with pre-built components. The framework gives a support structure and provides an infrastructure for quick application development.
As Web Developers have become more experienced they have realized that many parts of a system are generic and therefore be used over and over. This is a major advantage of a web framework as it allows the technique of reusability. This is because the framework has standard components which can be re-used in new applications. The number of web frameworks has soared in the last few years and dozens have been developed. Within the web development community, a handful of frameworks have become very popular. These frameworks are written in a number of programming languages. Python, PHP, Java, Perl, C++ all have there own frameworks.
As discussed, the problem owner wants to know more about web development frameworks and the suitability for students to use one for learning the basic concepts in web application development. Given the wide variety of frameworks available the author needs to assess and compare a number of frameworks and then choose one to develop a prototype system that will do two things. Firstly, the prototype system
will consist of functionalities that manage and produce learning material. Secondly, these functionalities will have to demonstrate a number of web application development concepts.
2.2 Possible Web Development Frameworks
In Chapter 1, the author stated that a minimum of three web development frameworks will be chosen, compared and evaluated to see which one is most suitable to meet the problem owner’s requirements. The problem owner wants to see if there is a framework suitable for her which will help her students to learn the basic concepts in web application development. There is hundreds of web development frameworks available but the main reason for choosing three is due to the amount of time permitted for this project. If there is no time constraints a project can be carried out that studies and evaluates more than three frameworks. But unfortunately, this is not the case for the author in this situation.
Short-listing three frameworks from the list of frameworks was not an easy task. This needed to be done quickly (due to time restrictions) and therefore two main factors were taken into account. The first factor was look at the language source code that the framework uses. Each framework is written in a programming language. So for example, if you want to use Django to develop the system then you would need to know Python as the framework requires you to write python functions and classes. It was decided that one framework would be a Python and one would be a Java based framework as they are more familiar with the author. The problem owner agreed with the author that the third framework be a different language then Python and Java. It would be a good exercise to have a look at a framework which doesn’t use a language that the students may not have encountered before. The second factor used to decide which frameworks to choose was by popularity. Reviews of frameworks were studied as the ones that are well known, received good reviews and had extensive documentation were preferred.
The next three sections will give an introductory background to each of these chosen three frameworks.
2.2.1 Django
Holovaty and Kaplan-Moss (2007) declare that Django is a “high level python web framework that encourages rapid development and clean, pragmatic design”. It is easy to acquire at http://www.djangoproject.com/ as the framework is open source. It was developed for the news corporation World Online as the developers there required a framework that allowed them to easily build complex database-driven web sites which would enable the journalists’ to accomplish tight deadlines. To develop a site using Django, the code has to be written in python.
Holovaty & Kaplan-Moss (2007) state that Django solves many problems that web developers faced before web frameworks existed. A very important issue for the Django developers was the time and ease it
takes to develop a website using Django as a framework. Holovaty & Kaplan-Moss (2007), move onto say that one of their philosophies was “to do all it can to facilitate hyper-fast development”, so that a web application can be built in a matter of hours. As discussed earlier some technologies that were developed to overcome the drawbacks of CGI such as Java Servlets, ASP and JSP solved the immediate problems but carried out bad coding practices. Django loosely adheres to the MVC architecture as the framework strives for loose coupling. This is where the different sections of the application are isolated from each other so that it allows the different sections to be flexible and easily exchangeable which in turn emphasizes the “pluggability” of the framework (Holovaty & Kaplan-Moss, 2007). Django also provide a very powerful resource to the users of the framework. This resource is their templating system, which works in the same way templates work in Microsoft word as in they provide a user with generic tools and building blocks from which they can begin developing with.
Django was short-listed as one of the three frameworks because it is one of the full stacked Python frameworks rather then a lightweight framework such as Albatross and Spark. The framework being full stacked means that it covers most areas for the development of web applications for instance by providing a web server, allowing database access and its persistence to templating and presentation. This is a huge advantage of this framework. The lightweight frameworks differ from the full stacked frameworks as they only provide a subset of tools. Another reason for considering Django is because of its popularity, reviews and documentation. Jones (2006) wrote an article about his experience with two python web frameworks (Django and Turbo Gears). He states that implementing Django is much more straightforward then implementing Turbo Gears. He said “The problems I’ve had with Turbo have been with the underlying components, whilst Django’s templating system has been easy to use”. Django’s website provides masses of documentation such as tutorials about Django and how to get started with the framework. Holovaty and Kaplan-Moss’s online Django book is a great example of this and this is another reason why Django is chosen.
2.2.2 Ruby on Rails
The creator of Ruby on Rails, David Heinemeier Hanson released the framework in 2005 and he states that “it is a fully stacked framework for developing database backed web applications according to the MVC pattern”. Ruby on Rails is also open source and so can be obtained from http://www.rubyonrails.org/.
Ruby on Rails is written in the Ruby programming language. Ruby is a simple and quick object oriented scripting language. A good aspect about ruby on rails is that its infrastructure is very flexible so it is appropriate for many types of web applications. The framework aims to ensure that simplicity is one of its
key characteristics, so this allows applications to be developed with less code than other frameworks may require. Similar to Django, Ruby on Rails is a fully stacked framework as it provides a wealth of features. These include Database support thorough it’s Relational Database Management System (RDBMS), excellent debugging and validation tools. Even though Ruby on Rails has been released recently, it has generated a huge amount of support in the web development community. The Ruby on Rails website provides plenty of documentation and there are a number of books of the framework by David Heinemeier Hanson.
2.2.3 Struts
Struts is a web development framework written in the programming language Java. It is also open source and available at http://struts.apache.org/.
As other web frameworks, Struts provides the developer with a series of tools and components so that they can develop applications in a productive manner.
The Struts framework also adheres to the MVC architecture so it aims for issues to be isolated into the different architecture layers (Model, View and Controller) when developing applications.
The framework exploits many Java technologies like Java Beans, Java Servlets and Java Server Pages (JSP). This is would be an advantage for the author if the framework used was Struts as these Java technologies have been covered in his studies.
One of the reasons Struts was chosen over other Java written frameworks such as Tapestry or String was because it is recognized as the most popular Java web framework. The framework is widely supported and very well documented. Due to its popularity, a Struts project community formed called The Apache Struts Project. This is an open source community which aims to maintain the Struts web framework. Many volunteers form this community and they collaborate with each other to keep the framework effective. With such a large number of developers and beta testers, problems can be characterized and fixed quickly. Another benefit of Struts is that the website provides an excellent support tool. Issue Tracker (JIRA) does exactly what the title suggests; it allows a developer to post and track the issue pending a response.
2.2.4 Conclusion
The author has introduced the philosophy of web development frameworks and also introduced three frameworks which will be assessed and compared in the next chapter. A set of evaluation criteria will be established which will help the author decide which web development framework will be used to develop the prototype system which enables a teacher to produce and manage learning material. This prototype system will show the problem owner what web application development concepts are present and will
help in evaluating whether a web development framework is suitable for the problem owner to use to teach her students.
2.3 Web Application Development Concepts
In section 1.1 it is mentioned that the problem owner wants her students to become skilled in a new development environment. She would like her students to build upon the knowledge and understanding gained in her module of concepts such as the three tier architecture model by applying and practicing them with a web development framework. The module teaches the concepts in web application development and how technologies such as JavaScript, CSS, XHTML (technologies for client-side /presentation tier), server side scripting (business logic tier) and database; are used throughout the three-tier web application architecture. So the problem owner would like to find out how a web development framework could handle and demonstrate a number of these concepts that have been taught. This section will go into detail about the web application development concepts that have been taught. The prototype system that will be developed using the chosen web development framework will provide evidence to the problem owner that these concepts have been considered throughout the development.
2.3.1 The Two-Tier Architecture
There are two popular web architectures which are traditionally used when developing web applications. Firstly, there is the basic two-tier architecture and secondly an extension of this tier is the three-tier architecture which is now widely used. The two-tier architecture can be classified by a web client that presents information and a web server that transfers the information to the client. The two-tier architecture relies on three web standards. HTML is important for programming document subject matter, URLs for naming remote information objects in a global namespace and HTTP for carrying out the transfer (Thomsen & Hansen, 1997).
The architecture consists of three layers; the presentation layer, business logic layer and database layer. The job of the presentation layer is to display visual features of a web page such as buttons, text boxes, entry fields and the page itself. These are often referred to as widgets. Ince (2004), states that the business logic layer carries out any processing of data which is returned by a server, for example, displaying text in a text field. The database layer is located on a server and it is used as a storage medium. The server holds any application data. For example if the application was an E-shop, then entities such as product details or invoices would be stored in the database. Generally, the data needs to be stored permanently, so therefore a suitable data medium needs to be used such as a relational database.
The two-tier architecture is not commonly seen in web applications today as this architecture is mainly for static web pages where very little data processing is required (An example of this is the web server). The
browser represents the presentation and business logic layer and the web server data (web pages, animation, audio clips etc) is stored in the data layer (Ince, 2004). In this example, very little data processing is required as the web page simply displays the information and doesn’t carry out any dynamic actions.
More recently, problems are occurring as web applications require a great deal data processing and experience changes in the functionality during there lifetime. This has meant that the two-tier architecture is becoming superfluous. Clients use software which requires constant managing so that they are kept up to date.
2.3.2 The Three-Tier Architecture
A solution to the two-tier architecture problem was created by developing an extension for the two-tier architecture to become three-tier architecture (Appendix K Figure A). The extension of the web architecture helps serve a broader range of needs rather then simply accessing and browsing static documents.
The three-tier architecture includes the presentation layer which is accountable for the human-computer interface aspect, the business logic layer which is responsible for the processing of data in the application and database layer stores the permanent data. In this new extended architecture, a business logic layer (a server committed to one or more applications which holds code specific to the application) is now in a position to handle the problems that the two-tier architecture was suffering from as it enables the developer to isolate the main part of an application that can change over time. In this middle layer, business objects can be found. These relate to elements found in the application domain. For example, in a sales application, the objects would be invoices, products, prices etc. As shown in Appendix K Figure A, the presentation layer will be communicated with these business objects which in turn communicate with the database layer to acquire the data required.
The three-tier architecture can be observed through two views. First, the Physical view displays the hardware technology involved in the architecture and the Logical view presents the software aspect such as the functionality and features of the application. In the logical view, the presentation layer would present the navigation bars and user form, the application server layer would be the processing and the database layer would be the data itself.
This architecture is widely used in modern web applications as it has a number of advantages. Firstly, it isolates the database technology in the third layer so if the database technology was to change then very little would need to be altered to the business logic layer. Secondly, large amounts of code are removed from the clients and placed on the server. So all the code is stored centrally and not distributed separately
onto clients. McLaughlin (2000) gives a final advantage is that it fits in with modern object oriented ideas as the processing code is associated with objects.
Web architecture, particularly the three tier architecture features heavily in the module taught by the problem owner as the topics covered very closely follow the architecture layout. The topics aim to teach some of the technologies that appear in each layer of the architecture. Also the ways the 3 different layers interact and communicate with each other is also covered.
The module that the problem owner teaches her students has set a platform of knowledge for the students because on the concepts taught. The key is developing these concepts using a suitable web development framework. This is what the problem owner wants the author to investigate.
2.4 Methodologies
Deciding on a suitable methodology is vital to the success of the project. A methodology “is a set of principles that guide a developer to the choice of the particular method suited to a specific task or project” (Jones, 2006). Adhering to a methodology aims for effective project management and organization.
2.4.1 Software Development Methodologies
There are a number of software development approaches available to the author when developing a system using the chosen web development framework. Some of these are discussed in this section which is followed by a conclusion on regarding which methodology will be used when developing the system.
A Prototyping approach involves the development of a working model system that may be partially developed through lacking full functionality. This model is built quickly and allows for particular aspects of the system to be discussed with end-users such as the user interface. (Bennett et al, 2002).
The system is developed incrementally which allows the developer to validate user requirements and enhance refinements that may have been noticed in earlier versions of the system. This approach requires substantial input from the end-users as the developer can’t seriously expect them to simply accept the final system. Interviewing end-users is a good technique as it allows their views and opinions on features, content and functionality to be heard, and subsequently developed into the system. When software prototypes were introduced in the early 1980s, they were known to be very expensive and time consuming to develop. But, since then software tools have been introduced to reduce costs and time for developing prototypes. Hardgrave (1995), states that “over 70 per cent of systems development involves prototyping of some kind”.
Appendix L Figure A presents this iterative cycle approach, the many benefits of this approach and a few drawbacks.
There are two main types of software prototyping; Throw-away Prototyping and Evolutionary Prototyping. ‘Throw away’ is when the prototype is “solely used to help establish and elicit the user requirements” (Hardgrave, 1995). Once the user requirements are established, then the prototype is disregarded and not part of the final solution (Appendix L Figure B). The benefit of this method is that it is a very quick way of receiving initial feedback about the requirements. Evolutionary prototyping is initially similar to throw-away prototype as it is used for understanding the user requirements, but this model is not thrown away and evolves to form the real system implemented for the user. A major advantage of evolutionary over throw-away is that it is quicker and easier for developers to build upon a prototype that already exists rather then starting from scratch if the prototype is ‘thrown-away’. The Evolutionary approach allows user engagement throughout from the initial version to the final version of the system (Appendix L Figure B).
There are a number of alternative methodologies that can be used. One of these is the original traditional methodology used in software development; The Waterfall Lifecycle Model. This model follows a strict, linear series of stages in a cascading style where each of the stages requires input from the preceding one (Appendix L Figure C). In this model, it is not easy for the developer to return to previous stages (for refinements) other then the preceding one. The model permits that once a stage has been completed it is the ‘finished article’. This causes difficulty in making modifications such as to the system requirements. The model assumes that the requirements are captured early on and then frozen, which is not the case in the real world. The model is seen to be inflexible, risky and costly because if the requirements do change or are misinterpreted then it is too late in the process to do anything about that. Another flaw of this model is the lack of user engagement. This can cause a vital functionality for the end-user to be missed out by the developer. This methodology is not suitable for the development of the system because of the strictness, inflexibility and the lack of user involvement in the model.
Another methodology is the Spiral Model (Appendix L Figure D). This was developed by Boehm in 1988 and this supports incremental delivery. Sommerville (1992) describes it as a risk based approach that “manages risk items at regular stages in the project and initiation of actions to counteract these risks”. After carrying out risk analysis, this model incorporates other models that it deems suitable for the situation. It looks into what can go wrong at each stage of the development process. The model is excellent for larger projects but not suitable for a smaller one like this and so will not be considered.
2.4.2 Conclusion
The author believes that a prototyping methodology approach is suitable for developing the prototype system. Both, throw-away and evolutionary are appropriate, but the chosen prototyping methodology is
the Evolutionary Prototyping approach. One of the main reasons why this approach has been chosen is because currently the requirements are vague and subject to change thus ruling out the strict Waterfall Model. The author understands the need for close interaction with the problem owner throughout the development stage, and therefore Evolutionary prototyping is the most suited. Time constraint of the project restricts the use of throw-away prototype as the author would have to develop from scratch after the initial prototype has established the user requirements. This drawback rules out Throw away prototyping.
2.5 Database Technologies
There are a number of database technologies available to the author when developing the prototype system using the web development framework. Most frameworks utilize database technologies such as MySQL and PostgreSQL. MySQL is chosen ahead of the other technologies as it is one of the most popular DBMS, which is widely supported and very reliable (Gilfillan, 2005). Also, another big advantage is that the author has had previous experience in using it, and so this counts in its favour.
2.6 Other possible solutions to the problem
It is important to look if there are other possible solutions to the problem. As stated in Chapter One, the problem the author needs to solve is that the problem owner wants to know more about web development frameworks and how suitable is one for her to teach her students web application development concepts. The author has identified that a solution to this is to develop a prototype using a web development framework which allows a teacher to produce and manage some learning material. An evaluation will be made of the prototype with the problem owner and the experiences gained by the author during this development process will enable an assessment of the benefits claimed by these Web development frameworks. So the solution to the problem is to develop a prototype system which will help evaluate how suitable web development frameworks are for the problem owner. This is a suitable solution as it allows the problem owner to see what functionalities and features a web development framework can have available. This approach would allow the author to give an assessment of the benefits that a web development framework would bring for the problem owner as a significant amount of time will be spent and experience gained in the development process.
Another method of solving the problem would be to research web development frameworks and decide if they will be suitable for the problem owner to use for her students (without the use of a prototype). The drawback of this method would be that none of the frameworks have been put into practice. It is one thing reading about a frameworks capabilities but it’s an entirely different thing in actually putting it into practice as the chosen solution would.
3
Selecting a Web Development Framework
3.1 Introduction
The author has introduced web development frameworks in the previous chapter. This chapter established a set of 4 evaluation criteria used to assess each of the 3 web development frameworks. Each criterion will be introduced and then the author will describe how each web development framework handles this criterion.
3.2 Set of Evaluation criteria to compare Web Development Frameworks.
In Section 2.2, the author identified three possible web development frameworks that are available to use to develop the prototype system. These were Django, Ruby on Rails and Struts. As time is a constraint on this project, it is not possible to develop three systems each using one of these web development frameworks. So a decision has to be made by the author to one out of the three is most suitable to develop a prototype system which enables a teacher to produce and manage some learning material. This will be demonstrated to the problem owner so she can see if web application development concepts are evident and if it would be a suitable to teach for her students.
Ford (2004) states that if a well-informed judgment needs to be carried out such as in this situation, then objective criteria is essentially required to be applied to the available options (the web development frameworks) to see if its suitable for the task to be carried out.
This section will detail a set of criteria which will be used to assess each of the three web development frameworks with. Under each criterion heading below, the author will discuss how each of the three frameworks handles the criterion. Once this assessment has been carried out, a judgment has to be made as to which one of the frameworks will be chosen and in turn used by the author to develop the prototype system with.
3.2.1 Criteria 1: Speed of Development
Time spent on developing an application differs depending on what the developer wants the application to do. Ford (2004) states that the issue boils down to speed of development versus complexity. The more complex the application is, the longer it takes in development time. Development time can be speeded up with the use of a Rapid Application Development (RAD) framework. This is a software development approach and as the name suggest its aim is to deliver software quickly. Maciaszek (2005) states the RAD approach to software development is an attractive option for developers who are working on smaller projects. RAD techniques involve iterative development and the use of prototypes. There are tools available that allow RAD to take place. Django and Ruby on Rails are examples of these, as they are web
based rapid application development tools. Using these allows a web developer to speed up the development of an application.
i) Django
Django developers aim to reduce speed of development by adhering to the Don’t Repeat Yourself (DRY) Principle. This principle states that every piece of knowledge must have a single and unambiguous representation within a system (Cunningham & Cunningham, 2005). This principle encourages rapid development for developers who are using Django for creating their applications. An example of how Django reduces development time is by their free Database API reference which allows the developer to create, update, delete and retrieve data objects.
ii) Ruby on Rails
This is another tool used in Rapid Application Development and also adheres to the DRY Principle. Walton and Hibbs (2007) claim that Ruby on Rails strives to increase the speed and ease of development for the developer. An example where Ruby on Rails speeds up development is through the use of the Active Records Pattern. This is a software design pattern as it is an approach of reading data from a database by inserting the knowledge of how to interact with the database directly into the class that is performing the interaction (Developer Shed, 2007).
iii) Struts
The Struts framework exploits many Java technologies like Java Beans, Java Servlets and Java Server Pages (JSP). This is would be an advantage if Struts is chosen as the author has experience in these Java technologies. A drawback of choosing the Struts framework is that unlike Django and Ruby on Rails, it is not recognized as a Rapid Application Development tool. Therefore, the speed of developing a system using this web development framework for the author would be much longer. Ford (2004) states that the drawbacks of Struts are mainly in its complexity. It is complex because Struts comes with numerous moving parts so it takes time even for an experienced developer to get used to how it connects all together.
iv) Conclusion
Due to the time limitations on this project, the author needs a framework which allows quick development time of the prototype system. Django and Ruby on Rails both fit this criterion as they are both RAD frameworks and both have been declared as a speedy framework by their respective websites. If Ruby on Rails is used for developing the prototype system, then the speed of development will be longer as the author has had no previous experience in programming in Ruby. If the author chooses Django or Struts which are Python and Java languages respectively, then the speed of development will be shorter as the
author has had previous experience in developing systems in these languages. The author has already stated the time limitations on this system development, so a web development framework that has a quicker speed of development will be beneficial.
3.2.2 Criteria 2: Documentation and the Developer Community
Ford (2004) states that “the quality of the documentation of a web development framework is critical”. If documentation is of poor quality, then a developer would not use it as it would not fill them with confidence when using it. The author realizes that when choosing the web development framework to develop the prototype system, he will have to look carefully at the documentation that each one provides and make sure that they are complete and well written. Documentation is often provided in the form of Developer guides or tutorials. These help guide the developer in how to setup and use the different things that a web development framework offers. Ford (2004) moves onto to say that “the quality of the documentation is more important than the quantity”.
It is advantageous for a web development framework to have a strong developer community. Ford (2004) defines this is how easy it is for a developer to get answers to questions he/she has asked. The stronger the developer community the better chance there is that the developers question will get answered as there are more people using the web development framework.
In this section the author will run through what documentation Django, Ruby on Rails and Struts provides for a developer and how strong their developer community is. This documentation is mainly found on their respective websites. Other websites do have documentation about these web development frameworks, but the bulk of the documentation is found on their own websites.
i) Django
Looking at Django’s main website, there is a great deal of documentation available to a developer who wishes to use this web development framework. First of all, there is an installation guide that helps guide a developer in how to install software (such as Python, Apache) that is required for Django to work. The installation guide then moves onto how to install Django itself and how to get a database up and running with Django. It is a common case that a developer who uses a web development framework will want connectivity to a database server. Along with the installation guide, tutorials are available for the developer to follow so that he/she can write their first Django application. This is well written as it is detailed and easy to follow format with code snippets and screenshots that help the developer understand what they are doing. The website also has a detailed FAQ section which answers many question that a developer may have. The Django websites flagship documentation source is their free Online Django book. This delves much further into the features of Django such as their templating engine, generic views and security aspects. A drawback of this book is that it is unfinished as some of the Chapters are labeled
‘TBA’. One of the unfinished chapters is labeled ‘Form Processing’. A criticism of this is that if a Django developer wants to implement some sort of form processing on their system they are on their own as the documentation is unfinished. Django’s developer community is strong as they allow a developer to post questions using their Ticketing System. A developer can post their queries in a ticket which gets reviewed and answered by other Django developers in the community.
ii) Ruby on Rails
Moving onto the Ruby on Rails documentation, their website has less documentation available then the Django website. The Ruby on Rails website points to a number of books that developers can buy and use such as Ruby for Rails by David A. Black. Tutorials are also available that help a developer install and run Ruby on Rails. There also is an FAQ section which has answers of common questions that a developer might have and also workarounds fro common problems. Four Days on Rail is well written documentation compiled by McCreesh (2005). He claims that there are masses of documentation about Ruby on Rails online but the problem (especially for beginners) is that there isn’t a “roadmap” that points out to key pages about Ruby on Rails that a developer may require. But his document does take a developer thorough each step of developing in Ruby on Rails. This would be very handy for the author if he decided to choose Ruby on Rails as the web development framework to develop the system.
The Ruby on Rails developer community can communicate using the Rails mailing list. If a developer was having an issue he/she can post this on the mailing list and wait for a reply.
iii) Struts
Looking at the Struts website, documentation is a plenty. Developer guides are provided on their website to help developers setup Struts and also tutorials are available so that a developer can get a taste of the features of Struts. The documentation is well written but there is not much evidence of screenshots or code which can help a developer if they are struggling with a certain aspect. In terms of developer community, Struts offer the developer to register with their Issue Tracker service which allows a developer to post issues they might have. This is similar to Django’s ticketing system. The Struts community can also communicate using the mailing list provided. In the authors’ opinion, he thinks that the Struts documentation is a case of quantity rather then quality.
iv) Conclusion
The quality of the documentation available is very important to the author. It needs to be clear and methodical from setup instructions to implementing key features that the web development framework offers. The author also wishes that the web development framework that is chosen to have a strong developer community so if issues occur then they can be solved immediately. Looking at the
documentation that each of these three web development frameworks offer, the author believes that Django’s is the better out of the three, as the documentation is well written and a wide range of concepts are covered. Django’s developer community is also very strong. Django’s documentation is all together on their website whereas the documentation for Ruby on Rails and Struts is far and wide on the internet. The author believes that looking at documentation from many different sites will be time consuming and that it is best if all the documentation is in one place as is the case with the Django documentation.
3.2.3 Criteria 3: Source Code
These three web development frameworks are all open source. This means that the source code is available for anyone to browse. This is beneficial for the author as he can look at the code of each of the three web development frameworks before choosing which one he wants to use for the system.
Due to the code being open source, it allows developers to contribute to the code to enhance the web development framework. This may lead to inconsistency in coding guidelines as the code is written by a large number of developers. Looking out for things such as commented out code is important as Ford (2004) states that “this is a bad sign because it shows a lack of organization” and therefore raises questions about other parts of the web development framework.
i) Django
Django is written in Python. This is a major advantage for the author as he has previous experience writing functions and classes in python and also familiar with their coding guidelines. The Django documentation provides masses of code for developers to use for their own purpose. An advantage of python over other languages is the ease and elegance of writing less code to produce an outcome. An example is shown below in figure 1.2, where the “hello world” program is written in fewer lines of code then when it is written in Java.
Taken from UOBC
ii) Ruby on Rails
Ruby on Rails framework is written in the programming language Ruby. It combines syntax from other languages namely Perl and Ada. Unfortunately, the author has had no previous experience with any of these so it is a major drawback for Ruby on Rails being chosen to develop the prototype system. As the author has already stated, time is an important factor in this project so having to understand and learn Ruby from scratch does not seem a viable option.
iii) Struts
The Struts framework is written is Java. This is a major advantage for the author as he has had previous experience with Java and so already understands Java coding principles and concepts. But a drawback of using Struts is that as figure 1.2 above shows that Java requires more lines of code when writing a method then Python.
iv) Conclusion
Choosing a web development framework which uses a language and source code that the author is comfortable with is very important. Choosing Ruby on Rails does not make the author comfortable as time limitations mean that there is not enough time to learn a new programming language (Ruby) from scratch. Choosing Django or Struts would be better as the author knows the language and the source code from previous experiences and therefore is comfortable using either.
3.2.4 Criteria 4: Innovative Features
Web development frameworks offer features that help a developer develop a web application. Ford (2004) states that some of the web development frameworks have innovative features that makes them easier to use. In this section, the author will run through each of the three web development frameworks and examine what innovative features they can offer to a developer.
i) Django
Django provide a wide range of innovative features that help developer lives easier. Firstly, there is the Automatic Administrative Interface (AAI). If the system that is to be developed will have data that is created, retrieved, updated and deleted (CRUD) from a database then this feature allows the developer to create an interface for the user(s) to do this. Holovaty & Kaplan-Moss (2006) describe this feature as a method of removing the tedious work of creating interfaces for people to add and update content. Holovaty & Kaplan-Moss (2006) call this feature “an opt-in thing”. This means that the feature is not activated by default, so the developer needs to tell Django to activate it. A second innovative feature with
Django is that it has the facility to work with a number of Databases. These include PostgreSQL, MySQL and SQLite. This is strong feature as a developer may want freedom in choosing which database he/she wants to use. Django has another feature called the Object-Relational Mapper. This feature allows a developer to describe the database schema (i.e. fields, primary keys, field length) in Python Code. The example below shows some python code written which creates 3 fields in a table with their data type and lengths;
Forename = models.CharField (maxlength=25)
Surname = models.CharField (maxlength=25)
Email = models.EmailField ()
Another feature of Django is their Templating System. Holovaty & Kaplan-Moss (2006) state that they included this feature to help developers who use HTML to feel more comfortable. Templates are simply a text file which contains variables and tags. Variables are replaced with values when the template is evaluated. Tags control the logic of the code within the template. As these templates are simply text files they can be opened in other software tools such as Adobe Dreamwever, which then allow the look and feel of the templates to be made more appealing.
ii) Ruby on Rails
Ruby on Rails provides a few features for a developer. One of these is that like Django, Ruby on Rails supports a wide range of Databases. These include PostgreSQL, MySQL and SQLite. Active Record is another feature that Ruby on Rails contains. This is their Object-Relational Mapper, similar to Django’s (Guzewich et al 2006). Ruby on Rails has a feature which allows developers to setup and install the framework instantaneously. This is done using an application called Locomotive. This is designed to be self contained, which means that it includes everything you need to run the web development framework from Ruby, Rails, SQLite (for databases), rubygems and database bindings. This would allow the developer to setup the framework quickly as all the required parts are together and don’t have to be installed separately like for other web development frameworks.
iii) Struts
One of Struts main strengths is it’s built in Validator feature. This feature lets a developer validate input that has been entered into forms. If the validation in a single field in the form fails, the application redisplays the form so that the invalid entry can be corrected. Holmes (2004) states that the Validator interface removes much of the headache associated with handling data validation.
The Struts framework also has a very good Templating System which allows the developer to customize the look and feel of the system.
iv) Conclusion
Each of the web development frameworks each provides a number of innovative features that would be useful for the author if that web development framework is chosen. The main reason why these features are implemented by the web development framework developers are to make other developers tasks easier and in turn speed up their development time.
3.2.5 Summary
In the previous section, the author has presented a number of criteria which were used to weigh up each of the three web development frameworks. After carrying this out, the author needs to choose which one will be used to develop the prototype system which enables a teacher to produce and manage some learning material. This prototype system will be used as a case study for web development framework evaluation which will be shown to the problem owner to see if web development frameworks are suitable for her students to use.
The author has decided on using Django as it has several advantages over the other two options. Firstly regarding Speed of Development, Django is a RAD tool and is written in Python. Both of these factors will play a major role in the speed of development as the author has previous experience with Python and therefore is up to speed with python concepts and practices. The author has not experienced Ruby, which is required for using Ruby on Rails. This means that development time if Ruby on Rails is chosen would be much longer as the author would need to practice and understand Ruby before moving onto Ruby on Rails.
Django has well written documentation and a strong developer community. These two are very important for a developer as once development has started, issues can arise and these two play a big role in solving the issues. Similar to the speed of development criteria, Django came out on top in the Source Code criteria. The main reason for this is that the author is comfortable with Python (Django) rather then Ruby (Ruby on Rails) or Java (Struts). Finally, in the innovative feature criteria, Django demonstrated a number of features that can be very useful for the author when developing the system. Ruby on Rails and Struts both had innovative features also, but with Django looking more attractive in the nearly all of the criteria fields, this is why it is chosen.
4
The Case Study – Analysis of the prototype
4.1 Introduction
Now that Django has been chosen as the web development framework the author needs to show the problem owner what a web development frameworks like Django can offer and how it deals with web development application concepts. The case study (in the chapter title) refers to the development of a prototype system that allows a teacher to produce and manage learning material. This learning material can then be viewed and used by students. But, more importantly this case study needs to demonstrate web application development concepts.
This chapter covers two main sections. The first section deals with why there is a need for a prototype system. The second section is much larger as it details the requirements analysis that the author carried out with the problem owner.
4.2 The need for a prototype
A few options are available on the method of presenting to the problem owner. Firstly sitting down with the problem owner and discussing the finer points of web development frameworks and how they teach web application concepts can be carried out. But, this method is uninteresting and tedious as it may not give a true reflection on web development frameworks as they have not been used. The best option to take is to develop a prototype system using Django. There needs to be a concrete deliverable for the problem owner so that the features of Django and how the functionalities developed demonstrate web application development concepts. This would allow a true reflection on web development frameworks to be provided to the problem owner as one of them has been experienced by the author. The author will not get much about a web development framework like Django by simply just researching and reading about it. Using Django and its features would help provide the author with further insights and experience about web development frameworks. This would then help in the evaluation of web development frameworks with the problem owner as the author can put across his own thoughts having experienced using Django. The data that is entered into the prototype system is trivial and not important. The important issue is to find out if the functionalities that are developed demonstrate what the problem owner is looking for; web application development concepts.
4.3 Requirements Analysis for the prototype
Bennett et al (2002) states that before designing the software the developer needs to capture specific requirements that will need to be developed in the system. Requirements analysis requires the involvement of the problem owner. Maciaszek (2005) describes this as a very important step as it is required to eliminate contradiction and overlapping of requirements. One of the leading requirements gathering