Sunday, January 4, 2015

Spring Notes : What is Spring Framework

What is Spring Framework?
Spring is a lightweight  framework for building Enterprise applications using Java. It provides all infrastructure support for developing applications. You can build your applications using POJO (Plain old java objects) without worrying about enterprise service code like transaction management, logging etc. It is a modular framework which helps you to use only those modules which are required for your application. You can easily integrate Spring features with other frameworks like Hibernate, Struts etc. Dependency Injection is main feature of Spring.

Dependency Injection:
Dependency Injection is core of Spring framework. In Dependency Injection, Container is responsible for Object Life-cycle (object creation, resolving dependencies for object etc) and enterprise applications can be built using POJO's. It can be achieved using configuration files or annotations.

Different modules of Spring:
1. Core container: Core, Beans, Context, Spring Expression language(SpEL) modules
2. Spring AOP (Aspect oriented programming) :AOP module
3. Data Access/ Integration: JDBC, ORM, OMX, JMS, Transactions modules
4. Web: Web, Web-Servlet, Web-Socket, Web-Portlet modules
5. Test : Test module for testing Spring components usinh JUnit or TestNG frameworks.