Ruby language. Traditional frameworks such as
Struts require massive amount of configuration files,
which leads to low productivity and low quality. On
the other hand, Ruby on Rails emphasizes “conven-
tion over configuration,” reducing the need of config-
uration files and increasing productivity. For exam-
ple, ActiveRecord O/R mapper generates appropriate
class from database schema definition. Ruby on Rails
allows easy development and deployment of web ap-
plication based on MVC model.
In this chapter, we compare our lightweight
framework with Ruby on Rails in terms of the four
problems identified in Section 2: Learning cost; dis-
tribution and integration; requirement changes; and
coupling of user interface and business logic.
5.1 Learning Cost
With our lightweight application framework, no pro-
gramming knowledge is required for page designers.
Our lightweight methodology centers on page tran-
sitions, with each page corresponding to its database
table and business logic. Therefore, heavyweight O/R
mapper such as ActiveRecord is not needed. Heavy-
weight IDE like Eclipse or NetBeans is also unnec-
essary because editing and debugging support is pro-
vided by the lightweight framework itself. As a result,
learning cost of our framework is cheaper than that of
Ruby on Rails.
5.2 Distribution and Integration
It is mandatory to clearly define the scope of respon-
sibilities of each member in web application develop-
ment project. With our approach, the scope is defined
by page. Once page transitions are fixed, each mem-
ber clearly understands what to do. On the other hand,
modeling is essential prerequisite on Ruby on Rails,
which is based on MVC model. Scope of responsibil-
ities are made clear only after the model has been de-
veloped and entire class relationship has been fixed.
This is typical bottleneck of Ruby on Rails project.
Moreover, when it becomes necessary to refactor the
implementation of the model and controller, the cost
is quite expensive.
5.3 Requirement Changes
As discussed in Section 2, requirement change or
scope creep is major reason why it is difficult to main-
tain MVC structure in the course of web application
development project. Ruby on Rails enforces strict
MVC model by “convention over configuration.” Re-
sulting database schema and page transitions must
conform to the model. If requirement specifications
are clear and stable from the beginning of the project
to the end, high efficiency and quality can be ex-
pected.
However, in a project where MVC structure can-
not be distinctively defined at the beginning, or where
requirement changes occur frequently, it is common
that Model, View and Controller are getting mixed
during the course of the development. Since Ruby
on Rails requires code that conforms to the frame-
work convention and MVC structure, major refactor-
ing must be performed when requirements change. In
reality, many projects circumvent the major refactor-
ing and tend to do quick and dirty fix of code, result-
ing in the deterioration of clean MVC structure. This
is sometimes called “pseudo-MVC.”
On the other hand, our lightweight methodology
abstracts web application as a set of page transitions.
In our lightweight framework, MVC is redefined as
follows: Model is transaction module, View is HTML
template, and Controller is the framework itself. We
call it lightweight MVC model. With lightweight
MVC model, scope of responsibilities is made clear
by assigning each programmer a set of pages. In addi-
tion, lightweight MVC model does not prevent devel-
opers from using common libraries or object-oriented
data model.
5.4 Coupling of User Interface and
Business Logic
Now we compare our approach with Ruby on Rails
in terms of how much programmer has to get in-
volved in page design. On Ruby on Rails, page tem-
plate is .rhtml file, which embeds Ruby constructs
into HTML. When page designer edits the .rhtml file
with design tool such as Dreamweaver, the designer is
required to understand the Ruby language and .rhtml
tags. For example, Figure 4 is .rhtml form that dis-
plays patient name, and accepts entry of birthday.
Figure 5 shows Dreamweaver screen editing
the .rhtml file. Even in this simple example,
Dreamweaver is unable to render the form correctly
because it does not understand .rhtml tags.
On the other hand, using our lightweight frame-
work in Perl language, Figures 6 and 7 show the
form code and Dreamweaver screen respectively.
Dreamweaver appropriately renders the form because
unknown tags or tags in HTML comments are not
used.
Since we do not introduce new tags in our HTML
template, page designer can use existing tools like
Dreamweaver. In addition, no knowledge of Perl is
required for the designer.
ICEIS2012-14thInternationalConferenceonEnterpriseInformationSystems
256