KEMBAR78
Use of Web Application Frameworks in The Developme | PDF | Model–View–Controller | Ruby On Rails
0% found this document useful (0 votes)
20 views6 pages

Use of Web Application Frameworks in The Developme

The paper discusses the advantages of using web application frameworks for developing small applications, contrasting it with traditional methods that often lead to non-structured development. It highlights the benefits of frameworks such as faster development, enhanced security, and better code organization, while also addressing common concerns like complexity and learning curves. The authors present a case study comparing two versions of an application, one built from scratch and the other using the CodeIgniter framework, ultimately advocating for the use of frameworks even in smaller projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

Use of Web Application Frameworks in The Developme

The paper discusses the advantages of using web application frameworks for developing small applications, contrasting it with traditional methods that often lead to non-structured development. It highlights the benefits of frameworks such as faster development, enhanced security, and better code organization, while also addressing common concerns like complexity and learning curves. The authors present a case study comparing two versions of an application, one built from scratch and the other using the CodeIgniter framework, ultimately advocating for the use of frameworks even in smaller projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/221412761

Use of web application frameworks in the development of small applications

Conference Paper · January 2011


Source: DBLP

CITATIONS READS

35 4,984

2 authors, including:

Irena Petrijevcanin Vuksanovic


National and University Library, Zagreb, Croatia
5 PUBLICATIONS 46 CITATIONS

SEE PROFILE

All content following this page was uploaded by Irena Petrijevcanin Vuksanovic on 14 April 2015.

The user has requested enhancement of the downloaded file.


Use of Web Application Frameworks in the
Development of Small Applications

Irena Petrijevcanin Vuksanovic, Bojan Sudarevic

National and University Library in Zagreb


Zagreb, Croatia
ivuksanovic@nsk.hr, bsudarevic@nsk.hr

Abstract - With the emergence of modern software As a solution for these problems, new software
development methodologies and related web application development methodologies that enable more dynamic
frameworks, many developers started using them because of organization of development process have emerged. On
their advantages, such as faster development, enhanced the technical side, the implementation of these
security, availability of useful and standardized libraries, methodologies is facilitated through modern web
simpler organization of work in development teams and application frameworks.
clearer structure of code thanks to the strict conventions
and use of design patterns that encourage separation of However, these new solutions are usually used in large
domain logic, user interface and data processing model. projects, while small applications are still often developed
However, because of perceived disadvantages of in a mostly non-structured manner.
frameworks - complexity and overhead of framework code,
learning curve, possible undetected security vulnerabilities,
II. SOFTWARE DEVELOPMENT METHODOLOGIES
etc. - most developers choose to use them only for
development of large and complex applications, while they The most prominent among the modern software
develop small applications from scratch. In this paper we development methodologies are Rapid application
compare development process of two versions of the same development and Extreme programming.
application – first developed in pure PHP, and second
developed using CodeIgniter web application framework. A. Rapid application development
Based on results of the comparison, we argue that, contrary
to the common practice, use of web application frameworks Rapid application development is a set of practices and
is justified in development of small applications. methods tailored toward [1]:
 Reduction of development schedules.
I. INTRODUCTION  Reduction of perceived development schedules by
Over the last two decades, many trends in the software making progress more visible.
development have emerged, among which the most
prominent are:  Reduction of schedule volatility, thus reducing the
chance of a runaway project.
 A growing number of applications, including
Its main characteristic is minimal planning in favor of
complex applications such as office suites, are
rapid prototyping. The planning and prototyping phases
developed as web applications (“software as a
are interlaced with writing the software itself. This method
service” model).
enables more dynamic development process and faster
 Users expect access to the applications in early achieving of basic software functionality, which is
(alpha and beta) phases of development. expanded with new features through iterative repeating of
all phases.
 Users expect new features to be added constantly
