2024/10/27(æ¥)ã«JJUG CCC 2024 Fallãè¡ããã¾ãã
ccc2024fall.java-users.jp
âåå ç»é²ã¯ãã¡ãã§ã
jjug.doorkeeper.jp
ç§ã¯ååã«å¼ãç¶ããå½æ¥ã¹ã¿ãããç»å£ãè¡ãã¾ããããã£ãããªã®ã§ååå ãJavaæ´ãæµ
ãæ¹ã§ãåå ããããããã«ã»ãã·ã§ã³è©³ç´°ã«åºã¦ããæè¡ç³»ã®åèªãç·ãããã¾ãã
ããã«ãããå½æ¥ã®ã»ãã·ã§ã³é¸ã³ãäºååå¼·ã®å©ãã«ãªãã°ã¨æãã¾ãã
JJUG CCCã¨ã¯
JJUGã®CCCã§ãï¼
æ¥æ¬Javaã¦ã¼ã¶ã¼ã°ã«ã¼ãï¼JJUGï¼ã®ã¯ãã¹ã³ãã¥ããã£ã«ã³ãã¡ã¬ã³ã¹ï¼CCCï¼ã§ãï¼
ä¾å¹´2åãæ¥ã¨ç§ã«éå¬ããæ¥æ¬æ大ã®Javaã³ãã¥ããã£ã¤ãã³ãã§ãã
Javaé¢é£ã®æè¡ãäºä¾ã«é¢ããè¯è³ªãªã»ãã·ã§ã³ãè¡ãããã¾ãç°ãªãåéã§æ´»èºããJavaæè¡è
ãä¸å ã«ä¼ããå ´ã¨ããªã£ã¦ãã¾ãã
â»Doorkeeperããå¼ç¨
ããããåèªç´¹ä»ï¼åºæ¬çã«Javaæèã§ã®ç´¹ä»ã«ãªãã¾ããâ»ChatGPTã«ããã¨é ¼ã£ã¦ãã¾ãã
ã¯ã©ã¹ãã¡ã½ããã§ä½¿ããã¼ã¿åããã©ã¡ã¼ã¿åããä»çµã¿
ä¾ã¨ãã¦ãList<String>
ãªã©ããã®Listã«ã¯Stringåããå
¥ããªããã¨ãå¶éã§ãã¾ãã
ãã¨ããã©ã®åãåãã決ãããã¨ã«ããåå®å
¨æ§ãé«ã¾ããã³ã³ãã¤ã«æã«ã¨ã©ã¼ãæ¤åºã§ããããããã°ãæ¸ãããã¨ãã§ãã¾ãã
OpenAPI
OpenAPIã¯ãRESTfulãªAPIãè¨è¨ã»è¨è¿°ããããã®æ¨æºä»æ§
APIã®ã¨ã³ããã¤ã³ãããªã¯ã¨ã¹ããã¬ã¹ãã³ã¹ã®å½¢å¼ãèªè¨¼æ¹æ³ãªã©ãYAMLãJSONå½¢å¼ã§è¨è¿°ãã¾ãã
è¨è¿°ããå®ç¾©ãããAPIã®èªåããã¥ã¡ã³ãçæããã¯ã©ã¤ã¢ã³ãã»ãµã¼ãã¼ã³ã¼ãã®èªåçæããã¹ããã¼ã«ããAPIå©ç¨ãå¯è½ã«ãªããå¹ççã«éçºãé²ãããã¾ãã
ãã¡ã¤ã³é§åè¨è¨ï¼DDD: Domain-Driven Designï¼ã¯ãã½ããã¦ã§ã¢ã®è¤éãªæ¥åãã¸ãã¯ï¼ãã¡ã¤ã³ï¼ã«ç¦ç¹ãå½ã¦ãè¨è¨ãè¡ãææ³ã§ãã
ãã¡ã¤ã³ã¨ã¯ãã·ã¹ãã ã解決ãããã¨ããæ¥åãåé¡é åã®ãã¨ã§ãæ¥åæ
å½è
ãå¯ã«é£æºããå
±éã®è¨èªï¼ã¦ããã¿ã¹è¨èªï¼ã使ã£ã¦ã¢ãã«ãå®ç¾©ãã¾ãããã¡ã¤ã³é§åè¨è¨ã¯ãè¤éãªæ¥åãã¸ãã¯ãåæ ããè¨è¨ãè¡ããã¨ã§ãã·ã¹ãã ã®å¤æ´ã«å¼·ããªããããç¹ã«å¤§è¦æ¨¡ãªã·ã¹ãã éçºã§æå¹ã§ãã
Kotlin
Kotlinã¯ãJavaã¨ã®äºææ§ãããããã°ã©ãã³ã°è¨èªã§ãJavaã®ã³ã¼ãã¨ä¸ç·ã«ä½¿ãããããJavaããã®ç§»è¡ãã¹ã ã¼ãºã§ããKotlinã¯ã·ã³ãã«ã§å®å
¨ãªææ³ãæã¡ãNullãæ示çã«æ±ãä»çµã¿ï¼Nullå®å
¨ï¼ãªã©ãç¹å¾´ã§ãã
ãªãã¸ã§ã¯ãæåããã°ã©ãã³ã°ï¼OOPï¼ã¯ããã¼ã¿ã¨ããã«é¢é£ããæä½ãããªãã¸ã§ã¯ããã¨ãã¦ã¾ã¨ãã¦æ±ãããã°ã©ãã³ã°ææ³ã§ãããªãã¸ã§ã¯ãã¯ããã¼ã¿ï¼å±æ§ï¼ã¨ã¡ã½ããï¼æä½ï¼ãæã¡ãåãªãã¸ã§ã¯ããç¸äºã«ä½ç¨ãããã¨ã§ä¸ã¤ã®ããã°ã©ã ãå®æããã¾ãã
Spring
Springã¯ãJavaåãã®å¼·åãªãã¬ã¼ã ã¯ã¼ã¯ã§ããä¾åæ§ã®æ³¨å
¥ï¼DIï¼ãã¢ã¹ãã¯ãæåããã°ã©ãã³ã°ï¼AOPï¼ãªã©ããµãã¼ããã¾ããã¾ãããã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ãã»ãã¥ãªãã£ããã©ã³ã¶ã¯ã·ã§ã³ç®¡çãªã©ãå¤æ§ãªã¢ã¸ã¥ã¼ã«ã§å¹
åºãæ©è½ãæä¾ããéçºãå¹çåãã¾ãã
Spring boot
Spring Bootã¯ãJavaã®ãã¬ã¼ã ã¯ã¼ã¯ã§ããSpringãç°¡åã«ä½¿ããããã«ãããã¼ã«ã§ãè¨å®ãæ§æãèªååããè¿
éãªã¢ããªã±ã¼ã·ã§ã³éçºãå¯è½ã«ãªãã¾ããæå°éã®è¨å®ã§Webã¢ããªã±ã¼ã·ã§ã³ããã¤ã¯ããµã¼ãã¹ãç«ã¡ä¸ããããçµã¿è¾¼ã¿ã®Tomcatãªã©ã®ãµã¼ãã¼ãèªåçã«æä¾ãããéçºè
ãããã«ããã¸ã§ã¯ããéå§ã§ããå©ç¹ãããã¾ãã
Mutation Testing
Mutation Testingã¯ãã³ã¼ãã«å°ããªå¤æ´ãå ãã¦ãã¹ãã®å¹æãè©ä¾¡ãã¾ããå
ã®ã³ã¼ããå¤æ´ããããã¥ã¼ã¿ã³ããã«å¯¾ãã¦æ¢åã®ãã¹ãã±ã¼ã¹ãå®è¡ãããã¹ãããã®å¤æ´ãæ¤åºã§ãããã確èªãã¾ãããã¹ãã失æããã°ããã¹ãã±ã¼ã¹ãå¹æçã§ãããã¨ããããã¾ãããæåããå ´åã¯æ¹åãå¿
è¦ã§ããããã«ããããã¹ãã®å質ãåä¸ããããã¨ãã§ãã¾ãã
ãã¹ããã©ããã
ãã¹ããã©ãããã¯ããã¹ãæ¦ç¥ãè¦è¦åããã¢ãã«ã§ããã¹ãã®ç¨®é¡ã層ã«åããä¸å±¤ã«å¤ãã®ãã¹ããé
ç½®ãã¾ãããã©ãããã®ä¸é¨ã«ã¯ã¦ããããã¹ãï¼åã
ã®é¢æ°ãã¡ã½ããã®ãã¹ãï¼ããããä¸éã«çµ±åãã¹ããä¸é¨ã«ã¨ã³ããã¼ã¨ã³ããã¹ãï¼ã·ã¹ãã å
¨ä½ã®ãã¹ãï¼ãããã¾ãããã®æ§é ã«ãããå¹ççã«ãã¹ããå®è¡ãããã°ãæ©æã«çºè¦ãããã¨ãå¯è½ã§ãã
MicroProfile
MicroProfileã¯ãJavaã®ãã¤ã¯ããµã¼ãã¹ãéçºããããã®ä»æ§ã»ããã§ããMicroProfileã¯ãå¹ççã«ãã¤ã¯ããµã¼ãã¹ãæ§ç¯ã§ããããRESTful APIã®ãµãã¼ããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ããã¤ã¯ããµã¼ãã¹éã®éä¿¡ããã«ã¹ãã§ãã¯ãªã©ã®æ©è½ãããã¾ãã
Valhalla
Valhallaã¯ãJavaã«å¯¾ãã¦æ°ãããã¼ã¿åãã¡ã¢ãªç®¡çã®ã¢ãã«ãå°å
¥ãç®æãããã¸ã§ã¯ãã§ããå¤åï¼value typesï¼ããµãã¼ããããã¨ã§ãããã©ã¼ãã³ã¹ã®åä¸ã¨ã¡ã¢ãªä½¿ç¨ã®æé©åãå³ãã¾ããValhallaã¯ãJavaã®å
ç¢æ§ãä¿ã¡ãªãããããå¹ççãªãã¼ã¿å¦çãå¯è½ã«ãããã¨ãç®æãã¦ãã¾ããå
·ä½çã«ã¯List<int>
ãã§ããããã«ãªãã¨ãã£ããã®ã§ãã
Event Sourcing
Event Sourcingã¯ãã¢ããªã±ã¼ã·ã§ã³ã®ç¶æ
ãå¤æ´ãã代ããã«ããã®å¤æ´ã表ãã¤ãã³ããè¨é²ããã¢ã¼ããã¯ãã£ã¹ã¿ã¤ã«ã§ãããã®ææ³ã§ã¯ããã¹ã¦ã®ç¶æ
å¤æ´ãã¤ãã³ãã¨ãã¦ä¿åãããã·ã¹ãã ã®ç¾å¨ã®ç¶æ
ã¯éå»ã®ã¤ãã³ããåçãããã¨ã§åæ§ç¯ããã¾ããããã«ããããã¼ã¿ã®å±¥æ´ãç°¡åã«è¿½è·¡ã§ãããããã°ããã¼ã¿ã®å¾©å
ã容æã«ãªãã¾ããã¾ããã¤ãã³ãã¹ããªã¼ã ã使ç¨ãã¦ããªã¢ã«ã¿ã¤ã ã®å¦çãåæãå¯è½ã«ãªãã¾ãã
CQRS
CQRSï¼Command Query Responsibility Segregationï¼ã¯ããã¼ã¿ã®å¤æ´ããã³ãã³ããã¨ãã¼ã¿ã®åå¾ããã¯ã¨ãªãã«åããè¨è¨ãã¿ã¼ã³ã§ããåé¢ã«ãããããã©ã¼ãã³ã¹ãã¹ã±ã¼ã©ããªãã£ãåä¸ããç¹ã«å¤§è¦æ¨¡ãªã·ã¹ãã ãè¤éãªãã¸ãã¹ãã¸ãã¯ã«æå¹ã§ããã¤ãã³ãã½ã¼ã·ã³ã°ã¨çµã¿åããã¦ä½¿ç¨ããããã¨ãããã¾ãã
MyBatis
MyBatisã¯ãJavaã®ãã¼ã¿ã¢ã¯ã»ã¹ãã¬ã¼ã ã¯ã¼ã¯ã§ããSQLæãXMLãã¡ã¤ã«ãã¢ããã¼ã·ã§ã³ã§å®ç¾©ãããªãã¸ã§ã¯ãã¨ãã¼ã¿ãã¼ã¹ã®ãããã³ã°ãè¡ãã¾ããã¾ããJDBCã®ã©ããã¼ã¨ãã¦æ©è½ãããã©ã³ã¶ã¯ã·ã§ã³ç®¡çããã£ãã·ã³ã°ãªã©ã®æ©è½ãæä¾ãã¾ããããã«ãããéçºè
ã¯ãã¼ã¿ãã¼ã¹ã¨ã®ããåããå¹ççã«è¡ããããã«ãªãã¾ãã
TestContainers
TestContainersã¯ãDockerã³ã³ãããå©ç¨ãã¦ãã¹ãç°å¢ãç°¡åã«æ§ç¯ã§ãããã¼ã«ã§ããããã«ããããã¼ã¿ãã¼ã¹ãã¡ãã»ã¼ã¸ãã¥ã¼ãªã©ã®å¤é¨ãµã¼ãã¹ããã¹ãç¨ã«ä¸æçã«ç«ã¡ä¸ããå®éã®ç°å¢ã«è¿ãå½¢ã§ãã¹ããå®è¡ã§ãã¾ããããã«ãããéçºè
ã¯ããä¿¡é ¼æ§ã®é«ããã¹ããè¡ããç°å¢ã®ä¸è²«æ§ãä¿ã¤ãã¨ãã§ãã¾ãã
Spring Modulith
Spring Modulithã¯ãSpring Bootã¢ããªã±ã¼ã·ã§ã³ãã¢ã¸ã¥ã¼ã«åããããã®æ©è½ã§ããããã«ããã大è¦æ¨¡ãªã¢ããªã±ã¼ã·ã§ã³ãå°ããªãç¬ç«ããã¢ã¸ã¥ã¼ã«ã«åå²ããéçºããã¹ããå¹ççã«è¡ããã¨ãã§ãã¾ããåã¢ã¸ã¥ã¼ã«ã¯æ確ãªå½¹å²ãæã¡ãä»ã®ã¢ã¸ã¥ã¼ã«ã¨ã®ä¾åé¢ä¿ã管çãããã¨ã§ãã¢ããªã±ã¼ã·ã§ã³ã®ä¿å®æ§ãåä¸ããã¾ãã
Qodana
Qodanaã¯ãJetBrainsãéçºããéçã³ã¼ã解æãã¼ã«ã§ããJavaã³ã¼ããªã©ãèªåã§ãã§ãã¯ããæ½å¨çãªãã°ãåé¡ç¹ãæ©æã«çºè¦ãããã¨ãã§ãã¾ããã»ãã³ãã³æ¼ããªã©ã®ææ³ãã¹ãå¤æ°ã®ä½¿ãæ¹ãªã©ã®æ½å¨çãªãã°ãã³ã¼ãã£ã³ã°è¦ç´éåãæ¤ç¥ã§ãã¾ãã
Quarkus
Quarkusã¯ãJavaã§ã¯ã©ã¦ããã¤ãã£ããªã¢ããªã±ã¼ã·ã§ã³ãéçºããããã®ããªã¼ãã³ã½ã¼ã¹ã®ãã«ã¹ã¿ãã¯ãã¬ã¼ã ã¯ã¼ã¯ã§ããç¹ã«ãã³ã³ããããµã¼ãã¼ã¬ã¹ç°å¢ã§ã®å®è¡ã«ç¹åãã¦ãããå¾æ¥ã®Javaã¢ããªã±ã¼ã·ã§ã³ãããé«éãã¤è»½éã«åä½ããããã«è¨è¨ããã¦ãã¾ãã
Micronaut
Micronautã¯ãJavaã§ãã¤ã¯ããµã¼ãã¹ãéçºããããã®ã軽éãã¤ã¢ãã³ãªãã¬ã¼ã ã¯ã¼ã¯ã§ããç¹ã«ãã³ã³ããç°å¢ã§ã®å®è¡ã«æé©åããã¦ãããé«éãªèµ·åã¨ä½ã¡ã¢ãªæ¶è²»ãå®ç¾ãã¾ãã
GraalVM
GraalVMã¯ãJavaä»®æ³ãã·ã³ï¼JVMï¼ä¸ã§åä½ããå¤è¨èªä»®æ³ãã·ã³ã§ããJavaã¢ããªã±ã¼ã·ã§ã³ã®ããã©ã¼ãã³ã¹åä¸ã¨ã¯ã©ã¦ããã¤ãã£ããªç°å¢ã¸ã®é©å¿ã«å¤§ããè²¢ç®ãã¦ãã¾ãã主ãªç¹å¾´ã¨ãã¦ããã¤ãã£ãã¤ã¡ã¼ã¸æ©è½ããããJavaã¢ããªã±ã¼ã·ã§ã³ããã¤ãã£ãã³ã¼ãã«ã³ã³ãã¤ã«ãããã¨ã§ãã¹ã¿ã¼ãã¢ããæéãç縮ããã¡ã¢ãªæ¶è²»ãåæ¸ãã¾ãã
ã¾ã¨ã
ãã£ããåèªãã¾ã¨ãã¾ããããã»ãã·ã§ã³è©³ç´°ã«ã¯ã¾ã ã¾ã æ¾ããããªãã£ãåèªãããã¾ãã
å½æ¥ã¾ã§ãã¨æ°æ¥ï¼äºåã«äºç¿ãã¦ãã¶ã£ã¤ãæ¬çªã§ãå½æ¥ã¯ãã²ãããããªã»ãã·ã§ã³ã楽ãã¿ã¤ã¤ãå¦ã³ãæ·±ãã¦ãã ããï¼
ååã¯å
¨ã»ãã·ã§ã³ã«ã¤ãã¦äºç¿ãæ¸ãã¦ãã¾ããããã¡ãã£ã¨ã«ããªã¼é«ãããã®ã§è«¦ãã¾ããã
âååã®è¨äº
hk-it.hatenablog.com
ã¡ãªã¿ã«ç§ã¯å½æ¥ã¹ã¿ããã¨ããã¹ããæ£ããããã¹ãããï¼Mutation Testingå
¥éï¼ãã¨ããã¿ã¤ãã«ã§ã®ã»ãã·ã§ã³ãè¡ãã¾ãã®ã§ãããããé¡ããã¾ãï¼ï¼