A Glimpse into Java's World Prior to Spring Framework
Before the Spring Framework, developing web applications in Java required using a mix of different libraries and frameworks.
We had several technologies before the Spring Framework.
Servlets and JSP (JavaServer Pages):
For handling HTTP requests and responses we use Servlets. We write Servlets to manage request handling logic.
To embed Java code directly into HTML we use JSP. It is just a view of our application.
Struct Framework:
- Struct is one of the earliest MVC (Model View Controller) framework for Java. It helps to structure the web application in the differenct forms.
EJB (Enterprise JavaBeans):
- EJB is used for business logic and server-side processing. It helps to developer to write scalable and transactional business components. Later EJB 2.x were introduced but it criticized for being complex and heavyweight.
JDBC (Java Database Connectivity):
- JDBC is one of the long lasting and most used API for database access. We have lot of new API's but most of them still use JDBC behind the scene. Developers can perform CRUD operations with the help of JDBC.
Challenges Faced
A lot of XML configuration required particularly with Structs and EJB.
We required to write significant amount of boilerplate code.
Testing components was challenging dur to tight coupling and lack of dependency injection.
Subscribe to my newsletter
Read articles from Abrar Mirje directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Abrar Mirje
Abrar Mirje
I am a software developer passionate about Java and its frameworks. Enthusiastic about writing and maintaining code in Java, I thrive on creating efficient, scalable, and robust applications. With a keen interest in staying updated with the latest advancements in Java technologies, I continuously seek to improve my skills and knowledge. Whether it's developing backend systems, working with databases, or integrating APIs, I am committed to delivering high-quality solutions. Outside of coding, I enjoy participating in tech communities, sharing knowledge, and collaborating.