After 3 months of Java and Spring training

Purpose of writing

Understanding Markdown notation Notes for yourself

Past programming experience

HTML,CSS,JavaScript,php Vue,Laravel I'm not good at the back end, so I was studying on my own, mainly around the front end.

What I felt purely about Java

--Bad point --Anyway, there is a lot of description ――It tends to be redundant --The type is too strict and the hurdle is high for beginners --Not modern --Maybe it's easy to get a waterfall ――The cost of learning is bad --Inevitably takes time

What I felt purely about Spring (Spring Boot)

--Bad point --The description of Controller that may return to your own page may be unclear as to what process on which page (personal) --Because annotations are convenient, you may not notice basic errors (for beginners) ――It tends to be redundant ――It's hard to understand the version of STS tool ...

What did you make?

EC site

** Implementation items ** Login function for each administrator and user (Spring Security cannot be used) Cart function paging New registration, update, addition, search, compound condition search, logical deletion to DB

Car rental reservation site

** Implementation items **

Development environment (ver omitted)

eclipse

Spring tool suite3    Spring Boot    Spring Jdbc    Spring Web    Bean Validation

Thymeleaf       MysqlWorkBench    AWS S3

Points stuck in development

Net resources are old

Every time I get stuck, there are many articles from quite a while ago. It's not that it doesn't work, but I'm worried about the modern writing style and technology.

How far should the model type be separated?

I made an Entity according to the DB, but I was told that the Entity should not be displayed directly in the View, so I made a Model for display (the code content is exactly the same as the Entity except for the constructor) and used it as an argument of the constructor. Refilling was done by specifying Entity. I thought it would be okay to use the Clone method here, but he said he didn't need to clone it. The biggest problem was whether to create a Model for Form by updating DB records. After all the training, I heard that it depends on the product. Basically, it was said that it is okay to use one model instead of separating the models, but if there is a possibility that the contents of the DB will change in the future, or in the case of large-scale development, separate the models and use them properly. It was said that it was good.

The mold is strict and clogged

I'm used to it, so I don't think it's going to get stuck. I couldn't move forward because I was stuck. It was packed with things to understand, such as the number of values and the type of data. It was even more confusing because DB join was involved in that situation. Especially for Timestamp and Date, I remember that the exchange with DB data became troublesome if I wasn't careful.

Should data be passed in HttpSession or Model?

During development, I felt that anything related to validation or the value could change should be passed by Model. On the contrary, in most cases, I kept it in the session, and when I got used to it, I was wondering if it would be okay to delete all with invalidate (). There is also a method of passing it with hidden input, but I avoided using it because I think it will be an anti-pattern.

Interaction with DB

The most clogged was the transfer of data to and from the DB. First, the Mysql error message wasn't kind. And when the number of data increased, it became difficult to grasp what was passed and what was currently contained. One way was to make it easier to understand with the constants of Constants, but I personally avoided using it because it was difficult to understand.

Specific knowledge of Java and Spring

compareTo method

Variable 1.compareTo (Variable 2)

"Negative value" if the method caller value (variable 1) is less than the argument value (variable 2) "Positive value" if the method caller value (variable 1) is greater than the argument value (variable 2) "0" if the value of the method caller (variable 1) is the same as the argument value (variable 2) Quoted from Samurai Academy

I found it convenient because it was easy to use for checking duplicate dates.

Will be updated from time to time

Recommended Posts

After 3 months of Java and Spring training
Advantages and disadvantages of Java
[Java] Judgment of identity and equivalence
Spring Java
[Java] Inheritance and structure of HttpServlet class
[Java / Swift] Comparison of Java Interface and Swift Protocol
Features of spring framework for java developers
Summary of Java Math.random and import (Calendar)
[Java] [Spring] Test the behavior of the logger
[Java] Contents of Collection interface and List interface
Basics of java basics ② ~ if statement and switch statement ~
Discrimination of Enums in Java 7 and above
I want to display images with REST Controller of Java and Spring!
Java development training
[Java] Personal summary of classes and methods (basic)
[Java] The confusing part of String and StringBuilder
I compared the characteristics of Java and .NET
Various correspondence table of Spring Framework and Spring Boot
[JQuery] Implementation procedure of AutoComplete function [Java / Spring]
JAVA: Realizes generation and scanning of various barcodes
[Java / Spring Boot] Spring security ④ --Implementation of login process
Basics of threads and Callable in Java [Beginner]
[Java / Spring Boot] Spring security ⑤ --Implementation of logout processing
[Java] Classification memo of compilation error and run-time error
Java and JavaScript
XXE and Java
[Java] Overview of Java
[Java] Spring DI ③
Java enables extraction of PDF text and images
Create a portfolio app using Java and Spring Boot
[Java] Types of comments and how to write them
Summary of ToString behavior with Java and Groovy annotations
Please note the division (division) of java kotlin Int and Int
Compatibility of Spring JDBC and MyBatis with Spring Data JDBC (provisional)
The comparison of enums is ==, and equals is good [Java]
Organizing the current state of Java and considering the future
Java language from the perspective of Kotlin and C #
Until the use of Spring Data and JPA Part 2
[Java] About Objects.equals () and Review of String comparisons (== and equals)
Until the use of Spring Data and JPA Part 1
I summarized the types and basics of Java exceptions
List of frequently used Java instructions (for beginners and beginners)
Use of Abstract Class and Interface properly in Java
[Spring Batch] Realization verification of chunk step and tasklet step of Spring Batch
Equivalence comparison of Java wrapper classes and primitive types
[Java] [Kotlin] Generically call valueOf and values of Enum
[Java10] Be careful of using var and generics together
[Java] Handling of character strings (String class and StringBuilder class)
Expired collection of java
[Spring] Pitfalls of BeanUtils.copyProperties
Predicted Features of Java
[Java] Significance of serialVersionUID
Getters and setters (Java)
[Java] Thread and Runnable
NIO.2 review of java
Review of java Shilber
Java true and false
[Java] String comparison and && and ||
About DI of Spring ①
java --Unification of comments
About DI of Spring ②