Springboot Framework, Architecture

Padmajeet Mhaske
4 min readDec 8, 2020

--

What Is Spring?

Spring is an application framework which provides template or framework to ease business layer transactions , database layer problems. It also provides programming and configuration model which facilitates developers to only focus on business logic layer and rest of the services will be handled by the Spring itself for example, connecting to the database, HTTP Request, running a query, managing MVC layers.

For instance — developers will create classes for business application or layer and annotate the class as @Service. After annotating class, Spring framework understands that the class will be in Service layer and applies necessary services , life cycles to that class. Springboot also provides infrastructure support. For instance — if the application needed MongoDB database connection it will provide the connection support.

To start any application with complex configurations developers, need to take multiple setup steps to start the application. Over the years Spring providing almost all kinds of supports, configurations and handling many setups to covers all needs of an application, ultimately it turned out huge and complex framework. Finally, the main disadvantage is, multiple deployment setup steps. To manage and deploy the huge framework with complex configuration settings require many setup steps to followed.

Springboot

Here are two words Spring and Boot. Spring where you can write Java applications and Boot is a bootstrap. It means Spring boot giving ability to developers to bootstrap the applications from start. Spring framework is an Enterprise Java framework which helps developer to write java applications. While using Springboot developer can create small as well as complex applications with minimal configurations.

Official definition — Spring boot makes it easy to create stand alone, production Garde spring-based applications that you can “just run”.

Spring boot offers stand alone, convention over configuration, opinionated and production ready application. Standalone means spring boot provides ability to run and deploy spring application on web server or tomcat without complex configurations.

Springboot Architecture

Springboot is the latest version of Spring Framework. Springboot architecture consists of four layers. All four layers are directly communicating with just top layer or bottom layer. It means if there are any modifications in current layer, user need to change or update next adjacent layer only.

Presentation Layer — It serves the top layer of an architecture. Also termed as Views. This layer responsibility is to translate JSON fields to object or vice versa. It also takes care of authentication and HTTP requests. The HTTP request are handled by controllers through presentation Layer

Business Logic Layer — The layer is responsible for handling business logic, validations, and authorization of Springboot application. The business logic layer can easily communicate with top presentation layer as well as bottom storage logic layer. In terms of authorization, this layer is responsible for handling logic of spring security. The Services controls the business logic layer.

Persistence Layer — The layer is crucial for handling storage logic. It stores all database queries and translates object to database rows. . The repositories handled by persistence layer.

Database Layer — the layer is essential for Database. It can also contain multiple databases. The layer supports all CRUD operations.

For example — The client will make HTTP request like POST or GET. The request is transferred to the controller and it maps the requests and processes to it. Sometimes it also calls services only it necessary. The business logic layer handles by Service layer, the logic will be applied from database which is mapped with entity class or data model using JPA. If everything performed successfully, it will be returned JSP page to the client.

Springboot Architecture

Microservices

The monolithic traditional application development architecture is mainly based on the development deployment of individual application a s a whole shown in Figure 3 . The changes in one component will lead to deploy the entire application. While Microservices are small units developed and deployed independently by developers. Microservices offers tiny services to be implemented and tested, later all microservices will integrated into one application. The microservices also few times developed in different programming languages and sometimes possible to utilize different storage techniques. Microservices in general connected via APIs.

Characteristics of Microservices –

Several Components, in terms of software development, the application services divided into small, tiny microservices, independently developed, deployed regardless of programming languages and databases structure. It’s easy to update one or few services or components rather deploying entire application. Easy Routing, Microservices receive request, the process it and immediately sends response to the request. Evolutionary, Resistant to failure, Decentralized, Developed for businesses and many more.

Monolithic vs microservices architecture

--

--

Padmajeet Mhaske
Padmajeet Mhaske

Written by Padmajeet Mhaske

Padmajeet is a seasoned leader in artificial intelligence and machine learning, currently serving as the VP and AI/ML Application Architect at JPMorgan Chase.

No responses yet