[Java] Flow from introduction of STS to confirmation of dynamic page on localhost (1/3)

In company training, a group of about 2 to 3 people is supposed to create a virtual project. The project uses Spring Tool Suite (STS), but since there was no such thing as a manual for trainees, I summarized from the introduction to setting up a local host and checking the web page. It's for people who are new to programming, so I'm writing even the basics.

The article is divided into three parts. ** 1. Explanation of MVC model ← Now here ** 2. From the introduction of STS to Japanese localization by Pleiades 3. From creating a project to checking the page on the local host

Before downloading STS, let's start with an explanation of the MVC model, which is the design concept of web applications. Please keep in touch with us from the beginning without thinking that it is a lecture.

What is MVC model?

The MVC model is, in a nutshell, one of the design concepts of web applications. When a developer implements a web application as he or she wants, it tends to cause troubles that only that person can understand or bugs occur, and it is also a security aspect to refer to data directly from the client side. I'm not sure. Therefore, it is a story to decide and implement rules on what to do and how to move it in various places. The roles of each are as follows.

M : Model The part that actually performs some processing, such as calculation and access to the data layer. Named logic or service. It is called by the Controller and returns the operation result and the data acquired from the database. V : View Generated by the Controller and sent to the client. As the name implies, it is the part that looks like, and includes graphs and diagrams, as well as the HTML files required for web pages. C : Controller It confirms the contents of the HTTP request, calls the appropriate Model, generates the operation result and data as a View, and sends it back to the client (HTTP response).

Example) Client enters keywords on a web page ↓ Controller receives the keyword and skips to Model to access the database ↓ Model accesses the database, gets the data associated with the keyword and returns it to Controller ↓ Controller creates an HTML file as View, describes the data acquired from Model in the file, and sends it to the client. ↓ Web page transitions and a list of data associated with keywords is displayed

The MVC model is just a design concept, and we do not explicitly set it as an MVC model in development. That said, if you are not aware of the MVC model, it may happen that something other than the Controller receives the request, or that you put completely unrelated arithmetic processing in one Model. Code that can only be understood by the person who implements it will be an obstacle later even if it works on the spot, so I think it is better to proceed with development while keeping it in the corner of your head.

That's a brief description of the MVC model. Next time, I would like to download STS and proceed to Japanese localization.

Next time: From the introduction of STS to Japanese localization by Pleiades

Recommended Posts

[Java] Flow from introduction of STS to confirmation of dynamic page on localhost (2/3)
[Java] Flow from introduction of STS to confirmation of dynamic page on localhost (1/3)
From introduction to use of ActiveHash
From introduction to usage of byebug
[Java] Flow from source code to execution
Output of the book "Introduction to Java"
Introduction to monitoring from Java Touching Prometheus
Confirmation and refactoring of the flow from request to controller in [httpclient]
[Java] Introduction to Java
Introduction to java
[Introduction to Java] Basics of java arithmetic (for beginners)
How to write Scala from the perspective of Java
As of April 2018 How to get Java 8 on Mac
Introduction to Java for beginners Basic knowledge of Java language ①
Changes from Java 8 to Java 11
Sum from Java_1 to 100
From Java to Ruby !!
Introduction to java command
Java to fly data from Android to ROS of Jetson Nano
Get to the abbreviations from 5 examples of iterating Java lists
20190803_Java & k8s on Azure The story of going to the festival
Catch up on new features from Java 7 to Java 9 at once
[Introduction to Java] Handling of character strings (String class, StringBuilder class)
Introduction purpose of ActiveHash and simple flow to application implementation
Since I switched from Spring Boot (Java) to Ruby on Rails, I summarized my favorite points of Rails.
Migration from Cobol to JAVA
New features from Java7 to Java8
Connect from Java to PostgreSQL
[Java] Introduction to lambda expressions
[Java] Introduction to Stream API
From Ineffective Java to Effective Java
[Introduction to rock-paper-scissors games] Java
Notes on building Kotlin development environment and migrating from Java to Kotlin
Summary of results of research on object orientation [Updated from time to time]
From fledgling Java (3 years) to Node.js (4 years). And the impression of returning to Java
How to call with One Touch (without confirmation) on Android (Java)
Introduction to Scala from a Java perspective, decompiled and understood (basic)
[Introduction to Java Table of Contents] I compared Java with other languages (interpreter type, compiler type, dynamic typing, static typing)