What Is Spring Framework, Spring Introduction
Let us see what is Spring Framework, and why we need to work with this Spring…
- Spring is a light weight and open source framework created by Rod Johnson in 2003. Spring is a complete and a modular framework, i mean spring framework can be used for all layer implementations for a real time application or spring can be used for the development of particular layer of a real time application unlike struts [ only for front end related ] and hibernate [ only for database related ], but with spring we can develop all layers
- Spring framework is said to be a non-invasive means it doesn’t force a programmer to extend or implement their class from any predefined class or interface given by Spring API, in struts we used to extend Action Class right that’s why struts is said to be invasive
- In case of struts framework, it will forces the programmer that, the programmer class must extend from the base class provided by struts API
- Spring is light weight framework because of its POJO model
- Spring Framework made J2EE application development little easier, by introducing POJO model
Spring having this much of demand because of the following 3 reasons….
- Loose Coupling
Spring framework is simple because as it is non-invasive, POJO and POJI model
Actually for writing the spring application, server [Container] is not mandatory, but for struts applications we need a server, and for EJB too. If we want to test the application it may need lot of changes in the source and each time we must restart the server to view the changes, which is little tedious and time taking but we can over come this in Spring, for testing spring application server is not mandatory spring has it own container to run the applications.
Spring can be used to develop any kind of java application, means we can develop starting from console application to enterprise level application
In spring objects are loosely coupled, this is the core concept of spring framework we will see in depth about this loose coupling and how its differ from tight coupling
Sivateja Kandula ♦ ( Java/J2EE Developer & Web Designer )
Founder of Java4s.com. You can contact me at sivateja [at] java4s.com