Praveen.Gupta et al. / International Journal of Engineering Science and Technology
Vol. 2(6), 2010, 1684-1689
Spring Web MVC Framework for rapid open
source J2EE application development: a case
study
Praveen Gupta
Research Scholar, Singhania University
Pacheri Bari, Rajasthan, India
Prof. M.C. Govil
Govt. Mahila Engineering College
Ajmer, Rajasthan, India
Abstract— Today it is the highly competitive for the development of Web application, it is the need of the time
to develop the application accurately, economically, and efficiently. We are interested to increase productivity
and decrease complexity. This has been an underlying theme in a movement to change the way programmers
approach developing Java 2 Platform, Enterprise Edition (J2EE) Web applications. Our focus is how to
create J2EE-compliant software without using Enterprise Java Beans (EJB). The one of the best alternative is
the Spring framework, which provides less services but it is much less intrusive than EJB. The driving force
behind this shift is the need for greater productivity and reduced complexity in the area of Web application
software development and implementation. In this paper, we briefly describe spring underlying architecture
and present a case study using Spring web MVC Framework.
Index Terma: MVC, Spring, XML
I. INTRODUCTION
Web is the very complex issues these days. Since the desire of the companies and organizations are increasing so the
complexity and the performance of the web programming matters. Complexity with the different types of
communication devices is increasing. The business is demanding applications using the web and many
communication devices. So with the increase load of the data on the internet we have to take care of the architecture
issue. Let us discuss how it works fast using spring web mvc framework the rapid application development while
maintaining the Model View Architecture of the application.
Spring frameworks comes with rich set of features, let us discuss these features in brief.
1 Inversion Of Control: Inversion of Control or IoC is one of the techniques used to wire services or components to
an
application program. The IoC is “A software design pattern and set of associated programming techniques in which
the flow of control of a system is inverted in comparison to the traditional interaction mode.” In IoC instead of an
application calling the framework, it is the framework that calls the components specified by the application. The
IoC can be explained as "Injection of required resources or dependency at run-time into the dependent resource"
which is also known as Dependency Injection. The org.springframework.beans.factory.BeanFactory is the actual
representation of the Spring IoC container which is responsible for containing and managing the beans. The
BeanFactory interface is the central IoC container interface in Spring. A bean is simply an object that is instantiated
and managed by a Spring IoC container. These beans and the dependencies between them are reflected in the
configuration metadata used by a container.
2. Constructor Dependency Injection: we can use the java class constructor to load the bean values. A java Class is
defined with a constructor of single field. Details.xml file provides the value to be passes to the constructor. Now
another java loads the xml file using the BeanFactory Method. This uses the xml file to load values in the
constructor of the java file. This is used to pass values to the constructor.
3. Setter Dependency Injection: With every bean we defined the getters and setters. We can also use setters method
to set the values in the beans. setters method overrides the values loaded from the beans.