Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Multi-Project Build の魅力 / JJUG CCC 2024 Fall - LT
Search
Fumitaka Yokoyama
November 12, 2024
0
180
Multi-Project Build の魅力 / JJUG CCC 2024 Fall - LT
JJUG CCC 2024 Fall の夜の部で LT した内容です。
Multi-Project Build の魅力について発表しました。
Fumitaka Yokoyama
November 12, 2024
Tweet
Share
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Optimizing for Happiness
mojombo
376
70k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
160
Gamification - CAS2011
davidbonilla
80
5.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Transcript
© 2024- atWare Inc. Multi-Project Build の魅力 株式会社アットウェア 横山 史尭
© 2024- atWare Inc. こんなことありませんか?
© 2024- atWare Inc. package org.example.presentation.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController;
... import org.example.repository.user.UserDataModel; @RestController public class UserController { ... @GetMapping("/users") public List<UserView> getUsers(UsersSearchParams params) { ... List<UserDataModel> userDataModels = searchUsersService.invoke(params); List<UserView> userViews = converter.convert(userDataModels); return userViews; } } \ できました! /
© 2024- atWare Inc. package org.example.presentation.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController;
... import org.example.repository.user.UserDataModel; @RestController public class UserController { ... @GetMapping("/users") public List<UserView> getUsers(UsersSearchParams params) { ... List<UserDataModel> userDataModels = searchUsersService.invoke(params); List<UserView> userViews = converter.convert(userDataModels); return userViews; } }
© 2024- atWare Inc. そこで、
© 2024- atWare Inc. Multi-Project Build in Gradle @see https://docs.gradle.org/current/userguide/intro_multi_project_builds.html
© 2024- atWare Inc. Multi-Project Build の魅力 - 依存関係の制御 -
sub-project の独立性 - domain, application の再利用性 - パフォーマンス向上
© 2024- atWare Inc. Project structure
© 2024- atWare Inc. Project structure (all) - buildSrc build
conventions - app bootable (AppMain.class) - lib: - presentation - application-service-interface - application-service - application-data-interface - data-adaptor - domain - composite project: - util
© 2024- atWare Inc. Project structure (simplified) - presentation *Controller,
view - application-service-interface interface *Service application I/O - application-service *ServiceImpl - application-data-interface interface *Repository - data-adaptor *RepositoryImpl
© 2024- atWare Inc. dependencies { implementation(project( ":lib:application-service-interface" )) implementation(project(
":lib:domain" )) implementation( "org.springframework.boot:spring-boot-starter-web" ) implementation( "org.springframework.boot:spring-boot-starter-thymeleaf" ) } ./lib/presentation/build.gradle
© 2024- atWare Inc. dependencies { implementation(project( ":lib:application-service-interface" )) implementation(project(
":lib:application-data-interface" )) implementation(project( ":lib:domain" )) implementation( "org.springframework.boot:spring-boot-starter" ) } ./lib/application-service/build.gradle
© 2024- atWare Inc. dependencies { implementation(project( ":lib:application-data-interface" )) implementation(project(
":lib:domain" )) implementation( "org.springframework.boot:spring-boot-starter-data-jpa" ) } ./lib/data-adaptor/build.gradle
© 2024- atWare Inc. package org.example.presentation.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController;
... import org.example.repository.user.UserDataModel; @RestController public class UserController { ... @GetMapping("/users") public List<UserView> getUsers(UsersSearchParams params) { ... List<UserDataModel> userDataModels = searchUsersService.invoke(params); List<UserView> userViews = converter.convert(userDataModels); return userViews; } } import できねえ、、
© 2024- atWare Inc. まとめ アーキテクチャをハウスルールだけでなく、 実際に強制力のあるものにすることができます。 暴れまわる若手の手綱を握って快適な開発を! 参考: https://docs.gradle.org/current/userguide/userguide.html