SlideShare a Scribd company logo
CHAPTER 1
INTRODUCTION
Over the last few years, Spring has grown substantially, surpassing many other
frameworks. Spring enables you to concentrate on writing less Spring-Framework-related
code and more application code, which is vital in the fast-changing and cost-sensitive world
of enterprise applications. Since its initial release in 2004, Spring has reinvented itself
multiple times and become prominent in the industry as a strong force in the framework
market. This has not only made the Spring Framework renowned, but it has also put healthy
pressure or rather competition on well-known industry specifications (Java EE) and the
application-server market. In the Java world, this is a very exciting time and a very important
turning point.
In this chapter, I introduce Spring Framework as a whole (If I could, I would compel you to
use it). Before explaining the nitty-gritty, I give you reasons to choose Spring for your
application. Then I explain the Spring framework architecture and its features and, more
important, introduce you to the main modules on which Spring Framework is based.
The complete book is available as a blog entry in www.javacodebook.com.
Why Spring?
Spring provides an extensive, portable, open source-application-development framework for
Enterprise Java. Starting with Spring, you can build whatever you want: reservations system,
banking systems, social networks, and more. Spring expands to meet your needs; you can
integrate various security models, databases, web services, mobile clients, messaging
systems, and so on that are required in today’s agile enterprise applications. Another key
advantage is that Spring fits directly into your current infrastructure, because Spring uses the
same Plain Old Java Objects (POJOs) you use every day. Once you start creating
applications with Spring, you can deploy it everywhere in the certainty that it will thrive and
adapt to the environment with ease.
If you need your application to be better, newer, and speedier, Spring is the right alternative
for development. Surveys suggest that more and more Java developers around the world
are moving toward Spring. For instance, recent analysis from Evans Data ("Spring Usage
Study," Evans Data Corporation, September 2011) analyzes the ubiquity achieved by Spring
as summarized below:
• Spring is the framework of choice among knowledgeable Java developers.
• Spring developers report productivity and speed of deployment as the top reasons for
using it: 70 percent of Spring users report at least a 50 percent productivity gain by
using it, and 73 percent report that the framework allows them to deliver projects
twice as fast.
• It is estimated that more than two thirds of Java developers today are either using
Spring or plan to do so within the next two years.
• More than half of all existing Spring users expect to considerably increase their use
of this framework over the next few years.
• Spring users are more cloud ready and it is considered that heavy Spring adopters
are more likely to have already deployed their applications to the cloud.
• More than half of all existing Spring developers report that they plan to move their
Java applications to a lightweight server, such as Apache Tomcat, within one year.
( Get more information from http://www.vmware.com/company/news/releases/vmw-
spring-momentum-3-14-12.html )
Shared feedback from developers around the world highlights the following advantages of
Spring Framework:
• Easier to understand. Not rocket science.
• If you have any issues with the framework code, you can just open the source code
and with minimal effort understand it very easily.
• Makes users highly productive, shortens development time.
• For junior developers, it’s an excellent learning tool because so many live, proven
Java pattern examples can be seen throughout the framework code.
• Enables developers to cut out tons of redundant code, reducing boilerplate code in
their applications. Programmatic catching of exceptions and cleaning up of
resources, etc., are things of the past.
• Spring’s ability to wire objects at runtime is incredible. Injection of right type-safe
objects wherever needed is transparently handled by the Spring container.
• A la carte framework—Plug-in what you want and use it.
What Is Spring Framework?
Spring Framework is built on well-defined goals and a coherent philosophy. Its main aim is to
make Java EE development easier. This section explains Spring Framework’s main goals
and its role in the development of enterprise applications.
The complete book is available as a blog entry in www.javacodebook.com.
Goal
Spring's main aim, according to Rod Johnson (see sidebar) is to make Java EE easier to
use and promote good programming practice. Even though POJO-based programming
model is practiced in many enterprise applications, Spring Framework takes this concept into
a different level by incorporating this model into it and making it applicable in a wide range of
environments available. Due to this style of programming model, the framework keeps itself
open to take advantages provided by the environment it works on without losing portability in
the process.
Rather than Spring writing its own bit of code for common functionalities like logging,
connection pools, transaction coordinators etc., it allows the developers to appropriately plug
in the various packages available as open-source projects (For example, Commons Logging
package can be used for all common logging purposes, Commons DBCP package can be
used for connection pooling etc.) into the framework with mere configuration and with ease.
By doing so it allows using the best package available in the open-source world and also
keeps it open for future change as the case may be. All of this Spring does by keeping in
mind that it doesn’t gets itself locked to any platform-specific or non-standard technology
making it one of reason to use the framework in any enterprise application development.
Spring over the period has grown into a mature framework transforming itself into a one-stop
shop capable of handling most of the infrastructural concerns which exists in a typical
modern enterprise application. Applications are there because it has to support a business
requirement. Spring provides applications with the capability of taking care of your core
business objects easily and also allows changing it with minimal impact on the application as
a whole according to changing business scenarios.
Rod Johnson is an enterprise Java architect specializing in
scalable web applications. He has worked with both Java and
JEE since their release and is also a core member of JSR
154 Expert Group entrusted with defining the Servlet 2.4
specification. He started developing frameworks for web
application in 2000 while working as independent consultant.
The Spring project was started by him in 2002, and it first
official release was in March 2004. Johnson released this
framework with the publication of his book Expert One-on-
One Java EE Design and Development (Wrox Press, 2002).
Spring Framework’s Role in Enterprise Applications
Spring Framework includes core support for:
• Application configuration
• Enterprise integration
• Data access
• Testing
• Web application-development support
• Enterprise application-development support
Application Configuration
A typical application comprises various components working together to carry out a
particular application-use case. Spring helps you build this configuration with ease. With
Spring, components constituting a use case don’t worry about one another and at any point
they can be swapped to keep up with the business change (agility).
Enterprise Integration
An enterprise application doesn’t work in isolation. It requires various enterprise services and
resources such as security, messaging, caching, transactions, etc., to constitute an end-to-
end application to meet real-life application needs. With ease and agility, Spring does this by
keeping your application code simple and both unit and integration testable. It can be easily
plugged into any standard Java EE application server and also is capable of stand-alone
usage.
Data Access
An enterprise application accesses data stored in a relational database to carry out various
business functions and to enforce various business validations. Spring makes data access
easy and effective. It supports all major data-access technologies, such as Hibernate, JPA,
JDBC, etc.; manages these resources transparently from the developer; and also offers tons
of APIs, which enables developers to concentrate more on the core business coding and
thereby increase productivity.
Testing
Unit and integration testing is essential for any enterprise application. It helps with
decompiling objects from the environment where it resides and makes it easier to test the
application in isolation from its actual deployment environment. More important, it helps in
system/integration testing to see that all the components constituting an enterprise
application work properly. This testing can be done in the actual environment as well as in
isolation from the actual environment, which is a big plus compared to other framework
platforms.
Web Application-Development Support
Spring includes a powerful and highly configurable Model-View-Controller web framework
called Spring MVC. Even though very much similar to Apache Struts, it can never be said as
derived from it. Frankly saying no copyright infringement spotted. Now to look into the
similarities, Struts Action class is similar to Spring MVC Controller class and this object is
multi-threaded in nature will a single instance being used for servicing all the clients. Spring
MVC has some significant advantages over Struts, however—it has a powerful navigation
rule framework, Spring Web Flow, which equals its powerful web framework for application
development. Even though Spring has its own implementation for a web framework, it has
kept its main goal of seamlessly integrating with other famous web frameworks, such as
Struts and Java Server Faces (JSF).
Enterprise Application-Development Support
Spring’s core strength lies in its ability to integrate with common and most required services
in enterprise applications. It has modules for creating and maintaining web services,
scheduling jobs, integrating with messaging services, and so on. This modular coding
support ensures good manageability for applications.
Spring Framework History
Spring Framework has a philosophy of “release early, release often,” because of which
maintenance releases and minor enhancements are released every four to six weeks. Major
release details with major changes introduced, are as follows, beginning with most recent
are as summarized below:
The complete book is available as a blog entry in www.javacodebook.com.
Spring 3.1 (released December 2011)
• Bean definition profiles - better classification and grouping of beans using the
concept of profiles, both using annotation (@Profile) and XML is a huge addition in
the Spring Framework. Combining with the concept of "Environment", it provides
ease of use of profiles.
• Cache abstraction using declarative configuration - adds support for transparently
adding caching behavior by allowing consistent uses of various caching solutions
available in the market to existing Spring applications.
• Servlet 3.0-based WebApplicationInitializer - WebApplicationInitializer is an alternate
to the traditional web application descriptor file web.xml.
• JPA package scanning without persistence.xml and with support for Hibernate 4.0 -
This version supports Hibernate 4.0.
• First class Java 7 support - Supports Java 7 in all aspects.
Spring 3.0 (released December 2009)
• Spring Expression Language - introduction of new expression language similar to
Unified EL syntactically but offering advanced and other significant features.
• Inversion of Control enhancements/Java-based bean metadata - The key features in
Spring JavaConfig project has been migrated to the core Spring Framework.
• General-purpose-type conversion system and field-formatting system - the package
org.springframework.core.convert provides classes which provides general type
conversion system which defines SPI to implement conversion logic.
• Object-to-XML mapping functionality (OXM) moved from Spring Web Services
project to the core Spring Framework.
• Comprehensive REST support - support for REST based services in the server and
client side.
• @MVC additions - Introduction of "mvc" namespace simplifies MVC related
configurations in the Spring configuration file. Addition of other annotations makes
the annotation based MVC application coding easy, simple and less of configuration.
• Declarative model validation - JSR-303 validation support using Hibernate validation
as default provider. There are other validation enhancements also included as part of
this release of Spring Framework.
• Early support for Java EE 6 - Core API's updated to Java 5 utilizing its features as
well as early support for Java EE 6.
• Embedded database support - support for embedded databases like HSQL, H2 and
Derby in a native fashion. It also hosts extendable API which can be used to plug in
to newer emerging databases.
Spring 2.5 (released November 2007)
• Full support for Java 6 and Java EE 5 which includes JDBC 4.0, JTA 1.1, JavaMail
1.4, JAX-WS 2.0 etc.
• Full-featured, annotation-driven dependency injection, such as @Autowired,
@Controller, etc., including support for “qualifiers”.
• Auto-detection and Auto-configuration of various application components available in
the classpath into the Spring's IoC container.
• Introduction of new XML configuration namespaces namely "context" and "jms" for
more convenience.
• Capability of packaging Spring Framework jars as OSGI-compliant bundles.
Spring 2.0 (released October 2006)
• Easier XML configuration - new XML configuration syntax based on XML Schema
along with new and updated DTD.
• New bean scopes - in addition to existing two bean scopes, it adds new additional
scopes which can be used according to the environment in which the Spring
Framework is deployed. It also adds the capability of writing your own custom bean
scopes.
• Easier AOP XML configuration - support for AspectJ along with simplification in AOP
configurations in the form of namespace and new annotations.
• Portlet Framework - ships with new Portlet Framework very much similar to the
Spring MVC Framework.
• Dynamic language support - support for beans written in other languages. At the
moment Spring Framework supports JRuby, Groovy and BeanShell languages.
Spring 1.2 (released May 2005)
• Spring 1.2.6 Framework wins a Jolt productivity award and JAX innovation award.
Spring 1.1 (released September 2004)
• Support for JMS message sending and receiving.
• Using Spring's consistent data-access abstraction, support for Apache OJB as an
ORM alternative introduced.
• Significantly improved JDO support.
• Automatic translation of SQL related exceptions (SQLException) and other JDBC
related exceptions.
• When working with JDBC, support for declarative transaction management capable
of handling nested transactions and savepoints.
• Enhanced support for Apache Velocity and Freemarker.
Spring 1.0 (released March 2004)
• AOP-interception-framework based.
• Declarative and programmatic transaction management support with plugging in
capability which can be used very easily to switch between the two.
• Generic DAO support, providing a generic data-access exception hierarchy for use
with any data-access strategy.
• Abstraction of JDBC related services with good support for BLOB/CLOB operation
which are conceived more difficult to work on.
• Hibernate support, providing SessionFactory management and transaction-scoped
ThreadLocal Sessions.
• Mailing abstraction with full support for JavaMail with advanced support for working
with files which needs to be attached along with the mail.
• Scheduling abstraction and support for well know scheduling frameworks like Quartz
and JDK's Timer which can be used for invoking methods in the Spring-managed
beans.
• Remoting abstraction and support for RMI, JAX-RPC and Caucho's Hessian/Burlap
which can be made use for exposing Spring-managed beans.
Note: Only important and notable features in each release is
covered in this section of the Chapter as packing too much
content would not be an ideal start for this 'beginning' style
Spring book.
Spring Framework Architecture
Spring as always tries to bring in good practices in the industry and also embraces proved
best practices with both hands. It gives developers a consistent way of managing the all-
important business objects and also encourages to program your logic in interfaces rather
than classes. Spring Framework is based on its own well-known (Inversion of Control) IoC
container which uses JavaBean and it's properties. This IoC container is the main building
block of Spring and is used in all the architectural tiers in a typical enterprise application.
The complete book is available as a blog entry in www.javacodebook.com.
Ad

More Related Content

What's hot (20)

Introducing Java 8
Introducing Java 8Introducing Java 8
Introducing Java 8
PT.JUG
 
Developing Commercial APEX Applications
Developing Commercial APEX ApplicationsDeveloping Commercial APEX Applications
Developing Commercial APEX Applications
Enkitec
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web Frameworks
Kunal Ashar
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
bettlebrox
 
Flex and Java
Flex and JavaFlex and Java
Flex and Java
gueste65db38
 
MySQL
MySQLMySQL
MySQL
PT.JUG
 
Building Commercial Applications with Oracle Applications Express by Scott Sp...
Building Commercial Applications with Oracle Applications Express by Scott Sp...Building Commercial Applications with Oracle Applications Express by Scott Sp...
Building Commercial Applications with Oracle Applications Express by Scott Sp...
Enkitec
 
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Johannes Geppert
 
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Edureka!
 
Eclipse & java based modeling platforms for smart phone
Eclipse & java based modeling platforms for smart phoneEclipse & java based modeling platforms for smart phone
Eclipse & java based modeling platforms for smart phone
IAEME Publication
 
Asp. net core 3.0 build modern web and cloud applications (top 13 features +...
Asp. net core 3.0  build modern web and cloud applications (top 13 features +...Asp. net core 3.0  build modern web and cloud applications (top 13 features +...
Asp. net core 3.0 build modern web and cloud applications (top 13 features +...
Katy Slemon
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
mfrancis
 
Arun Kumar(7.8Yrs).DOC
Arun Kumar(7.8Yrs).DOCArun Kumar(7.8Yrs).DOC
Arun Kumar(7.8Yrs).DOC
Arun Kumar Rajamandrapu
 
Spring framework
Spring frameworkSpring framework
Spring framework
Sonal Poddar
 
Why does .net maui deserve your attention if you’re planning to use xamarin
Why does .net maui deserve your attention if you’re planning to use xamarin  Why does .net maui deserve your attention if you’re planning to use xamarin
Why does .net maui deserve your attention if you’re planning to use xamarin
Moon Technolabs Pvt. Ltd.
 
Top 10 java script frameworks for 2020
Top 10 java script frameworks for 2020Top 10 java script frameworks for 2020
Top 10 java script frameworks for 2020
Mantha Phani Satya Anirudh
 
Laravel - A Trending PHP Framework
Laravel - A Trending PHP FrameworkLaravel - A Trending PHP Framework
Laravel - A Trending PHP Framework
ijtsrd
 
IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer Javascript
IRJET Journal
 
Burns jsf-confess-2015
Burns jsf-confess-2015Burns jsf-confess-2015
Burns jsf-confess-2015
Edward Burns
 
Top 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web DevelopmentTop 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web Development
Technostacks Infotech Pvt. Ltd.
 
Introducing Java 8
Introducing Java 8Introducing Java 8
Introducing Java 8
PT.JUG
 
Developing Commercial APEX Applications
Developing Commercial APEX ApplicationsDeveloping Commercial APEX Applications
Developing Commercial APEX Applications
Enkitec
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web Frameworks
Kunal Ashar
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
bettlebrox
 
Building Commercial Applications with Oracle Applications Express by Scott Sp...
Building Commercial Applications with Oracle Applications Express by Scott Sp...Building Commercial Applications with Oracle Applications Express by Scott Sp...
Building Commercial Applications with Oracle Applications Express by Scott Sp...
Enkitec
 
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Java web applications based on new Struts 2.5 and AngularJS (ApacheCon NA 2016)
Johannes Geppert
 
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Edureka!
 
Eclipse & java based modeling platforms for smart phone
Eclipse & java based modeling platforms for smart phoneEclipse & java based modeling platforms for smart phone
Eclipse & java based modeling platforms for smart phone
IAEME Publication
 
Asp. net core 3.0 build modern web and cloud applications (top 13 features +...
Asp. net core 3.0  build modern web and cloud applications (top 13 features +...Asp. net core 3.0  build modern web and cloud applications (top 13 features +...
Asp. net core 3.0 build modern web and cloud applications (top 13 features +...
Katy Slemon
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
mfrancis
 
Why does .net maui deserve your attention if you’re planning to use xamarin
Why does .net maui deserve your attention if you’re planning to use xamarin  Why does .net maui deserve your attention if you’re planning to use xamarin
Why does .net maui deserve your attention if you’re planning to use xamarin
Moon Technolabs Pvt. Ltd.
 
Laravel - A Trending PHP Framework
Laravel - A Trending PHP FrameworkLaravel - A Trending PHP Framework
Laravel - A Trending PHP Framework
ijtsrd
 
IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer Javascript
IRJET Journal
 
Burns jsf-confess-2015
Burns jsf-confess-2015Burns jsf-confess-2015
Burns jsf-confess-2015
Edward Burns
 

Similar to Spring Book – Chapter 1 – Introduction (20)

Top 10 Frameworks Programmers Should Learn in 2020
Top 10 Frameworks Programmers Should Learn in 2020Top 10 Frameworks Programmers Should Learn in 2020
Top 10 Frameworks Programmers Should Learn in 2020
NexSoftsys
 
Spring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applicationsSpring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applications
Katy Slemon
 
Top Java Frameworks.pdf
Top Java Frameworks.pdfTop Java Frameworks.pdf
Top Java Frameworks.pdf
SudhanshiBakre1
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isil
Willy Aguirre
 
Java Development Company | Xicom
Java Development Company | XicomJava Development Company | Xicom
Java Development Company | Xicom
RyanForeman5
 
Developing apps with techstack wp-dm
Developing apps with techstack wp-dmDeveloping apps with techstack wp-dm
Developing apps with techstack wp-dm
Actian Corporation
 
Popular Web Frameworks for web Development
Popular Web Frameworks for web DevelopmentPopular Web Frameworks for web Development
Popular Web Frameworks for web Development
Chinmayee Behera
 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
Rohit Prabhakar
 
Spring ppt
Spring pptSpring ppt
Spring ppt
Mumbai Academisc
 
Top 5 backend frameworks for web development in.pptx
Top 5 backend frameworks for web development in.pptxTop 5 backend frameworks for web development in.pptx
Top 5 backend frameworks for web development in.pptx
SilverClouding Consultancy Pvt Ltd
 
Top Backend Frameworks for Mobile App Development in 2023
Top Backend Frameworks for Mobile App Development in 2023Top Backend Frameworks for Mobile App Development in 2023
Top Backend Frameworks for Mobile App Development in 2023
ZimbleCodeAustralia
 
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Aditya Jha
 
Is Quarkus a worthy alternative to Java Spring
Is Quarkus a worthy alternative to Java SpringIs Quarkus a worthy alternative to Java Spring
Is Quarkus a worthy alternative to Java Spring
Mindfire LLC
 
Java springboot framework- Spring Boot.pptx
Java springboot framework- Spring Boot.pptxJava springboot framework- Spring Boot.pptx
Java springboot framework- Spring Boot.pptx
tripathipragatiii200
 
spring
springspring
spring
Suman Behara
 
Web application framework
Web application frameworkWeb application framework
Web application framework
Pankaj Chand
 
IT 8003 Cloud ComputingFor this activi.docx
IT 8003 Cloud ComputingFor this activi.docxIT 8003 Cloud ComputingFor this activi.docx
IT 8003 Cloud ComputingFor this activi.docx
vrickens
 
Spring framework
Spring frameworkSpring framework
Spring framework
Shivi Kashyap
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
75waytechnologies
 
Top 10 Frameworks Programmers Should Learn in 2020
Top 10 Frameworks Programmers Should Learn in 2020Top 10 Frameworks Programmers Should Learn in 2020
Top 10 Frameworks Programmers Should Learn in 2020
NexSoftsys
 
Spring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applicationsSpring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applications
Katy Slemon
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isil
Willy Aguirre
 
Java Development Company | Xicom
Java Development Company | XicomJava Development Company | Xicom
Java Development Company | Xicom
RyanForeman5
 
Developing apps with techstack wp-dm
Developing apps with techstack wp-dmDeveloping apps with techstack wp-dm
Developing apps with techstack wp-dm
Actian Corporation
 
Popular Web Frameworks for web Development
Popular Web Frameworks for web DevelopmentPopular Web Frameworks for web Development
Popular Web Frameworks for web Development
Chinmayee Behera
 
Top Backend Frameworks for Mobile App Development in 2023
Top Backend Frameworks for Mobile App Development in 2023Top Backend Frameworks for Mobile App Development in 2023
Top Backend Frameworks for Mobile App Development in 2023
ZimbleCodeAustralia
 
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Aditya Jha
 
Is Quarkus a worthy alternative to Java Spring
Is Quarkus a worthy alternative to Java SpringIs Quarkus a worthy alternative to Java Spring
Is Quarkus a worthy alternative to Java Spring
Mindfire LLC
 
Java springboot framework- Spring Boot.pptx
Java springboot framework- Spring Boot.pptxJava springboot framework- Spring Boot.pptx
Java springboot framework- Spring Boot.pptx
tripathipragatiii200
 
Web application framework
Web application frameworkWeb application framework
Web application framework
Pankaj Chand
 
IT 8003 Cloud ComputingFor this activi.docx
IT 8003 Cloud ComputingFor this activi.docxIT 8003 Cloud ComputingFor this activi.docx
IT 8003 Cloud ComputingFor this activi.docx
vrickens
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
75waytechnologies
 
Ad

Recently uploaded (20)

Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Ad

Spring Book – Chapter 1 – Introduction

  • 1. CHAPTER 1 INTRODUCTION Over the last few years, Spring has grown substantially, surpassing many other frameworks. Spring enables you to concentrate on writing less Spring-Framework-related code and more application code, which is vital in the fast-changing and cost-sensitive world of enterprise applications. Since its initial release in 2004, Spring has reinvented itself multiple times and become prominent in the industry as a strong force in the framework market. This has not only made the Spring Framework renowned, but it has also put healthy pressure or rather competition on well-known industry specifications (Java EE) and the application-server market. In the Java world, this is a very exciting time and a very important turning point. In this chapter, I introduce Spring Framework as a whole (If I could, I would compel you to use it). Before explaining the nitty-gritty, I give you reasons to choose Spring for your application. Then I explain the Spring framework architecture and its features and, more important, introduce you to the main modules on which Spring Framework is based. The complete book is available as a blog entry in www.javacodebook.com. Why Spring? Spring provides an extensive, portable, open source-application-development framework for Enterprise Java. Starting with Spring, you can build whatever you want: reservations system, banking systems, social networks, and more. Spring expands to meet your needs; you can integrate various security models, databases, web services, mobile clients, messaging systems, and so on that are required in today’s agile enterprise applications. Another key advantage is that Spring fits directly into your current infrastructure, because Spring uses the same Plain Old Java Objects (POJOs) you use every day. Once you start creating
  • 2. applications with Spring, you can deploy it everywhere in the certainty that it will thrive and adapt to the environment with ease. If you need your application to be better, newer, and speedier, Spring is the right alternative for development. Surveys suggest that more and more Java developers around the world are moving toward Spring. For instance, recent analysis from Evans Data ("Spring Usage Study," Evans Data Corporation, September 2011) analyzes the ubiquity achieved by Spring as summarized below: • Spring is the framework of choice among knowledgeable Java developers. • Spring developers report productivity and speed of deployment as the top reasons for using it: 70 percent of Spring users report at least a 50 percent productivity gain by using it, and 73 percent report that the framework allows them to deliver projects twice as fast. • It is estimated that more than two thirds of Java developers today are either using Spring or plan to do so within the next two years. • More than half of all existing Spring users expect to considerably increase their use of this framework over the next few years. • Spring users are more cloud ready and it is considered that heavy Spring adopters are more likely to have already deployed their applications to the cloud. • More than half of all existing Spring developers report that they plan to move their Java applications to a lightweight server, such as Apache Tomcat, within one year. ( Get more information from http://www.vmware.com/company/news/releases/vmw- spring-momentum-3-14-12.html ) Shared feedback from developers around the world highlights the following advantages of Spring Framework: • Easier to understand. Not rocket science. • If you have any issues with the framework code, you can just open the source code and with minimal effort understand it very easily.
  • 3. • Makes users highly productive, shortens development time. • For junior developers, it’s an excellent learning tool because so many live, proven Java pattern examples can be seen throughout the framework code. • Enables developers to cut out tons of redundant code, reducing boilerplate code in their applications. Programmatic catching of exceptions and cleaning up of resources, etc., are things of the past. • Spring’s ability to wire objects at runtime is incredible. Injection of right type-safe objects wherever needed is transparently handled by the Spring container. • A la carte framework—Plug-in what you want and use it. What Is Spring Framework? Spring Framework is built on well-defined goals and a coherent philosophy. Its main aim is to make Java EE development easier. This section explains Spring Framework’s main goals and its role in the development of enterprise applications. The complete book is available as a blog entry in www.javacodebook.com. Goal Spring's main aim, according to Rod Johnson (see sidebar) is to make Java EE easier to use and promote good programming practice. Even though POJO-based programming model is practiced in many enterprise applications, Spring Framework takes this concept into a different level by incorporating this model into it and making it applicable in a wide range of environments available. Due to this style of programming model, the framework keeps itself open to take advantages provided by the environment it works on without losing portability in the process. Rather than Spring writing its own bit of code for common functionalities like logging, connection pools, transaction coordinators etc., it allows the developers to appropriately plug in the various packages available as open-source projects (For example, Commons Logging
  • 4. package can be used for all common logging purposes, Commons DBCP package can be used for connection pooling etc.) into the framework with mere configuration and with ease. By doing so it allows using the best package available in the open-source world and also keeps it open for future change as the case may be. All of this Spring does by keeping in mind that it doesn’t gets itself locked to any platform-specific or non-standard technology making it one of reason to use the framework in any enterprise application development. Spring over the period has grown into a mature framework transforming itself into a one-stop shop capable of handling most of the infrastructural concerns which exists in a typical modern enterprise application. Applications are there because it has to support a business requirement. Spring provides applications with the capability of taking care of your core business objects easily and also allows changing it with minimal impact on the application as a whole according to changing business scenarios. Rod Johnson is an enterprise Java architect specializing in scalable web applications. He has worked with both Java and JEE since their release and is also a core member of JSR 154 Expert Group entrusted with defining the Servlet 2.4 specification. He started developing frameworks for web application in 2000 while working as independent consultant. The Spring project was started by him in 2002, and it first official release was in March 2004. Johnson released this framework with the publication of his book Expert One-on- One Java EE Design and Development (Wrox Press, 2002). Spring Framework’s Role in Enterprise Applications Spring Framework includes core support for: • Application configuration • Enterprise integration • Data access • Testing
  • 5. • Web application-development support • Enterprise application-development support Application Configuration A typical application comprises various components working together to carry out a particular application-use case. Spring helps you build this configuration with ease. With Spring, components constituting a use case don’t worry about one another and at any point they can be swapped to keep up with the business change (agility). Enterprise Integration An enterprise application doesn’t work in isolation. It requires various enterprise services and resources such as security, messaging, caching, transactions, etc., to constitute an end-to- end application to meet real-life application needs. With ease and agility, Spring does this by keeping your application code simple and both unit and integration testable. It can be easily plugged into any standard Java EE application server and also is capable of stand-alone usage. Data Access An enterprise application accesses data stored in a relational database to carry out various business functions and to enforce various business validations. Spring makes data access easy and effective. It supports all major data-access technologies, such as Hibernate, JPA, JDBC, etc.; manages these resources transparently from the developer; and also offers tons of APIs, which enables developers to concentrate more on the core business coding and thereby increase productivity. Testing Unit and integration testing is essential for any enterprise application. It helps with decompiling objects from the environment where it resides and makes it easier to test the application in isolation from its actual deployment environment. More important, it helps in system/integration testing to see that all the components constituting an enterprise application work properly. This testing can be done in the actual environment as well as in
  • 6. isolation from the actual environment, which is a big plus compared to other framework platforms. Web Application-Development Support Spring includes a powerful and highly configurable Model-View-Controller web framework called Spring MVC. Even though very much similar to Apache Struts, it can never be said as derived from it. Frankly saying no copyright infringement spotted. Now to look into the similarities, Struts Action class is similar to Spring MVC Controller class and this object is multi-threaded in nature will a single instance being used for servicing all the clients. Spring MVC has some significant advantages over Struts, however—it has a powerful navigation rule framework, Spring Web Flow, which equals its powerful web framework for application development. Even though Spring has its own implementation for a web framework, it has kept its main goal of seamlessly integrating with other famous web frameworks, such as Struts and Java Server Faces (JSF). Enterprise Application-Development Support Spring’s core strength lies in its ability to integrate with common and most required services in enterprise applications. It has modules for creating and maintaining web services, scheduling jobs, integrating with messaging services, and so on. This modular coding support ensures good manageability for applications. Spring Framework History Spring Framework has a philosophy of “release early, release often,” because of which maintenance releases and minor enhancements are released every four to six weeks. Major release details with major changes introduced, are as follows, beginning with most recent are as summarized below: The complete book is available as a blog entry in www.javacodebook.com. Spring 3.1 (released December 2011)
  • 7. • Bean definition profiles - better classification and grouping of beans using the concept of profiles, both using annotation (@Profile) and XML is a huge addition in the Spring Framework. Combining with the concept of "Environment", it provides ease of use of profiles. • Cache abstraction using declarative configuration - adds support for transparently adding caching behavior by allowing consistent uses of various caching solutions available in the market to existing Spring applications. • Servlet 3.0-based WebApplicationInitializer - WebApplicationInitializer is an alternate to the traditional web application descriptor file web.xml. • JPA package scanning without persistence.xml and with support for Hibernate 4.0 - This version supports Hibernate 4.0. • First class Java 7 support - Supports Java 7 in all aspects. Spring 3.0 (released December 2009) • Spring Expression Language - introduction of new expression language similar to Unified EL syntactically but offering advanced and other significant features. • Inversion of Control enhancements/Java-based bean metadata - The key features in Spring JavaConfig project has been migrated to the core Spring Framework. • General-purpose-type conversion system and field-formatting system - the package org.springframework.core.convert provides classes which provides general type conversion system which defines SPI to implement conversion logic. • Object-to-XML mapping functionality (OXM) moved from Spring Web Services project to the core Spring Framework. • Comprehensive REST support - support for REST based services in the server and client side.
  • 8. • @MVC additions - Introduction of "mvc" namespace simplifies MVC related configurations in the Spring configuration file. Addition of other annotations makes the annotation based MVC application coding easy, simple and less of configuration. • Declarative model validation - JSR-303 validation support using Hibernate validation as default provider. There are other validation enhancements also included as part of this release of Spring Framework. • Early support for Java EE 6 - Core API's updated to Java 5 utilizing its features as well as early support for Java EE 6. • Embedded database support - support for embedded databases like HSQL, H2 and Derby in a native fashion. It also hosts extendable API which can be used to plug in to newer emerging databases. Spring 2.5 (released November 2007) • Full support for Java 6 and Java EE 5 which includes JDBC 4.0, JTA 1.1, JavaMail 1.4, JAX-WS 2.0 etc. • Full-featured, annotation-driven dependency injection, such as @Autowired, @Controller, etc., including support for “qualifiers”. • Auto-detection and Auto-configuration of various application components available in the classpath into the Spring's IoC container. • Introduction of new XML configuration namespaces namely "context" and "jms" for more convenience. • Capability of packaging Spring Framework jars as OSGI-compliant bundles. Spring 2.0 (released October 2006) • Easier XML configuration - new XML configuration syntax based on XML Schema along with new and updated DTD.
  • 9. • New bean scopes - in addition to existing two bean scopes, it adds new additional scopes which can be used according to the environment in which the Spring Framework is deployed. It also adds the capability of writing your own custom bean scopes. • Easier AOP XML configuration - support for AspectJ along with simplification in AOP configurations in the form of namespace and new annotations. • Portlet Framework - ships with new Portlet Framework very much similar to the Spring MVC Framework. • Dynamic language support - support for beans written in other languages. At the moment Spring Framework supports JRuby, Groovy and BeanShell languages. Spring 1.2 (released May 2005) • Spring 1.2.6 Framework wins a Jolt productivity award and JAX innovation award. Spring 1.1 (released September 2004) • Support for JMS message sending and receiving. • Using Spring's consistent data-access abstraction, support for Apache OJB as an ORM alternative introduced. • Significantly improved JDO support. • Automatic translation of SQL related exceptions (SQLException) and other JDBC related exceptions. • When working with JDBC, support for declarative transaction management capable of handling nested transactions and savepoints. • Enhanced support for Apache Velocity and Freemarker.
  • 10. Spring 1.0 (released March 2004) • AOP-interception-framework based. • Declarative and programmatic transaction management support with plugging in capability which can be used very easily to switch between the two. • Generic DAO support, providing a generic data-access exception hierarchy for use with any data-access strategy. • Abstraction of JDBC related services with good support for BLOB/CLOB operation which are conceived more difficult to work on. • Hibernate support, providing SessionFactory management and transaction-scoped ThreadLocal Sessions. • Mailing abstraction with full support for JavaMail with advanced support for working with files which needs to be attached along with the mail. • Scheduling abstraction and support for well know scheduling frameworks like Quartz and JDK's Timer which can be used for invoking methods in the Spring-managed beans. • Remoting abstraction and support for RMI, JAX-RPC and Caucho's Hessian/Burlap which can be made use for exposing Spring-managed beans. Note: Only important and notable features in each release is covered in this section of the Chapter as packing too much content would not be an ideal start for this 'beginning' style Spring book. Spring Framework Architecture
  • 11. Spring as always tries to bring in good practices in the industry and also embraces proved best practices with both hands. It gives developers a consistent way of managing the all- important business objects and also encourages to program your logic in interfaces rather than classes. Spring Framework is based on its own well-known (Inversion of Control) IoC container which uses JavaBean and it's properties. This IoC container is the main building block of Spring and is used in all the architectural tiers in a typical enterprise application. The complete book is available as a blog entry in www.javacodebook.com.