Introduction to Spring
Introduction
Spring;
- Application development framework for java.
- Most popular application development framework.
- Makes developers more productive.
- Makes java simple productive, safer, reactive and cloud ready.
Early years Spring means mainly DI with Spring and some other components.
However today, there are many modules such as Spring Framework, Spring Roo, Spring Cloud etc. in spring.
Spring framework is a foundation and provides basic mechanisms such as IoC, DI, AOP and others.
History
Java Enterprise Edition, Java EE, JEE;
- Set of standards for enterprise software
- Web, web services, persistance, transaction, validation, integration, security, distributed computing etc.
- Java EE moved to Eclipse Foundation and named Jakarta EE
Enterprise JavaBeans; J2EE’s main component
- Has session beans (business logic) and entity beans (database logic).
- Complicated
Spring has been created by Rod Johnson, response to complexity and high cost of Java EE. Replacing EJB with lighter weight, more flexible benefits. Avoids application servers.
POJO: Plain old Java Objects
Advantages of avoiding AS’s
- Lower licesne cost
- Quicker server startup
- Simpler administration and reduced learning curve.
Its always said that if a standard solution is offered by Java itself, prefer it to any third party such as Spring.
However today, nobody is sure about feature of Java EE but Spring is still current, keeps growing, paving the way in areas such as cloud and reactive programming. Spring is kind of become standard in Java.
Usage Scenarios
Spring enhances Java
- Spring support for JDBC and JPA
- Spring integrations such as JMS.
Spring complements Java.
- Fill the gaps of Java,
- Spring MVC is solution for servlets and JSPs in order to use them in a standard arcitechture.
Spring competes Java.
- alternative of Java EE.
- DI, WS are all part of Java Standard, but Spring provides alternatives.
Documentation
https://docs.spring.io/spring-framework/docs/current/reference/html/