[JAVA] Summary of going to JJUG CCC 2019 Spring

I participated in JJUG CCC 2019 Spring held on May 18, 2019. This is a summary of the sessions I heard there and their impressions. It may be hard to see in the bullet points, but please forgive me. I would appreciate it if you could point out any mistakes.

Participation session outline and impressions

Jakarta EE Update -May 2019-

Briefing paper

Overview

--The story of Jakarta EE --Java EE is a trademark of Oracle and will no longer be available --The standard was taken over from Java EE to Jakarta EE --Changes when changing from Java EE to Jakarta EE - Owner: Oracle -> Eclipse Foundation --Standardization: JCP-> JESP --Specifications: JSR-> EE4J Project --Package name: javax. *-> jakarta. * --The old javax. * API can be used even after becoming jakarta. * --Jakarta EE 8 is almost the same as Java EE 8 --Several API changes in Jakarta EE 9 --Old javax. * API remains for compatibility --If you transfer to Jakarta EE, the development speed will be faster than in Java EE. ――This blog will be helpful - Jakarta Blogs

Impressions

--Since the name of javax. * Will not be available in the future, it may be a little troublesome to modify the existing code. --The development speed will be faster than in the Java EE era, so expect it.

CI the architecture of Java / Kotlin applications with ArchUnit

Briefing paper

Overview

--A story about testing the internal architecture --ArchUnit is a test framework that can express package dependencies as JUnit test code. ――Until now, the knowledge of architecture was personalized and tacit knowledge, and only those who knew it could check it. --Advantages of introducing ArchUnit --Architecture review can be automated --Explicit knowledge of architecture can be explicit knowledge --You can also test application-specific implementation rules --For example, you can write a test that guarantees that you will pass the certification.

Impressions

――If the architecture is not followed, it tends to cause some debt, so it is wonderful to be able to secure this! ――Once the package structure is decided, the package dependency test can be used for a long time once it is incorporated, so I felt that there was not much trouble writing the test. --Spring @PreAuthorized can be used to prevent forgetting to annotate

Development environment and application infrastructure in the Cloud Native era

Briefing paper

Overview

--Introduction to Eclipse Che --Browser-based IDE --Provides a container environment for Docker and Kuebernetes --Providing IDE, files and environment as pods ―― "It works on my PC ..." disappears ――If you want to touch it, the following is good - Che on OpenShift Online - Eclipse Che | Eclipse Next-Generation IDE, Cloud IDE, and Workspace Server - Minishift --Minikube-based OpenShift --Select and develop an already prepared environment called Stack --Runtime, compiler, tools, etc. --You can freeze existing Workspace and share it using the URL issued. --Red Hat is actively providing VS Code plugins to enhance the IDE

Impressions

――Impression that the appearance is almost the same as a general IDE ――I felt that it would be great if I could use it because I could cut the time to build the development environment. ――Since you won't get stuck in building the environment, that kind of stress will disappear.

Advance development! Clean architecture in Java --New development starting from scratch

Document

-Practical clean architecture with Java │ nrslib

Overview

--Clean architecture story --The problem that it was necessary to make a prototype of the front in new development was solved by introducing a clean architecture and making it possible to easily replace the logic and the side. --Before clean architecture About hexagonal architecture --Hexagonal one --Make exchangeable except for business logic (Pragapuru) --Do not intersperse business logic --Clean architecture that details the concrete implementation outside the hexagonal architecture ――Onion architecture is talking about the inside (application) of hexagonal architecture. --Clean architecture layers - Enterprise Business Rules - Entities - Application Business Rules - Use Cases - Interface Adapters - Controllers - Presenters - Gateways - Frameworks & Drivers - UI - DB etc --The direction of the dependency is inward, so the inner code must not refer to the outer code --Problems with clean architecture --Problem that Presenter cannot be used with MVC Framework --Presenter cannot be used because Controller must return some value --In the end, I abandoned Presenter (returns the value in Controller obediently) --Controller becomes Fat for view, but domain logic is protected, so OK --Too many fields problem --Since the fields for each Iterator are injected, there are more fields. --Resolved by Message Bus pattern --Processing is registered in advance, and the corresponding processing is performed according to the passed data. --Too many definitions problem --Too many definitions --Create your own scaffolding tool and solve it (a tool called NORIO)

Impressions

--The clean architecture is decided in detail, so if you follow it, you can write clean code. ――There is a feeling that it is decided to be tight, so the degree of freedom seems to be a little low --Impression that the number of classes to be created is likely to increase when it comes to implementation ――There are some parts that are related to DDD, so I have to study. ..

BFF / Backend split of API for mobile apps in Hot Pepper Beauty

Overview

--The story of splitting between BFF and Backend

Impressions

