ã¯ããã«
ãGoogle App Engineï¼GAEï¼/Javaã§ã¯ãJavaä»®æ³ãã·ã³ä¸ã§åä½ããè¨èªãå©ç¨ãããã¨ãã§ãã¾ããä¾ãã°ãJRubyãGroovyãªã©ã§ãã
ãScalaããã³ã³ãã¤ã«ãããã¨ã«ããJavaä»®æ³ãã·ã³ä¸ã§åä½ããã¯ã©ã¹ãã¡ã¤ã«ãçæããè¨èªã§ãã®ã§ãå½ç¶ãGAE/Javaä¸ã§åä½ããããã¨ãã§ãã¾ãã
ãScalaãåä½ããã¨ãããã¨ã¯ãScalaã§ã§ãã¦ããWebã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã§ããLiftãå ã«ä½æãããã¢ããªã±ã¼ã·ã§ã³ããGAE/Javaã«è¼ãããã¨ãã§ããã¨ãããã¨ã§ãã
ãåå¾ç·¨ã§æ§æãããæ¬é£è¼ã§ã¯ãScalaããã³LiftãGAE/Javaä¸ã§åä½ãããæ¹æ³ã解説ããå¾ããµã³ãã«ã¢ããªã±ã¼ã·ã§ã³ã§Googleãæä¾ãããã¾ãã¾ãªAPIãå©ç¨ãããGAEãªãã§ã¯ã®ã¢ããªã±ã¼ã·ã§ã³ãä½æãã¦ãGAEã§ã®ã¢ããªã±ã¼ã·ã§ã³ä½æã®ã¤ã¡ã¼ã¸ãã¤ããã§é ããã¨ãç®æ¨ã¨ãã¾ãã
ãLiftã«ã¤ãã¦ã®åºæ¬çãªè§£èª¬ã¯ããScala + Liftå®è·µéçºããã覧ãã ããã
対象èªè
- Javaã¯ç¥ã£ã¦ããããScalaãå¦ãã§ã¿ããã¨æã£ã¦ããæ¹
- Scalaã§ã®Webã¢ããªã±ã¼ã·ã§ã³éçºã«èå³ãããæ¹
- Google App Engineã§ã®ã¢ããªã±ã¼ã·ã§ã³éçºã«èå³ãããæ¹
åä½ç°å¢
- J2SE 6.0 JDK
- Apache Maven 2.20
- Scala 2.7.7.final
Google App Engine/Java
ãGoogle App Engineã«ã¤ãã¦ã¯ãåãã®æ¹ãå¤ããã¨æããã¾ããã²ã¨ãã¨ã§è¨ãã¨ãä»»æã®ã¢ããªã±ã¼ã·ã§ã³ãGoogleãæä¾ããã¯ã©ã¦ãç°å¢ã§åä½ããããã¨ãã§ãããµã¼ãã¹ãã§ããããã詳ãã解説ã«ã¤ãã¦ã¯ã以ä¸ã®è¨äºããããé ãã®ãæã£åãæ©ãã¨æããã¾ãã
- Google App Engine for Javaã使ã£ã¦ã¿ããï¼
- Google App Engineã§éçºããã¹ã±ã¼ã«ããã¢ããªã±ã¼ã·ã§ã³ï¼åç·¨ï¼
Google App Engineã§ã®Lift
ãLiftã®Google App Engineã¸ã®å¯¾å¿ã§ãããç¾å¨ã®å®å®ãã¼ã¸ã§ã³ã§ãã1.0ç³»ã§ã¯ãGoogle App Engineã§ã®APIå¶éã®ãããæ®å¿µãªãããã®ã¾ã¾Google App Engineä¸ã§ã¢ããªã±ã¼ã·ã§ã³ãåä½ããããã¨ãã§ãã¾ããããããã次ãã¼ã¸ã§ã³ã§ããLift1.1ã§ã¯ãGoogle App Engineã¸ã®å¯¾å¿ãåãè¾¼ã¾ãã¦ããããã®Lift1.1ã§æ§ç¯ãããã¢ããªã±ã¼ã·ã§ã³ã¯åé¡ãªãåä½ãã¾ãã
ãã¨ã¯ãããGoogle App Engineã§ã®å¶éã«ãããLiftã§ã®Commetãµãã¼ãã¯Google App Engineä¸ã§åä½ããã¢ããªã±ã¼ã·ã§ã³ã§ã¯å©ç¨ãããã¨ãã§ãã¾ãããããã¯ãGoogle App Engineä¸ã§ã¯ã¦ã¼ã¶ã¼ãThreadãçæã§ããªãããã§ãã
ãã¾ãããã¼ã¿ãã¼ã¹ã¸ã®ã¢ã¯ã»ã¹ãè¡ãLift/MapperããGoogle App Engineä¸ã§ã®ãã¼ã¿ã¹ãã¢ã«ãã®ã¾ã¾ã§ã¯å¯¾å¿ãã¦ãã¾ãããJPA/JDOãçµç±ãããã¨ã§ãéå®çãªããLift/Mapperãå©ç¨ãããã¨ã¯ã§ãã¾ãã
ãLift/Mapperã«ã¤ãã¦ã¯ããScalaï¼Liftãã¬ã¼ã ã¯ã¼ã¯ã®Modelããåç §ãã¦ãã ããã
éçºç°å¢ã®æ§ç¯
ãGoogle App Engineã§ã®ã¢ããªã±ã¼ã·ã§ã³éçºãè¡ãããã®ç°å¢ã«ã¤ãã¦èª¬æãã¾ãã
ãé常ã®Scala/Liftã®éçºç°å¢ã®ä»ã«ãGoogleãæä¾ããGoogle App Engineç¨ã®SDKãå¿ è¦ã«ãªãã¾ãã
ãå ·ä½çã«å¿ è¦ãªã½ããã¦ã§ã¢ã¯ã次ã®ã¨ããã§ãã
- JDK6 Update 15以ä¸
- Scala 2.7.7.final
- Apache Maven 2.2.0以ä¸
- Google App Engine SDK for Java 1.3.1
JDKã®ã¤ã³ã¹ãã¼ã«
ãJDKã«ã¤ãã¦ã¯ããJava SE ãã¦ã³ãã¼ãããããOSã«åã£ãã¤ã³ã¹ãã¼ã©ã¼ããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
Apache MavenãScalaãGoogle appengine java SDKã®ã¤ã³ã¹ãã¼ã«
ãApache MavenãScalaãGoogle App Engine SDK for Javaã«ã¤ãã¦ã¯ãåãã¦ã³ãã¼ããã¼ã¸ããå§ç¸®ãã¡ã¤ã«ãåå¾ãã¦ä»»æã®ãã£ã¬ã¯ããªã«å±éããå±éããããã£ã¬ã¯ããªä»¥ä¸ã®binãã£ã¬ã¯ããªãå®è¡ãã¹ã«è¨å®ãã¾ãã
ãGoogle appengine java SDKã¯ãpythonçã¨Javaçãããã¾ãã®ã§ãJavaçï¼pythonçã®ä¸ã«ããã¾ãï¼ããã¦ã³ãã¼ãããããã«æ³¨æãã¦ãã ããã