Spring is an Open-Source framework and it has a wide range of documentation provided to make the learning curve easy.
Spring came into existence in 2003 to overcome the heavy weight complexity in J2EE applications. People are thinking of some lightweight methodologies to divide a large application into small pieces and finally wire together.
If suppose one team of developers working in Database connections and transactions to the tables and another one team is working on to process the data from UI. When wiring all the independently developed pieces together that should fit to each other, then only it will work as a complete application. The difficulty is here to wire them together and make the application running without any issues. To solve this problem we have a Spring like framework.
It will split the Database layer, Business Layer and UI layer. All will be loosely coupled under the Inversion Of Control concept. Developers can work independently on each layer and finally wire them together. Wiring of Objects to communicate with each other is achieved with XML, Java Code, Properties and Annotation in Spring Framework.
In future if you want to change the Database layer to any other ORM framework like Hibernate you can change it without modifying any code in UI and Business layer classes.
To change a single layer you don’t need to put development effort on the entire application. This is the biggest advantage on large scale applications.
Spring is able to run as a Stand-alone application without a server, can run in Cloud and Web/Application servers. You can package as Jar to make it running in any environment.
Spring 5.1+ requires at least JDK 8+ and it can support upto JDK 11 LTS. It is divided into modules, developers can choose which module is needed as per the application features. Below is the list of Modules Spring Framework has.
- Spring Core
- AOP, Aspects and Instrumentation
- Data Access
Dependency Injection pattern is strongly implemented in Spring, hence it is loosely coupled between every Class and layers of your application. For example, you can use Struts MVC Framework in UI Layer, Hibernate DAO in Data Access layer. If you want to change the UI Layer to any other UI Frameworks you just need to change the configuration and little piece of code, that’s the beauty of Spring.
That’s all for now on Spring Introduction. In future I will add more details on every module of Spring Framework in detail.
Thanks for Reading!!!