――I thought that it might be effective when there are multiple display sources such as apps and the Web, and the app team and backend team are separated. ――If not, the cost of making BFF is high, and the impression is that you will suffer. ――It has nothing to do with BFF, but the technology used is relatively new and enviable.

Tips for microservice migration with the Strangler pattern

Briefing paper

Overview

--A story about gradually replacing the legacy system with a strangler pattern --Until now (legacy) --Java is listed in the VM --On-premise Oracle --Use the original framework --After renewal --Service split by microservices - Azure Kubernetes Service --A API Gateway is sandwiched between Azure API Management --First, create a service after renewal in Azure, then direct the existing service to the renewed one for each function, and finally move the DB from on-premise to Azure side --Technology - Open API - Spring Boot - Azure Kubernetes Service - Azure API Management --Swagger Codegen automatically generates API call libraries for legacy systems and renewed systems --Log aggregation with Papertrail --Distributed tracing with Spring Cloud Sleuth

Impressions

――I thought the Wrangler pattern was very effective for the renewal from legacy to modern. ――I sympathize with the gradual transition --It's amazing that Swagger automatically generates a library. --There are various log aggregation tools, so let's check them out next time.

Functional Spring Cookbook

Briefing paper

-Functional Spring Cookbook --Google Slide

Overview

--The story that I wrote it like a function in Spring --Spring WebFlux allows you to write web apps in ** Easy ** based on annotations --Spring WebFlux.fn allows you to write web apps in ** Simple ** in a functional way --Spring WebMvc.fn can be written in a functional form like Spring WebFlux.fn, but the processing becomes synchronous. --Introducing various ways to write Bean definitions, HTTP Client, etc. in Spring WebFlux.fn and Spring WebMvc.fn --Introducing how to replace @SpringBootApplication with Spring WebFlux.fn scratch implementation or Spring Fu

Impressions

――Since you can write functionally, I felt that it was wonderful to be able to write simply with a small amount of description. ――In the case of a large-scale service that introduces a clean architecture etc., there is a process to call the application layer, so I felt that the routing method would become Fat and it would be difficult to see and simple.

(Updated on May 20, 2019 ↓)

--- @ making @ github commented directly, and you can synthesize routes, so there is no problem so much. -When you read Document, there are multiple RouterFunctions called RouterFunction < Since it seems to synthesize beans of type?>, You can split the routing method. --The implementer only needs to define multiple RouterFunction <?> Type Beans without being aware of it. ――If this is the case, let's keep it simple without becoming Fat

Recommended Posts

Summary of going to JJUG CCC 2019 Spring
Impressions of an engineer apprentice going to JJUG CCC 2018 Spring
JJUG CCC Spring 2018 memo
JJUG CCC 2018 Spring Repo
JJUG CCC Fall 2018 document summary
JJUG CCC 2018 Spring participation memo
Spring Framework 5.0 Summary of major changes
I participated in JJUG CCC 2019 Spring
Going out of message (Spring boot)
Summary of stumbling blocks related to form_with
[java] Summary of how to handle char
Summary of how to write annotation arguments
[Java] [Maven3] Summary of how to use Maven3
[* Java *] I went to JJUG CCC 2017 Fall
[* Java *] I participated in JJUG CCC 2019 Spring
Summary of how to select elements in Selenium
[java] Summary of how to handle character strings
Summary of what I learned about Spring Boot
Summary of how to create JSF self-made tags
[Docker] Introduction to docker compose Basic summary of docker-compose.yml
Summary of moss when updating from JMockit 1.4 to 1.30
The story of raising Spring Boot 1.5 series to 2.1 series
Summary of what I learned in Spring Batch
How to apply HandlerInterceptor to http inbound-gateway of Spring Integration
[Java Silver] Summary of points related to lambda expressions
A memorandum of addiction to Spring Boot2 x Doma2
I tried to reduce the capacity of Spring Boot
Summary of knowledge required to pass Java SE8 Silver
How to use CommandLineRunner in Spring Batch of Spring Boot
Summary of Java communication API (1) How to use Socket
[Eclipse] Summary of environment settings * Updated from time to time
Summary of Java communication API (3) How to use SocketChannel
Summary of Java communication API (2) How to use HttpUrlConnection
How to boot by environment with Spring Boot of Maven
Summary of how to implement default arguments in Java
[Spring] Pitfalls of BeanUtils.copyProperties
About DI of Spring ①
Summary of strong parameters
Summary of jar files
About DI of Spring ②
Summary of information security
Summary of using FragmentArgs
JJUG CCC 2018 Fall Repo
Spring Boot 2.2 Document Summary
Overview of Spring AOP
Summary of using DBFlow
Summary of Java support 2018
An engineer who doesn't understand Java went to JJUG CCC.
About the function of Spring Boot due to different versions
20190803_Java & k8s on Azure The story of going to the festival
Extract SQL to property file with jdbcTemplate of spring boot