Volume 8, No. 3, March – April 2017
International Journal of Advanced Research in Computer Science
RESEARCH PAPER
Available Online at www.ijarcs.info
© 2015-19, IJARCS All Rights Reserved 723
Improving Design of Library Management System using Design Patterns
Pankhuri Jain, Sourav Shaw, and Manjari Gupta*
Department of Computer Science, Institute of Science,
Banaras Hindu University, Varanasi, India
Abstract: Designing a system is perhaps the most critical factor affecting the quality of the software. No design methodology reduces the process
of design to a sequence of mechanical steps. It only provides guidelines to aid the designer during the design process. Fortunately, GOF [2] and
other researchers proposed many design patterns that give us solution of general design problems. Design decisions of experienced designers are
recorded in form of design patterns. Thus each design pattern focuses on a particular object-oriented design problem or issue. If these design
patterns are used by a novice designer, the obtained system design would be much better. In this paper, we designed a very simple library
management system using object oriented approach without design patterns. All the defects are shown and this design is improved using few
design patterns. We used three design patterns: Factory, Facade and Template Design Patterns in this study.
Keywords: System Design, Design problems, Design Patterns, Façade, Factory, Template
I. INTRODUCTION
Demand of software has been increasing day by day.
Therefore, there is more demand for software development
paradigm that improves quality and productivity of software
development. A Design pattern [1]
Problem Statement and Analysis: We have taken a very
simplified version of library management system that
manages the catalog of a library. It performs functions such
as managing book transaction and creating user. It also
include function that enable users to search their resources
in library. To analyse and understand the system under study
we will develop a model using object-oriented approach.
“Fig. 1” shows the static structure of the program to be
developed using this design. Whenever MemberRecord
class requests for a book, Librarian class instantiates an
instance of Book class, issuing it to the requesting
MemberRecord. Also, MemberRecord pays the Bill created
by Librarian.
is a general repeatable
solution to a commonly occurring problem in software
design. A design pattern isn't a finished design that can be
transformed directly into code. It is a description or template
for how to solve a problem that can be used in many
different situations. They guarantee the creation of
transparent structures which allow software to be easily
understood, extended, and reused. The description of design
patterns [2] provides information about the structure, the
participant’s roles, the interaction between participants and,
above all, the intent for which they should be used. In this
paper, we will be implementing design patterns in library
management system to improve its design that is obtained
without using design patterns. We choose the Library
management system as a domain because of its simplicity.
Further we designed the system for few requirements to
show the objective of use of design patterns in design for
improvement.
In the next section, we will explain the system under study-
Library Management System, its design without using
design patterns and defects in this design. In section 3, we
will describe three design patterns: Factory, Facade and
template design patterns that are used in this work to
improve the design. How the design proposed in section 2 is
improved using these three design patterns are shown in
section 4. Lastly we conclude in section 5.
II. LIBRARY MANAGEMENT SYSTEM
The system design shown in “Fig. 1” is quite complex and
unreadable. Class diagram of Library management system
creates a lot of duplication as multiple instance of Book
class are instantiated with same property and different
attributes such as Textbook, Journal and Magazine. Further,
Librarian need to know details of Book class, hence there is
tight coupling between these two classes creating
inflexibility. Also, MemberRecord is exposed to complex
details of the system further reducing modifiability. Hence,
design pattern would be utmost solution for handling
arrangement of system code, but it would also make code
reusable. So, we would use design patterns to make it
flexible and more understandable. We identified the scope
of use of three design patterns described in the next section.
In the book class multiple classes such as magazine, journal
and textbook are required to be created thus it would be
better to use here factory design pattern. We can use facade
design patterns to reduce the exposed complexity to
MemberRecord class. Further to differentiate different types
of members like students, teachers, non teaching staffs we
can use template design pattern. In the next section these
three patterns are described in little detail.