Friday, March 1, 2024

SPRING MVC IN JAVA

Spring MVC


  • WHAT IS SPRING 
  • ADVANTAGES OF SPRING MVC FRAMEWORK

Based on Java, almost all web programs are created with the Spring MVC framework. It 
adheres to the Model-View-Controller (MVC) paradigm. This design pattern defines the three 
components of an application: the data model, presentation data, and control data.
Sending requests to handlers is the responsibility of a Dispatcher Servlet, which is an essential 
component of this design. Although Spring Boot Microservices is gaining traction in the 
industry, Spring MVC is still widely used in many projects. As a result, you must become 
familiar with Spring MVC's most recent version. That's why we will cover the spring MVC 
framework's components separately and methodically.
Spring Model-View-Controller
Model - The model has the application data. A single item or a group of linked items can 
make up a dataset.
Controller - A controller houses the business logic for the application. In this instance, a class 
is designated as a controller using the @Controller annotation.
View - A view represents the provided data in a predetermined format. The process of creating 
the view page often includes JSP+JSTL. However, a greater variety of view technologies, 
such as Free Marker, Thyme Leaf, and Apache Velocity, are compatible with Spring.
Front Controller - The "Dispatcher Servlet" class is the front controller in Spring Web MVC. 
Its responsibility is to oversee a Spring MVC application's execution.
Advantages of Spring MVC Framework
We'll go over a few advantages of the Spring MVC Framework below: In Spring MVC, each 
of the following roles is described by a distinct object: Model Object, Controller, Command 
Object, View Resolver, Dispatcher Servlet, Validator," and "Every Other Role.
Lightweight - It develops and deploys your application using a lightweight servlet.
Strong configuration - provides framework and application classes with strong configuration 
and easy access to a variety of contexts, such as web controls for validators and business 
objects. The development process is accelerated using Spring MVC, which allows for quick 
and parallel development.
Reusable business code - Allows you to use existing business objects instead of creating new 
objects.
Easy to test - In Spring, we usually create JavaBeans classes that allow you to enter a test. 
data with assignment methods.
Flexible mapping - It provides special annotations that easily recheck the page.


No comments:

Post a Comment

Featured Post

ASSOCIATION RULE IN MACHINE LEARNING/PYTHON/ARTIFICIAL INTELLIGENCE

Association rule   Rule Evaluation Metrics Applications of Association Rule Learning Advantages of Association Rule Mining Disadvantages of ...

Popular