jump to navigation

Spring

The Spring Framework is an open source application framework that aims to make J2EE development easier.It is the only one to address all architectural tiers of a typical J2EE application, and the only one to offer a comprehensive range of services, as well as a lightweight container.

  • Inversion of Control container: The core “container” Spring provides, enabling sophisticated configuration management for POJOs. The Spring IoC container can manage fine or coarse- grained POJOs (object granularity is a matter for developers, not the framework), and work with other parts of Spring to offer services as well as configuration management.

  • Aspect-Oriented Programming (AOP) framework: AOP enables behavior that would otherwise be scattered through different methods to be modularized in a single place. Spring uses AOP under the hood to deliver important out-of-the-box services such as declarative transaction management. Spring AOP can also be used to implement custom code that would otherwise be scattered between application classes.

  • Data access abstraction: Spring encourages a consistent architectural approach to data access, and provides a unique and powerful abstraction to implement it. Spring provides a rich hierarchy of data access exceptions, independent of any particular persistence product. It also provides a range of helper services for leading persistence APIs, enabling developers to write persistence framework–agnostic data access interfaces and implement them with the tool of their choice.

  • JDBC simplification: Spring provides an abstraction layer over JDBC that is significantly simpler and less error-prone to use than JDBC when you need to use SQL-based access to relational databases.

  • Transaction management: Spring provides a transaction abstraction that can sit over JTA “global” transactions (managed by an application server) or “local” transactions using the JDBC, Hibernate, JDO, or another data access API. This abstraction provides a consistent programming model in a wide range of environments and is the basis for Spring’s declarative and programmatic transaction management.

  • MVC web framework: Spring provides a request-based MVC web framework. Its use of shared instances of multithreaded “controllers” is similar to the approach of Struts, but Spring’s web framework is more flexible, and integrates seamlessly with the Spring IoC container. All other Spring features can also be used with other web frameworks such as Struts or JSF.

  • Simplification for working with JNDI, JTA, and other J2EE APIs: Spring can help remove the need for much of the verbose, boilerplate code that “doesn’t do anything.” With Spring, you can continue to use JNDI or EJB, if you want, but you’ll never need to write another JNDI lookup. Instead, simple configuration can result in Spring performing the lookup on your behalf, guaranteeing that resources such as JNDI contexts are closed even in the event of an exception. The dividend is that you get to focus on writing code that you need to write because it relates to your business domain.

  • Lightweight remoting: Spring provides support for POJO-based remoting over a range of protocols, including RMI, IIOP, and Hessian, Burlap, and other web services protocols.

  • JMS support: Spring provides support for sending and receiving JMS messages in a much simpler way than provided through standard J2EE.

  • JMX support: Spring supports JMX management of application objects it configures.

  • Support for a comprehensive testing strategy for application developers: Spring not only helps to facilitate good design, allowing effective unit testing, but provides a comprehensive solution for integration testing outside an application server.

Comments»

1. narasimhulu - June 12, 2007

explain springs application step by step process

2. narasimhulu - June 12, 2007

Explain springs with proper example

3. SuryaPrakash Bavirti - June 13, 2007

plz explain one web application which includes struts+spring+hibernate step by step

4. venu - August 27, 2007

could please explain about springs in detail

5. venu - August 27, 2007

could you please explain about springs in detail

6. uday sariki - May 15, 2008

could you please explain about AOP in springframework and give an example.