Scala
ããããPlay Framework 2.9.0ãåºããã§ãããã¨ãããã¨ã§èªåã®éã£ãPull Requestãã¾ã¨ãã¦ã¿ã¾ããã 大ããã¨ããã ã¨Twirlã®Scala 3対å¿ã§ãããããæãã«ã¨ã©ã¼ã¡ãã»ã¼ã¸åºãã®ã«dottyã¨ãsbtã¾ã§èª¿ã¹ããã¨ã«ãªã£ã¦æ²¼ã§ããããã¶ããªãã¨ããªãâ¦
speakerdeck.com ç´ç²é¢æ°åã¹ã¿ã¤ã«ã®ããã°ã©ãã³ã°ã¯ç§ã¯ãã¾ããã£ã¦æ¥ãªãã£ããã§ããããã¾ã«ã¯éã£ããã¨ããã£ã¦ã¿ããããªã¨æã£ã¦çºè¡¨ãã¦ã¿ã¾ãããå¹´æ«å¹´å§ã«Typelevelã®æè¡ã¹ã¿ãã¯ãããããè¦ã¦ã¦http4sã¨ãããã£ã¦ã¿ã¦ãããããã§ãããâ¦
Play FrameworkãLightbendã®æããé¢ãã ã¨ããçºè¡¨ãæ¨å¹´ã®10æã«ãã£ããã§ãããããããã£ããã«ããã¨ãã㦠Play Frameworkã®GitHub Team ã«å ¥ãã¦ãããã¾ããã ãã°ããå¾ ã¡ã®ç¶æ ã ã£ããã§ãããå é±ãããããåãåããã¨ããã§ããã¨ãããâ¦
æè¿éããå¦çèµ°ããã¦ãæã¨ãã«IntelliJãé ãã¦ã¤ããã£ãã®ã§Emacsã§ãããç¨åº¦ã³ã¼ãèªãã ãæ¸ãããåºæ¥ãããã«ãã¾ããã æè¿ã¯LSPã人æ°ããããã§Emacsã§ãlsp-modeã¨ããã®ãçµæ§ä½¿ããã¦ããã¿ãããScalaã®å ´åã¯LSPã¨ãã¦Metalsã使ããã¨â¦
scala-stewardã使ãå§ãã¾ããã ã¡ãã£ã¨ä½¿ãã ããªãscala-stewardã®repos.mdã«ãã«ãªã¯ã¨ã¹ãéãã ãã§è¯ãã¦ä¾¿å©ãªãã§ãããå人ã®éå¤ãªããã¸ã§ã¯ãå ¨ã¦ã«ãããããã®ã¯ã¡ãã£ã¨æ°ãå¼ããã®ã§èªåã§ãåãããããã«ãã¾ããã ä»ã ã¨GitHub Actiâ¦
sbt 1.4.0 ãã sbtn ã¨ããæ©è½ã追å ããã¾ããã https://eed3si9n.com/sbt-1.4.0-beta Native thin client sbt 1.4.0 adds an official native thin client called sbtn that supports all tasks. > https://github.com/sbt/sbtn-dist/releases/tag/v1.4â¦
github.com Modules should be fast and side-effect free Modules should be fast and side-effect freeï¼ã¢ã¸ã¥ã¼ã«ã¯éãã¦å¯ä½ç¨ãªãã§ããã¹ãï¼ã¨ Guice ã® Wiki ã«ã¯ããã¾ãã ãã㯠Guice ã¢ã¸ã¥ã¼ã«ã®ä¸ã§ DB ã«æ¥ç¶ãããã¹ã¬ããéå§ãããããâ¦
Play frameworkã¯ãã£ãã·ã¥ã®ããã®APIã play.api.cahe ã¨ããããã±ã¼ã¸ã§æä¾ãã¦ãã¾ããplay.api.cache ã¯ãã®ããã¯ã¨ã³ãã¨ãã¦ãCaffineãEhcacheãé¸æã§ããã¾ããµã¼ããã¼ãã£ã®ã©ã¤ãã©ãªã使ãã°Memcached, Redisãªã©ãããã¯ã¨ã³ãã«ãããã¨â¦
Scalaã¨Javaã®ã³ã¬ã¯ã·ã§ã³ãç¸äºã«å¤æããã«ã¯ scala.collection.JavaConverters ã便å©ã§ããä¾ãã°Javaã®ã³ã¬ã¯ã·ã§ã³ã« .asScala ãã¤ããã°ãJavaã®ã³ã¬ã¯ã·ã§ã³ãã©ããããScalaã®ã³ã¬ã¯ã·ã§ã³ãä½ããã¾ãããã ãããã¤ã .asScala ã§æ¸ãã¨ã¯éãâ¦
Scalaã§ç¬èªã®ä¾å¤ãå®ç¾©ããå ´å class MyException(message: String) extends RuntimeException(message) 㨠case class MyException(message: String) extends RuntimeException(message) ã®ã©ã¡ããè¯ãã§ãããããã¿ã¤ãã«ã§è¨ã£ã¡ãã£ã¦ã¾ãããã¾ãâ¦
taroleoãããéçºãã¦ããAirframeãæè¿Twitterã®ã¿ã¤ã ã©ã¤ã³ã§è©±é¡ã«ãªã£ã¦ãããã¨ãå¤ãã®ã§ããããã触ã£ã¦ã¿ãããã¨æããã¨ããããPlay frameworkã®DIã³ã³ãããGuiceããAirframeã«ç½®ãæããã¨ããã®ããã£ã¦è¦ã¾ãããçµæã¯å¤±æã«çµãã£ããâ¦
play-jsonã¯Reads/Writes/Formatãå®ç¾©ããã®ãé¢åã¨ããè¨ãããã®ã§ãshapelessã®ç·´ç¿ãå ¼ãã¦ä½ã£ã¦ã¿ã¾ããã https://github.com/tototoshi/play-json-generic scala> import play.api.libs.json._ import play.api.libs.json._ scala> case class Perâ¦
Akka Streamã使ã£ããµã¼ãã¼ãæ¸ãã¦ãã¦ããµã¼ãã¼ã®çµäºå¦çãè¡ãæã«streamãåæ¢ãããå¿ è¦ãåºã¦ãã¾ãããã©ããããè¯ãã§ããããã ãããªã ActorSystem#terminate ã¨ããããAkka Streamèªä½ã®çµäºã®ããæ¹ãããã¯ç¡çãã ActorSystem#terminâ¦
slick2ããslick3ã¸ã®ç§»è¡ã¯APIãæ ¹æ¬çã«å¤ãã£ãããã«ãã¡ããã¡ã大å¤ã§ããblocking-slick ã使ã£ãæ¹æ³ãªã©ãç¥ããã¦ãã¾ãããã¡ãã£ã¨ä½¿ã£ã¦è¯ããã®ãã¯æ©ã¿ã¾ãã blocking-slickã使ã£ã¦ã使ããªãã¦ãslick2ããslick3ã¸ã®æ¸ãæããä¸åº¦ã«ããâ¦
混迷極ã¾ãScalaã®Jsonã©ã¤ãã©ãªäºæ ã§ãããæè¿ã¯circeã¨ããã©ã¤ãã©ãªãã¡ã¸ã£ã¼ã«ãªã£ã¦ãã¾ããããã å人çã«ã¯ãã¾ãä»äºã§ã¯æ¡ç¨ããæ°ã«ã¯ãªããªãã©ã¤ãã©ãªã§ãã catsã«ä¾åãã¦ãã circeã®å£²ãã¨ãã¦ãcats以å¤ã®ã©ã¤ãã©ãªã«ä¾åãã¦ããªãâ¦
ä¸å¤ãªãã¸ã§ã¯ãã使ã£ãããã°ã©ã ãæ¸ãæã«ä¾¿å©ãªcase classã§ãããcase classã®ã¡ãªãããçããã¤ã¤å¯ä½ç¨ãæ±ãããã«ã¯ã©ã®ãããªæ¸ãæ¹ãããã®ãè¯ãã§ãããããå ·ä½çã«ã¯å¤é¨APIããã¼ã¿ãã¼ã¹ã¸ã®ã¢ã¯ã»ã¹ãcase classã使ã£ã¦ã©ãå®è£ ããã®â¦
ScalaMatsuriã®ææ³ããã°ã§ã ScalaMatsuriã§scala.metaã®è©±ã2ã¤èãã¦é¢ç½ããã¨æã£ãã®ã§ç§ããã£ã¦ã¿ã¾ããã typesafe configãscala.metaã¨scalameta/paradiseã®macro annotationã§è¨å®ãã¹ãæååã§ã¯ãªãscalaã®ã³ã¼ãã§è¡¨ç¾ã§ããããã«ãããã¤â¦
é 延è©ä¾¡ã¨å¯ä½ç¨ã¯ç¸æ§æªãããã£ã¦è©±ã§ãã Scalaã§foreachã§ã¯ãªãmapã®ä¸ã§å¯ä½ç¨ãèµ·ããã¨ãã¾ã«è©ä¾¡ã¿ã¤ãã³ã°ã«ãããããã¥ãããã°ã«ééãããã¨ãããã¾ãã 次ã®ã³ã¼ãã¯Map#mapValuesã®ä¸ã§scalikejdbcã§æ¸ãè¾¼ã¿ãè¡ããã¨ããã³ã¼ãã§ãã â¦
scala 2.12ã§ã¯Java8対å¿ã®å¤æ´ãå¤ããæ´¾æãªå¤æ´ã¯å¤ãã¯ããã¾ããã§ããããããªä¸ã§Eitherãright-biasedã«ãªã£ãã®ã¯å²ã¨ãã£ããã¼ãªã®ã§ã¯ãªãã§ãããããEitherã«ã¯ä»ã¾ã§flatMapãªã©ã®ã¡ã½ããããªãã£ãã®ã§ãforå¼ã®ä¸ã§ä½¿ãã¨ããªã©ããã£ããâ¦
sbtåå ¥éã¨ãããã¨ã§ãsbtã®ä¸»ã«Keyã¨Scopeã«ã¤ãã¦ãã¢ãä¸å¿ã«çºè¡¨ããã¦ããã ãã¾ããã ãã¢ãä¸å¿ã«ããã®ã¯èªåã¨ãã¦ã¯ææ¦ã®ã¤ããã ã£ãããã©ããã£ã±ãé£ããã¦å¿æ®ããªã¨ãããããã¾ããã ã¨ã¯ããçºè¡¨ä¸ã«å®éã«sbtã触ãã¤ã¤è©±ãèãã¦ãâ¦
æè¿ã¯activator newã使ã£ã¦ãã人ãå¤ããã ã¨æãã¾ããã5å¹´ãããå?ã¯giter8ã¨ãããã¼ã«ã使ããã¦ãã¾ããã giter8ã¯ä¸ææTypesafe Stackã«ãå«ã¾ããã»ã©ã ã£ããã§ããããªããè¦æ¨ã¦ããã¦ãã¾ãã¾ãã ãã®å¾çãããåç¥ã®éãactivator newâ¦
Playã触ã£ã¦ããã¨è¬ã®ClassNotFoundExceptionãçºçãããã¨ãããã¾ãã ããããã¦ããã¯DEVã¢ã¼ãã ãã§èµ·ãã¦ã¯ããªãã§ããããï¼ å æ¥ãéçºä¸ã®Playã¢ããªã±ã¼ã·ã§ã³ã§ãããä¾åã©ã¤ãã©ãªããClassNotFoundExceptionãçºçããã¨ããç¾è±¡ã«ãããâ¦
ãSteps to master the Play source codeãã¨ããã¿ã¤ãã«ã§çºè¡¨ããã¦ããã ãã¾ããã Playåå¥ã®ã»ãã·ã§ã³ããªãã£ããã¨ã¨ãã©ããé¢æ°åã£ã½ãã®ãå¤ããã ãããªã¨æã£ã¦ç³ãè¾¼ã¿ã¾ãããPlayã®åç´è åãã®Playã®ã½ã¼ã¹ã³ã¼ãã®å ¨ä½åã¨ãã®å¤é·ã«ã¤â¦
Playã®ããã¥ã¡ã³ããè¦ãã¨ãã«ãå ¬å¼ãµã¤ãã«è¡ããªãã¦ãæå 㧠http://localhost:9000/@documentation ã¨ããURLã«ã¢ã¯ã»ã¹ããã°ããã¥ã¡ã³ããµã¤ããè¦ããã¨ãããã¨ã¯ãåç¥ã§ããããï¼ ããã«ã¯WebCommandsã¨ããä»çµã¿ã§åãã¦ãã¦ãããã¥ã¡ã³ãâ¦
scalaã§ã¯Futureãªã©ã®è£å´ã§ã¯ExecutionContextãåãã¦ãã¾ããã¨ãããã¨ã¯ExecutionContextã®ä½¿ãæ¹ããã¾ãã¡ã ã¨Futureå¨ãã§åé¡ãèµ·ãããã¨ã«ãªãã¾ãã ããèµ·ããåé¡ã®1ã¤ã¨ãã¦ãæ¨æºã®ExecutionContextããã¾ãã¡ã ã£ããã¨ããã®ãããã¨æãâ¦
Dependency Injectionã¨ã¯ã³ã³ãã¼ãã³ãéã®ä¾åé¢ä¿ãããã°ã©ã ã®ã½ã¼ã¹ã³ã¼ãããæé¤ããå¤é¨ã®è¨å®ãã¡ã¤ã«ãªã©ã§æ³¨å ¥ã§ããããã«ããã½ããã¦ã§ã¢ãã¿ã¼ã³ã§ãã ã£ã¦wikipediaå çãè¨ã£ã¦ã¾ããã Scalaã«ãããæé©ãªDependency Injectionã®æ¹æ³â¦
æä½ã£ãscalikejdbcã®fixtureãã©ã°ã¤ã³ãããå¥ã«Playã®ãã©ã°ã¤ã³ã«ãããã¨ã¯ãªãã£ããªã¼ã¨ã¡ãã£ã¨æã£ã¦ããã§ãããæè¿å®éå°ãã¯ãããã®ã§ãPlayã«ä¾åããªãfixtureã©ã¤ãã©ãªã欲ãããªã£ãã®ã§ä½ãã¾ããã https://github.com/tototoshi/scalâ¦
ãã¬ã¼ã ã¯ã¼ã¯ã®ä¾¿å©ãã¨ã³ã¼ãã®æè»æ§ã¨ã®ãã©ã³ã¹ã®è©±ã Playã«ã¯ããããMVCçãªæ©è½ã®ä»ã«ããããã¨ä¾¿å©ã£ã½ãã¢ã¸ã¥ã¼ã«ãä»ãã¦ãã¾ããã å®éããã¤ãã使ã£ã¦ããã¨ä¾åé¢ä¿ãæè»æ§ã®é¢ã§ã¡ããã¡ããå°ããã¨ãããã¾ãã æè¿ä½åº¦ãå°ã£ãã®â¦
ç§ã®ç解ãæ£ãããã°ãPlay2.4ã®ãã©ã°ã¤ã³ã·ã¹ãã ã«ã¯ãã©ã°ã¤ã³ã®èµ·åé ãå¶å¾¡ã§ããªãã¨ãã大ããªæ¬ é¥ãããã¾ããPlay2.3以åã¯play.pluginsãã¡ã¤ã«ã«åªå 度ãè¨è¿°ããã¨ããã¤ã±ã¦ãªãæãæ¼ãããæ¹ã§ã¯ããã¾ããããåé¡ãªãå¶å¾¡ãããã¨ãã§ãâ¦
å é±å¤§éªè¡ã£ã¦ãã¾ããã å 容ã¨ãã¦ã¯ãflyway-playãã¨ãããFlywayã®ç´¹ä»ã£ã½ããªã£ã¦Scalaæåèãã«ãªãã¾ããã