Spring Boot Web Application, Study Guides, Projects, Research of Computer science

A complete introduction to Spring Boot Web Application

Typology: Study Guides, Projects, Research

2018/2019

Uploaded on 11/27/2019

grusso74
grusso74 🇮🇹

8 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Spring Boot Web Application and more Study Guides, Projects, Research Computer science in PDF only on Docsity!

Standard September 10,2015 by Jt 65 Comments This is the 4th part of my tutorial series on building a web application using Spring Boot. In the the last part of the series, we looked at setting up Spring Data JPA for database persistence. In the second part of the series we looked at using Thymeleaf for building the web pages. And we started off in the first part looking at using the Spring Initializr to start our Spring Boot project. In this part of the series, we tie everything together to provide a working Spring Boot web application. An application which will display data from the database, and allow you to create new records, update existing records, and delete selected records too. Spring MVC In this part of my tutorial series for Spring Boot, we're going to look at setting up a Spring MVC controller to support CRUD operations against the database. MVC stands for Model, View, Controller. The MVC design pattern is probably the most popular design pattern used when writing code to generate dynamic web content. This design pattern is not limited to Java nor Spring. The MVC design pattern has been applied in Javascript, PHP. NET, Python, and many other programming languages. The MVC pattern is popular because it does a great job of separating concerns, and leads you to a clean, maintainable, and easy to understand code base. MVC Overview Model Model refers to a data model, or some type of data structure. For example a web page showing a list of products, the ‘model’ would contain a list of product data. View The view layer, in Java frequently a JSP. This will take data from the Model and render the view. Controller | like to describe the controller as a traffic cop. It will take an incoming request, decide what to do with it, then direct the resulting action. For example, the controller could get a view product request. It will direct a service to get the product data, then direct to the product view and provide the ‘model’ (product data) to the view. Single Responsibility Principle Applied to MVC