Professional Documents
Culture Documents
Mca-303 (De2) - SM05
Mca-303 (De2) - SM05
01 02
Roderick B. Johnson, an Since its origin, the Spring
Australian Framework has released
computer specialist
officially released the many versions 5.0 is the
Spring Framework in 2003 current Spring Framework
. version.
Advantages of
Spring Framework
1) Predefined Templates
Let's take the example of JdbcTemplate, you don't need to write the code for
exception handling, creating connection, creating statement, committing
transaction, closing connection etc. We need to write the code of executing
query only. Thus, it save a lot of JDBC code.
2) Loose Coupling
• If you change your shirt, then you are not forced to change
your body – when you can do that, then you have loose
coupling.
• When you can’t do that, then you have tight coupling.
3) Easy to test
• It provides powerful
abstraction to JavaEE
specifications such
as JMS, JDBC, JPA
and JTA.
7) Declarative support
The benefit of using only POJOs is that you do not need an EJB container
product such as an application server but you have the option of using only a
robust servlet container such as Tomcat or some commercial product.
Applications of Spring
Integration with existing frameworks - Spring does not reinvent the wheel, instead it truly makes
use of some of the existing technologies like several ORM frameworks, logging frameworks, JEE,
Quartz and JDK timers, and other view technologies.
• Works on POJOs (Plain Old Java Object) which makes your application
lightweight.
• Provides predefined templates for JDBC, Hibernate, JPA etc., thus reducing
your effort of writing too much code.
• Because of dependency injection feature, your code becomes loosely coupled.
• Using Spring Framework, the development of Java Enterprise
Edition (JEE) applications became faster.
• It also provides strong abstraction to Java Enterprise Edition (JEE)
specifications.
What is the difference between Java and Spring?
Java Spring
Java EE is built upon a 3-D Architectural Spring is based on a layered architecture that
Framework which are Logical Tiers, Client Tiers consists of various modules that are built on top
and Presentation Tiers. of its core container.
Various projects undertaken by Spring.
Spring Framework Architecture
Spring Core: This module is the core of the Spring Framework. It provides an
implementation for features like IoC (Inversion of Control) and Dependency Injection with
a singleton design pattern.
Spring Bean: This module provides an implementation for the factory design pattern
through BeanFactory.
Spring Context: This module is built on the solid base provided by the Core and the
Beans modules and is a medium to access any object defined and configured.
OXM: OXM stands for Object XML Mappers. It is used to convert the objects into XML
format and vice versa. The Spring OXM provides an uniform API to access any of
these OXM frameworks.
JMS: JMS stands for Java Messaging Service. This module contains features for
producing and consuming messages among various clients.
Web: This module using servlet listeners and a web-oriented application context, provides basic web-
oriented integration features like multi-part file upload functionality and the initialization of the IoC
container.
Web-Servlet: This module contains Model-View-Controller (MVC) based implementation for web
applications. It provides all other features of MVC, including UI tags and data validations.
Web-Socket: This module provides support for WebSocket based and two-way communication
between the client and the server in web applications.
Web-Portlet: This module is also known as the Spring-MVC-Portlet module. It provides the support
for Spring-based Portlets and mirrors the functionality of a Web-Servlet module.
AOP language is
a powerful tool that allows
Aspect- developers to add enterprise
Oriented functionality to the application such
Programming as transaction, security etc.
(AOP)
• https://netbeans.apache.org/kb/docs/web/quickstart-
webapps-spring.html
References
• https://sites.google.com/site/springmvcnetbeans/step-by-step/
• https://netbeans.apache.org/kb/docs/web/quickstart-
webapps-spring.html