and often. B. Agile development and Extreme programming
As a result of these trends, development cycles have Agile development is a collection of programming
shortened, and the developers are under increasing methodologies that follow principles defined in the
pressure, since they have to satisfy conflicting interests: Manifesto for Agile Software Development [2]:
new version (with new features) should be released
frequently, but at the same time application must remain  Individuals and interactions over processes and
stable and well structured. In some cases, the result is the tools.
prolonged beta phase, since the developers can not  Working software over comprehensive
guarantee the stability of the application (example of this documentation.
is Gmail, Google's webmail service that was more than
five years in the beta phase).  Customer collaboration over contract negotiation.
 Responding to change following a plan.
Extreme programming, the most popular agile languages) and Zend (PHP).
methodology, is geared toward eliminating requirements,
design, and testing phases as well as the formal documents B. “Don’t repeat yourself “ principle
that go with them. Analysis, design, coding, testing, and “Don’t repeat yourself” principle is stated as "every
even deployment phases should occur with rapid piece of knowledge in a system should be expressed in
frequency [3]. just one place [5]. It is aimed at reducing repetition in
Emphasis is also on independence of the team software code, test plans, the build system, database
members that, after initially meeting at beginning of each schemas and documentation. This principle is
phase, set their own individual goals and interact implemented in frameworks through libraries aimed at
informally and only when needed. solving the most common tasks, such as data validation,
session and cookie management, file uploading, user
III. WEB APPLICATION FRAMEWORKS authorization and authentication, etc.
Software framework is an abstraction layer that C. “Convention over configuration” concept
provides software libraries that offer solutions for most
common programming problems, with the goal of Frameworks that follow "convention over
eliminating repetitive operations. configuration" concept are enforcing defaults in most
aspects of application, e.g. class, method, variable,
Web application frameworks are specifically geared constant and database table names, file structure, coding
toward development of web applications and services. style, etc.
They facilitate the use of the aforementioned software
development methodologies. Compliance with established conventions simplifies
software development and code maintenance, especially
when working in teams, as all team members follow the
A. Evolution of web development
same rules. On the other hand, too strict enforcement of
In the early 1990s, most web pages were static HTML conventions threatens the flexibility of applications.
documents (with the exception of CGI applications that
were usually written in Perl). In the mid-1990s new D. Architectural patterns
languages, such as ASP, ColdFusion and PHP, were
developed specifically for use in the web. Shortly after Architectural patterns are general reusable solutions to
that, first libraries aimed at solving common tasks specific commonly occurring problems in software design. They
for the web development (e.g. generating HTML) were offer well-established solutions to architectural problems,
created. Collections of these libraries can be considered as help to document the architectural design decisions and
early Web-application frameworks. facilitate communication between developers through a
common vocabulary [6].
In 2004, Ruby on Rails framework was released. Ruby
on Rails is considered the most prominent web application Model-View-Controller pattern (Fig. 1) promotes
framework of the latest generation [4]. It is written in, and separation of domain logic (controller), user interface
works on top of, the Ruby language. Characteristics of (view) and data processing (model), as opposed to mixing
Rails are “don’t repeat yourself” principle, “convention HTML, SQL queries and domain logic in the source code
over configuration” concept and use of several (Fig. 2). In modern web application frameworks this
architectural patterns, such as Model-View-Controller and pattern is usually implemented through folder structure.
Active Record. After Ruby on Rails, similar frameworks View files are responsible for showing data to the users of
written in other languages followed, such as Django application. No programming logic or database queries
(Python), Catalyst (Perl), ASP.NET MVC (.NET can be run here, though data access may occur in these
files. They are structured as HTML files and usually use a
template language to present dynamic data, passed from
the controller. Model files are responsible for fetching,
modifying, inserting, and removing data from the
database. Controller files calls and fetches data from the

Figure 1. Model-View-Controller web application Figure 2. Non-structured web application


models, loads the data and passes it to the views, and Although such reasoning takes into account both
sends the results to the user [7]. advantages and disadvantages of frameworks, it obviously
gives greater importance to disadvantages, as if
Second architectural pattern used in most modern web advantages simply do not apply in the case of small
application frameworks is Active Record, used for applications. It also fails to consider factors such as
accessing data in relational database. Table is wrapped maintenance and future development and possible growth
into a class and an object instance is tied to a row in the of the application and intangible factors such as personal
table. Active Record class usually has methods that satisfaction of developers.
implement SELECT, INSERT, DELETE and UPDATE
statements [9].
IV. EXAMPLE APPLICATION: ISVU2ALEPH
In most frameworks Active Record class supports all
major databases, which enable easy change of database A. Aleph implementation project
without modifications in queries, usually by changing one
Within the project of implementation of the new
setting in the configuration file.
library management software, National and University
Library in Zagreb and the libraries of 24 faculties of the
E. Advantages and disadvantages of web application University of Zagreb and 14 institutes, have moved to the
frameworks Aleph Integrated Library System. Successful
When starting a development of a web application, implementation depended in large part on the transfer of
developers and project managers make certain decisions data and settings from the existing systems into the new
on the development process. One of those decisions is one. While bibliographic data from most of the libraries
whether to use web application frameworks or to develop was transferred relatively straightforwardly, the transfer of
the application from scratch. Key advantages of web administrative data (including patron records) represented
application frameworks include [8]: a greater challenge [10] since it is not standardized and
varied greatly between existing systems.
 A complete environment for Web site
development, interoperability, security, and In the case of the faculty libraries of the University of
maintenance so that developers do not have to Zagreb, most of the patron (student) data was imported
build customized systems from the ground up into Aleph from the Higher Education Information System
every time they launch a new site. (ISVU), network oriented modular system for data
processing and interaction within the higher education
 Standards, consistency, and predictability. system [11]. National and University Library has assumed
 Software components or building-blocks so that the role of coordinator of the Aleph implementation
developers can share and reuse code. process and, accordingly, the obligations related to,
among others, training of staff, monitoring of the system,
 A model or standard architecture that allows easy maintaining a support system for the users, analyzing data
visualization of how the entire system works. loads, ensuring data security, collecting and tracking of
bibliographic data for conversion, as well as processing
 Reusable and thoroughly tested code in the
and importing patron data from ISVU to Aleph.
libraries, classes and functions.
List of all students enrolled in the current academic
 Well-structured code using architectural patterns. year at the University of Zagreb is provided by ISVU to
Key disadvantages of web application frameworks National and University Library as a text file, in which
include: each line represents a record/student. Each record contains
13 delimiter-separated values, including student's name,
 Complexity and overhead of framework code, in surname, postal address, e-mail address, name and code of
some situations visibly reduces application the faculty, the date when student status expires, and
performance and creates greater burden for the several ID numbers. Conversion of ISVU data into the
underlying hardware. format suitable for import into Aleph database, as well as
 Security vulnerabilities in framework code affects the first phase of the import itself, was done by the
applications built using it. application developed by National and University Library,
ISVU2Aleph.
 High learning curve.
B. ISVU2Aleph features
 Strict conventions hinder the application
flexibility and developer’s creativity. Following features are supported in ISVU2Aleph:
Advantages clearly outweigh disadvantages when  User authorization of the National and University
application that is being developed is large and complex Library staff member who perform data import.
and developed by a team. On the other hand, if the
 Loading the ISVU data into the application.
application is small and simple and developed by one
developer or a small team, common perception is that the  Saving data into ISVU2Aleph database for later
benefits that frameworks bring is not sufficient to justify processing.
their use.
 Conversion to UTF-8.
 Detecting and fixing potential errors (e.g. broken Successful test of importing data from ISVU to
lines). ISVU2Aleph, and then exporting to XML file were
performed in July 2010. XML file was then manually
 Editing data. uploaded to Aleph server and imported into Aleph patron
 Generating or manually adding and saving to database using PLIF without errors.
database data that is not present in ISVU (other After the test, it was decided to further simplify the
patron personal data, and data specific for the procedure by enabling uploading of XML files through
libraries and Aleph) but is necessary for the ISVU2Aleph. It was also decided to make a switch to
functioning of the library. MySQL database, because of its robustness and flexibility
 Export of data from ISVU2Aleph database to in comparison with SQLite.
XML file. Version 2.0 was developed in August 2010 by the
 Uploading XML file to Aleph server, where it can same developer, in 11 hours of coding during one day. It
be imported into Aleph database through Aleph’s was written in PHP, using CodeIgniter framework and
Patron Loader Interface utility (PLIF). purely object-oriented coding style. It was successfully
tested in late August, and subsequently used for first
production import in which data on 64842 students –
C. Technologies used in development of ISVU2Aleph patrons of the faculty libraries of the University of Zagreb
ISVU2Aleph is a web application, written in the PHP – was imported into Aleph. Thanks to the consistent use of
language. framework’s capabilities and strict adherence to its
It was decided to develop ISVU2Aleph as a web conventions, application’s architecture is identical to the
application because of easy deployment – web browser one shown in Fig. 1.
and Internet connection are the only requirements and
nothing has to be installed on the user’s computer. PHP – E. Comparison of the development processes
scripting language originally designed to create dynamic It should be noted that any attempt to compare
web content – has been chosen mainly because of its development processes of versions 1.0 and 2.0 is
flexibility and simplicity, although other advantages influenced by the fact that functionality was mostly
exists, such as support for all major operating systems and known during development of version 2.0. While
databases [12]. comparison would be much more relevant if two versions
were developed in parallel, some – at least hypothetical –
As a database, SQLite was used in the beginning, but
comparisons can be made.
was later replaced with MySQL. ISVU2Aleph is installed
on the web server running Debian GNU/Linux operating For instance, change of the underlying database from
system and Apache HTTP Server. SQLite to MySQL would be reduced to one minute
needed to modify four settings in the configuration file, if
Finally, in the development of version 2.0,
the application has been developed using CodeIgniter
CodeIgniter, modern web application framework, written
from the beginning, thanks to CodeIgniter’s Active
in PHP, was used. CodeIgniter supports Model-View-
Record Class (not counting time spent on programming
Controller architectural pattern, provides Active Record
the database, since that time is identical for both methods).
database abstraction layer with support for all major
On the other hand, the same change in the version written
relational database systems, follows “Don’t repeat
without using framework (performed later, solely for the
yourself” principle by offering numerous useful classes
purposes of this paper) took two hours of developer’s
and helpers and promotes “Convention over
time.
configuration” concept by offering (but not enforcing) set
of default configurations. Unit testing is also an area of development where web
application frameworks offer significant advantage.
D. Development process Software unit testing, defined by the IEEE as a process
Development of ISVU2Aleph was done during the that includes the performance of test planning, the
summer of 2010. Two versions were developed in that acquisition of a test set, and the measurement of a test unit
period. against its requirements [13], is facilitated in CodeIgniter
by the Unit Testing Class. In the version programmed
In June 2010 functionality and workflow of the without the use of CodeIgniter, unit testing was performed
application was defined by the manager of the Project manually (although it should be noted that it could have
team for implementation of Aleph. Version 1.0 was been done by using specialized unit testing framework,
developed in June, in 19 hours of coding over three days, such as PHPUnit).
and was written in pure PHP, without the use of a
framework, by a single developer. It used SQLite database F. Code maintenance and future development
as a backend. It included all the aforementioned features,
Probably the greatest advantages of the version
with the exception of uploading XML file to Aleph server.
developed using CodeIgniter framework are in the area of
Coding style was purely procedural, with PHP code and
code maintenance and future development of the
SQL queries embedded in the HTML code (the structure
application, as it has already been shown in the database
is identical to the one shown in Fig. 2).
switch example.
Code maintenance is considered by most developers as However, we believe that the aforementioned
complex, technically difficult, “dirty” and tedious work advantages are equally applicable in the development of
[14], especially if the code being maintained has been small applications, especially if the fact that the future
written by another developer. development of the application is usually not possible to
predict is taken into account.
Use of CodeIgniter in development of ISVU2Aleph
reduces time spent on code maintenance and future
development in many ways: REFERENCES
[1] S. McConnell, “Rapid development: Taming wild software
 In the likely scenario in which the development schedules”. Remond, Microsoft Press, 1996.
will once be continued by another developer, new [2] Kent Beck et al., "Manifesto for agile software development",
developer will spend significantly less time 2001. URL: http://www.agilemanifesto.org, accessed February 7th
studying existing code of the version written in 2011.
CodeIgniter than he would spend studying the [3] J. Shore and S. Warden, “The art of agile development”.
code of the version 1.0, thanks to the Model- Sebastopol, O’Reilly Media, 2007.
View-Controller architecture and other coding [4] B. Askins and A. Green, “A Rails/Django comparison,” in 2006
conventions. Open Source Developers' Conference (December 2006).
Melbourne, 2006, URL:
 Future improvements that should otherwise be http://osdcpapers.cgpublisher.com/product/pub.84/prod.29/m.1/fid
=174194/Askins%2CGreen-6934-RailsVsDjango.pdf (accessed
programmed manually (such as protection February 13th 2011).
measures against future hacking attack techniques [5] S. Ruby, D. Thomas and D. Heinemeier Hansson, "Agile web
and yet unknown vulnerabilities) may be development with Rails". Raleigh, The Pragmatic Programmers,
implemented in existing CodeIgniter methods and 2008.
functions in future versions of the framework, and [6] P. Avgeriou and U. Zdun, "Architectural Patterns Revisited - A
may only require upgrade of the framework to a Pattern Language," in Proceedings of 10th European Conference
newer version. on Pattern Languages of Programs (July 2005). Irsee, pp 1-39.
[7] J. Argudo Blanco and D. Upton, “CodeIgniter 1.7”. Birmingham,
 Thanks to the numerous libraries and helpers Packt Publishing, 2009.
included in CodeIgniter, same functionality is [8] T. J. Shelford and G. A. Remillard, “Real web project
usually achieved with less code, so it is more management: Case studies and best practices from the trenches,”
easily maintainable. The same is true for features Boston, Addison-Wesley Professional, 2002.
that will be added in the future. [9] M. Fowler, "Patterns of Enterprise Application Architecture”.
Reading, Addison-Wesley Professional, 2003.
[10] I. Petrijevcanin Vuksanovic and B. Sudarevic, “Migration process
V. CONCLUSION and data modeling in National and University Library in creating
ILS,” in Proceedings of ELMAR-2010 (September 2010). Zadar,
Web application frameworks offer numerous technical 2010, pp. 155–158.
and organizational advantages (e.g. faster development
[11] M. Baranović, M. Borčić, D. Hunjet, V. Kalafatić, D. Kranjčec, J.
and cleaner application structure) over classical Mesarić and B. Peh, “Informacijski sustav visokih učilišta”.
development methods. Also, programming using web Zagreb, Ministarstvo znanosti i tehnologije Republike Hrvatske,
frameworks is more comfortable for developers, since 2003.
they do not have to deal with many common [12] R. Lerdorf, K. Tatroe and P. MacIntyre, “Programming PHP”.
programming tasks. Sebastopol, O’Reilly Media, 2006.
[13] “IEEE Standard for Software Unit Testing”, IEEE, 1986, URL:
Regardless of the above advantages, the development http://www.cs.tut.fi/kurssit/OHJ-3500/dokumentit/IEEE-STD-
of small applications is usually done without frameworks, PDF/std1008-1987.pdf (accessed March 26th 2011).
due to their perceived disadvantages. [14] R. L. Glass, "Software Conflict 2.0: The Art and Science of
Software Engineering", Atlanta, developer.* Books, 2006.

View publication stats

You might also like