ããªãåã«ãHabré ã«é¢ããèšäºãå ¬ââéããŸãããããã§ãèªåã®ãããžã§ã¯ãTeaVMã«ã€ããŠè©±ããŸããã ãã以æ¥ã圌ã«å€ãã®ããšãèµ·ãããŸããã1ã€éèŠãªããšãå«ããŠã以äžã§èª¬æããŸãããã®ããã«ãHabrã§ããäžåºŠæžãããšã«ããŸããã ããããæåã«ããããžã§ã¯ãã®ç®çãç°¡åã«æãåºããŠãã ããã
ãã®ãããTeaVMã¯JavaScriptã®Javaãã€ãã³ãŒãã³ã³ãã€ã©ã§ãã TeaVMãäœæãããšããã¢ã€ãã¢ã¯ããã«ã¹ã¿ãã¯Javaéçºè ãšããŠåããŠããŠãGWTããã³ããšã³ãã䜿çšããŠèšè¿°ããŠãããšãã«æãã€ããŸããã åœæïŒããã³ããã¯çŽ5幎åïŒãnode.jsãwebpackãbabelãTypeScriptãªã©ã®ããŒã«ã¯åºãé åžãããŠããŸããã§ããã Angularã¯æåã®ããŒãžã§ã³ã§ãããReactãvue.jsã®ãããªä»£æ¿æ段ã¯ãŸã£ãããããŸããã§ããã ãã®åŸãçå£ã«ãIE7ã§ãµã€ãããã¹ãããŸããïŒãããŠãIE6ã§ããã顧客ã«äžéã ã£ã人ãããŸãïŒã äžè¬çã«ãJavaScriptãšã³ã·ã¹ãã ã¯çŸåšããã¯ããã«æçããŠããããèŠåŽããã«JavaScriptãæžãããšã¯ã§ããŸããã§ããã
GWTã奜ãã ã£ãã®ã¯ãããããã¹ãŠãèæ¯ã«ãé©åãªè§£æ±ºçã®ããã«æããããã§ãããæ¬ ç¹ããªãããã§ã¯ãããŸããã äž»ãªåé¡ã¯ã«ããã®äžã«ãªã¹ããããŠããŸãã
- åçµã¿ç«ãŠã®é床ã«ã¯ãå€ãã®èŠæããããŸããã GWTãéåžžã«é ãã§ãã ç§ãã¡ã¯ç·šéãéå§ããã¯ãããŒã§ãè¶ã飲ã¿ã«è¡ããŸããã
- GWTã¯å ¥åãšããŠJavaãœãŒã¹ãåãåãããããŸãåäœãé ãïŒJavaã³ãŒãã®è§£æãšè§£æ±ºã¯ç°¡åãªäœæ¥ã§ã¯ãããŸããïŒã第äºã«ãJava以å€ããµããŒãããŠããŸããã第äžã«ããµããŒãã§ãé ããŠããŸãã Javaèªäœã®æ°ããããŒãžã§ã³ã
- GWTã¯UIãäœæããããã®ã²ã©ããã¬ãŒã ã¯ãŒã¯ã§ãã äžæ¹ã§ã¯ã圌ã¯DOMããæœè±¡åããããšããŠããŸãããä»æ¹ã§ã¯ã圌ã¯åžžã«æåŸãŸã§è¡ãããã§ã¯ãªããæœè±¡åãããŒããããDOMãžã®çŽæ¥ä»å ¥ã«ãã£ãŠãããä¿®æ£ããã®ã¯ç°¡åã§ã¯ãããŸããã æœè±¡åã®åãå±€ãçªç Žããå¿ èŠããããŸãã ããã«ãææäžçå šäœãããŒã¯ã¢ããã®å®£èšçèšè¿°ïŒ.NETãJavaFXãFlexãäžèšã®ææ°ã®JavaScriptãã¬ãŒã ã¯ãŒã¯ã®WPFïŒã®ãã¹ã«æ²¿ã£ãŠç§»åããŠããéãGWTã¯å€ãæ¹æ³ã§ãŠã£ãžã§ããããUIãåéããããšã匷å¶ããŸããã
Javaã§Webã¢ããªã±ãŒã·ã§ã³ãäœæãããšããèãèªäœãæªããšã¯æããŸããã§ããã GWTã®ãã¹ãŠã®æ¬ ç¹ã¯ãç§ã«ã¯æããããGoogleããã®éçºã«ååãªãªãœãŒã¹ãæè³ããªãã£ããšããäºå®ã«ãããã®ã§ããã JavaScriptã«åãæ¿ããã®ã§ã¯ãªããGWTã®æ¬ ç¹ã«ææ ¢ããããšã奜ã¿ãŸããã
ãããŠãç§ã¯èããŸãã-å ¥åãšããŠJavaãã€ãã³ãŒãã䜿çšããªãã®ã¯ãªãã§ããïŒ ãã€ãã³ãŒãã¯ãœãŒã¹ããã°ã©ã ã«é¢ããå€ãã®æ å ±ãä¿åãããããéã³ã³ãã€ã©ãŒã¯ãœãŒã¹ãã»ãŒæ£ç¢ºã«åŸ©å ããããšãã§ããŸãã Javacã¯ãã€ãã³ãŒããçæããæãé£ããäœæ¥ããã¹ãŠå®è¡ãããããJavaScriptã®çæã«ã¯å°ãæéãããããŸãã ããã«ãJVMã®ä»ã®èšèªã®ãµããŒããšãJavaã®æ°ããããŒãžã§ã³ã®ã»ãŒç¡æã®ãµããŒããååŸããŸãïŒãã€ãã³ãŒãã¯Javaèšèªãããã¯ããã«ä¿å®çã§ãïŒã
ãã®ãããžã§ã¯ãã§äœããããããã£ã
ç§ã¯ãã§ã«ãããžã§ã¯ãã«å€ãã®èå³æ·±ãããšãèµ·ãã£ããšèšã£ãŠããŸãã ããã§ç§ãã話ããããæãéèŠãªãã€ã³ãã¯æ¬¡ã®ãšããã§ãã
- ã¹ã¬ããã®ãµããŒããç»å ŽããŸããã JavaScriptã§ã¯ããããã¯ãŸã£ãããããŸãããWebWorkersã¯ããã«ã€ããŠã§ã¯ãããŸãããã¹ã¬ãããšã¯ç°ãªããå
±æç¶æ
ãæããªãããã§ãã ããã¯ãŒã«ãŒã§ãªããžã§ã¯ããäœæããã³ããŒããã«å¥ã®ã¯ãŒã«ãŒã«è»¢éããããšã¯ã§ããŸããã 代ããã«ãTeaVMã¯ã¡ãœããã®ã³ãŒããå€æããŠãç¹å®ã®ãã€ã³ãã§å®è¡ãäžæã§ããããã«ããããšãã§ããŸãïŒbabelãåŸ
æ©ããŠãããšããšã»ãŒåãã§ãïŒã ããã«ããã1ã€ã®ã¹ã¬ãããé·ãIOæäœïŒãŸãããŸãã¯äžéšã®
Thread.sleep()
ïŒã«éãããšãã«ãäžæåæ¢ããŠå¥ã®ã¹ã¬ããã®å®è¡ãèš±å¯ãããšãã«ãããããŒãžã§ã³ã®å調ãã«ãã¿ã¹ã¯ãäœæã§ããŸããã - å®éšäžã¯ãWebAssemblyã®ãµããŒãããããŸãã ä»»æã®ãã€ãã³ãŒãã¯ãµããŒããããŠããŸãããJVMåºæã®åŒ·åãªJDKã¡ãœããã®äžéšã¯ãµããŒããããŠããŸããïŒããã¯äž»ã«ç°ãªãåæ ã§ãïŒã ãŸããäœãšã®çžäºéçšããŸã£ãããããŸããã JavaScriptãåŒã³åºãã«ã¯ãéåžžã«é·ãéã¿ã³ããªã³ãšèžãå¿ èŠããããŸãã äžè¬ã«ãWebAssemblyããµããŒãããããã«ãGCãšã¹ã¿ãã¯ã®ã¢ã³ã¯ã€ã³ããèšè¿°ããå¿ èŠããã£ãããããã®WebAssemblyã¯äœã¬ãã«ã§ãïŒ æéãçµã€ã«ã€ããŠã圌ãã¯GCãšäŸå€ã®ãµããŒããè¿œå ããããšãçŽæããŸããããããŸã§ã®ãšãããããã¯æ¬åœã®ã¢ã»ã³ãã©ãŒã§ãã
- TeaVMã§tea frv web frendendãäœæããããã®ãã¬ãŒã ã¯ãŒã¯ããããŸããããããã¯ãŸãã«ãã®ãã¥ãŒã¹ãªã®ã§ããã®èšäºãæžããŸããã ãã ãã詳现ã¯ä»¥äžã®ãšããã§ãã
Webãã¬ãŒã ã¯ãŒã¯
TeaVMã®Webãã¬ãŒã ã¯ãŒã¯ã¯FlavorãšåŒã°ããå®å šã«Javaã§èšè¿°ãããŠããŸãã æè¿ãMaven Centralã«æåã®ããŒãžã§ã³ïŒçªå·0.1.0ïŒãæçš¿ããŸããã ã€ããªãã®ãŒçã«ã¯ãææ°ã®Angular 2/4ããã³Vue.jsã«äŒŒãŠããŸãããJavaéçºè ã«è¿ãã€ãã£ãªã ã«å®å šã«åºã¥ããŠããŸãã ããšãã°ãFlavorã®ãã¹ãŠã®ã³ã³ããŒãã³ãã¯ãã¢ãããŒã·ã§ã³ã§ããŒã¯ãããéåžžã®Javaã¯ã©ã¹ã«ãã£ãŠè¡šãããŸããããããã£ãšç¶æ ããŸãã¯å€åããããããã£ãã«ãã»ã«åããå¿ èŠã®ããç¹å¥ãªãªããžã§ã¯ãã¯ãããŸããã HTMLãã³ãã¬ãŒãèšèªã¯å®å šã«éçã«åä»ããããŠããããªããžã§ã¯ãã®ããããã£ãŸãã¯ã€ãã³ããã³ãã©ãŒã®åŒã³åºãã¯ã³ã³ãã€ã«æã«ãã§ãã¯ãããŸããããšãã°ãããããã£åã®ã¿ã€ããã¹ã¯ãåã«ãããžã§ã¯ãã®ã³ã³ãã€ã«ãèš±å¯ããŸããã
ãµãŒããŒãšã®éä¿¡ã®ããã«ãFlavorã¯JAX-RS泚éã§ããŒã¯ãããã€ã³ã¿ãŒãã§ãŒã¹ã䜿çšããããšãææ¡ããããŒã¿ã¯DTOã䜿çšããŠéä¿¡ãããDTOã¯Jackson泚éã§ããŒã¯ãããŸãã ããã¯ããããžã§ã¯ãã§ãããã®APIããã§ã«ç¥ã£ãŠããã䜿çšããŠããJavaéçºè ã«ãšã£ãŠäŸ¿å©ãªã¯ãã§ãã
è«ççãªçåãçããŸãïŒæ¢åã®ãã®ãããå Žåã«ãã¬ãŒã ã¯ãŒã¯ãäœæããçç±ïŒReactãAngularãVue.jsïŒ JavaScriptçžäºéçšæ©èœã䜿çšããã ãã§ãäœãçºæããããšã¯ã§ããŸããã ãã¡ããããã«ã€ããŠèããŸããã ããããããããã¹ãŠãäžèŠæããããããã¯ããã«æªãããšãå€æããŸããã ãããã®ãã¬ãŒã ã¯ãŒã¯ã¯ãåçã«åæå®ãããJavaScriptã®ã€ãã£ãªã ã«åºã¥ããŠæ§ç¯ããããã®äžããç®çã®äžé£ã®ããããã£ãæã€ãªããžã§ã¯ããäœæãããªããžã§ã¯ãã®ãã¯ã©ã¹ãã«æ£ããååã®éæ³ã®ã¡ãœãããããããšãæåŸ ã§ããŸãã äžè¬ã«ãJavaScriptã®äžçã§ã¯ããã¬ãŒã ã¯ãŒã¯ã®äœæè ã¯ã¿ã€ãã³ã°ã«ã€ããŠèããããšã«æ £ããŠããŸããã ããã¯ãããããçš®é¡ã®ã¢ããã¿ãŒãã©ãããŒãããªããã»ããµãŒããžã§ãã¬ãŒã¿ãŒãäœæããããšã§å æã§ããŸãã ããããæçµçã«ã¯ãå ã®ãã¬ãŒã ã¯ãŒã¯ãããè€éãªã·ã¹ãã ã§ãããããç¬èªã®ãã¬ãŒã ã¯ãŒã¯ãäœæããããšã«ããŸããã
ããã€ãã®äŸ
ãããžã§ã¯ãäœæ
ãã¡ãããèå³ã®ãã人ã¯èª°ã§ããµã€ãã®ããã¥ã¡ã³ããèªãããšãã§ããŸãã ããããFlavorãç°¡åãã€è¿ éã«å³ããããã«ãããã«å°ããªäŸã瀺ããŸãã
ãããã£ãŠãMavenã䜿çšããŠãããžã§ã¯ããäœæã§ããŸãã
mvn archetype:generate \ -DarchetypeGroupId=org.teavm.flavour \ -DarchetypeArtifactId=teavm-flavour-application \ -DarchetypeVersion=0.1.0
çæããããããžã§ã¯ãã¯ãäºæ³ã©ããã mvn package
ããŒã ã«ãã£ãŠçµã¿ç«ãŠããmvn package
ã
ãã³ãã¬ãŒããšã³ãžã³
ããŒãžã¯ããã®åäœã説æããã¯ã©ã¹ã³ãŒãïŒè¡šç€ºçšã®ããŒã¿ãæäŸããã€ãã³ããã³ãã©ãå«ãïŒãšHTMLãã³ãã¬ãŒãã®2ã€ã®ãã¡ã€ã«ã§èšè¿°ãããŸãã äœæããããããžã§ã¯ãã«ã¯æ¢ã«ããŒãžã®äŸããããŸããããã1ã€äŸã瀺ããŸãã ã¢ãŒãã¿ã€ãããçæãããäŸã眮ãæããããæ¢åã®ãã¡ã€ã«ã«ããã«2ã€ã®ãã¡ã€ã«ãè¿œå ã§ããŸãã ããŒãžã¯ã©ã¹ã³ãŒãã¯æ¬¡ã®ãšããã§ãã
@BindTemplate("templates/fibonacci.html") public class Fibonacci { private List<Integer> values = new ArrayList<>(); public Fibonacci() { values.add(0); values.add(1); } public List<Integer> getValues() { return values; } public void next() { values.add(values.get(values.size() - 2) + values.get(values.size() - 1)); } }
ãããŠãããã«åœŒå¥³ã®ãã³ãã¬ãŒãããããŸãïŒ
<ul> <!-- values - this.getValues() --> <std:foreach var="fib" in="values"> <li> <html:text value="fib"/> </li> </std:foreach> <li> <!-- , event:click - , , --> <button type="button" event:click="next()">Show next</button> </li> </ul>
std:foreach
ã html:text
ããã³event:click
ã¯Flavorã®ã³ã³ããŒãã³ãã§ãã ãŠãŒã¶ãŒã¯èªåã®ã³ã³ããŒãã³ãïŒ ããã¥ã¡ã³ãã§ãããèªãæ¹æ³ã«èå³ããã人ïŒã説æã§ããŸããããŠãŒã¶ãŒã¯æåã§DOMãæç»ãããããã³ãã¬ãŒããä»ããŠãããè¡ãããšãã§ããŸãã ãããã®ã³ã³ããŒãã³ãã«ã¯ç¹å¥ãªãã®ã¯ãããŸãã;ãããã¯ã³ã³ãã€ã©ãŒããžãã¯ã«ãã£ãŠå®è£
ãããŠããŸããã å¿
èŠã«å¿ããŠãç¬èªã®ã¢ããã°ãäœæã§ããŸãã äŸãšããŠã htmlïŒããã¹ãã³ãŒããèªãããšãã§ããŸãã
æåŸã«ã main
ã¡ãœããã³ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
public static void main(String[] args) { Templates.bind(new Fibonacci(), "application-content"); }
ãã¹ãŠã®åºæ¬çãªéæ³ã¯ããããå§ãŸããŸãã ãã¬ãŒã ã¯ãŒã¯ã¯ãããŒãžã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããããããå¶åŸ¡ããŸããã 代ããã«ãèªåã§å¥œããªããã«èªåã§äœæããŠç®¡çãããšãFlavorã¯åã«DOMãçæããé©åãªå Žæã«æ¿å ¥ãããªããžã§ã¯ãã®ç¶æ ã®å€æŽã远跡ãããããã®å€æŽã«åŸã£ãŠDOMãåæç»ããŸãã ãšããã§ãFlavorã¯DOMå šäœãåæç»ããã®ã§ã¯ãªããå¿ èŠãªéšåã®ã¿ãå€æŽããŸãã
ãã³ãã¬ãŒããéçã«åä»ããããŠããããšãããäžåºŠãç¥ããããŸãã ééããŠevent:click="nxt()"
ãèšè¿°ããevent:click="nxt()"
ãã³ã³ãã€ã©ãŒã¯ãšã©ãŒã¡ãã»ãŒãžãæžã蟌ã¿ãŸãã ãã®ã¢ãããŒãã«ãããããé«éãªã³ãŒããçæããããšãã§ããŸãããã¬ãŒããŒã¯ãããŒãžãèªã¿èŸŒãã§ãã£ã¬ã¯ãã£ãã解æãããã€ã³ããŒãåæåããåŸãæéãè²»ãããŸããã 圌ã¯ããããã¹ãŠãã³ã³ãã€ã«æã«è¡ããŸãã
RESTã¯ã©ã€ã¢ã³ã
ããã§ãFlavorããã«ã¹ã¿ãã¯éçºè ã«ãšã£ãŠã©ã®ããã«åœ¹ç«ã€ãã瀺ããããšæããŸãã ããçš®ã®CXFãJAX-RSãšçµã¿åãããŠäœ¿çšââãããšããŸãã 次ã®ãããªãã®ãæžããïŒ
@Path("math") public interface MathService { @GET @Path("integers/sum") int sum(@QueryParam("a") int a, @QueryParam("b") int b); }
ïŒããšãã°ã MathServiceImpl
ã¯ã©ã¹ã§ïŒå®è£
ããCXFã§å®è£
ãç»é²ããŸããã å°ããªRESTãµãŒãã¹ã®æºåãã§ããŸããã ããã§ãã¯ã©ã€ã¢ã³ãåŽã§ãªã¯ãšã¹ããè¡ãã«ã¯ã次ã®ã³ãŒããèšè¿°ã§ããŸãã
MathService math = RESTClient.factory(MathService.class).createResource("api"); System.out.println(math.sum(2, 3));
ïŒdevtoolsã§ããã®ã³ãŒããGETãªã¯ãšã¹ããaddress /api/math/integers/sum?a=2&b=3
éä¿¡ããããšãããããŸãïŒã
äžè¬ã«ãç®çã®ãšã³ããã€ã³ãã«å¯ŸããŠRESTãªã¯ãšã¹ããæ£ããè¡ãæ¹æ³ãWebã¯ã©ã€ã¢ã³ãã«äœããã®åœ¢ã§èª¬æããå¿
èŠã¯ãããŸããã ããã¯ããµãŒããŒãšã¯ã©ã€ã¢ã³ãã«å¯ŸããŠãã§ã«1ã€ã®æ¹æ³ã§è¡ã£ãŠããŸãã RESTãµãŒãã¹ãããã«å¢ãããŠãªãã¡ã¯ã¿ãªã³ã°ã§ããŸãããµãŒããŒåŽãŸãã¯ã¯ã©ã€ã¢ã³ãåŽããåæããå¿
èŠã¯ãããŸããMathService
ã€ã³ã¿ãŒãã§ãŒã¹ã®åœ¢åŒã§åæãã€ã³ãããããŸãã
GWTã«ã¯åæ§ã®ã¡ã«ããºã GWT-RPCããããŸãããè¿œå ã®éåæã€ã³ã¿ãŒãã§ãŒã¹ãçæããŠã³ãŒã«ããã¯ã䜿çšããããã«åŒ·å¶ããŸãããTeaVMã¯åæã³ãŒããéåæã«å€æã§ããŸãã ãŸããGWT-RPCã¯ç¬èªã®äºææ§ã®ãªããããã³ã«ã䜿çšãããããGWT-RPCã®ãšã³ããã€ã³ããäœæãããšãiOSã¯ã©ã€ã¢ã³ããªã©ã§åå©çšã§ããªããªããŸãã
ä»ã«äœãé¢çœãã§ããïŒ
ãã¡ãããçãã¬ãã¥ãŒèšäºã§ã¯ããã¹ãŠã«ã€ããŠè©±ãããšã¯ã§ããŸããã ãããã£ãŠãTeaVMãšFlavorã«ã¯éåžžã«èå³æ·±ããã®ããããé«å質ã®Webã¢ããªã±ãŒã·ã§ã³ãäœæããã®ã«éåžžã«é©ããŠãããšã ãèšã£ãŠãããŸãã
- IntelliJ IDEAãšã®çµ±åã æ¯åMavenãèµ·åããããšã¯æ·±å»ã§ã¯ãããŸãããçµå±ãMavenã¯éçºäžã§ã¯ãªããå®çšŒåç°å¢ã§ã®ãã«ãã«äœ¿çšãããŸãã TeaVMã¯IDEAããçŽæ¥èµ·åã§ããŸãããã«ããã¿ã³ãã¯ãªãã¯ããã ãã§ãã
- ãããã¬ãŒ ãããªãã§ã¯ãæ·±å»ãªããŒã«ãšããŠäœãã«ã€ããŠè©±ãããšããäžå¯èœã§ãã TeaVMã¯æšæºã®ãœãŒã¹ããããçæã§ããŸãã ãŸããIDEAãã©ã°ã€ã³ã§äœ¿çšãããç¬èªã®ãããã°æ å ±åœ¢åŒããããŸãã
- éåžžã«é«éãªã³ã³ãã€ã©ã ç§ã¯æé©åã«åªåããŸãããããã€ãã³ãŒãã¯éåžžã«åå§çãªãã®ãªã®ã§ãåŠçããéã«é床ãèœãšãããšã¯ãŸã£ãããããŸããã ããã¯Javaã§ã¯ãããŸãããããšãã°ããžã§ããªãã¯ãããªã¢ã³ã¹ãããã³ãã£ããã£ãããã¿ã€ããæã€ã¿ã€ãã掟çããå¿ èŠãããå Žåã§ãã ããã«ãIDEAããã³ã³ãã€ã©ãŒãéå§ãããšããã³ã³ãã€ã«æéãççž®ããããã«ãããŒã¢ã³ããã³ã³ãã€ã©ãŒãéå§ãããåŸç¶ã®ãã«ãã®ããã«æ å ±ããã£ãã·ã¥ãããªã©ãããã€ãã®ææ³ã䜿çšãããŸãã ããã«ãããéåžžã«å¿«é©ãªJavaScriptåæ§ç¯é床ãå®çŸã§ããŸãã
- JDKããéåžžã«å°ããªéšåãåãåãããšãã§ããåªãããªããã£ãã€ã¶ãŒããµã€ãºãå°è±¡çã§ãã¢ããªã±ãŒã·ã§ã³ãé©åã«åäœããããã«ã¯é«éåããããã«å¿ èŠã§ãã
- ã«ãŒãã£ã³ã°ã ãã¬ãŒããŒã¯ããªã³ã¯ã解æããã³çæããæ¹æ³ãç¥ã£ãŠããŸãããªã³ã¯ã¯ãAPIã®èŠ³ç¹ããã¯ãéåžžã«éçã«åä»ããããã€ã³ã¿ãŒãã§ã€ã¹ã§ãã
- ãã©ãŒã ã®æ€èšŒã
- Swingã®ããã«ãããããã³ã°APIãåããã¢ãŒãã«ãŠã£ã³ããŠã
- ããã¯ãã§ã«äžèšã§èšåãããŠããŸã-Javaã ãã§ãªããKotlinãšScalaããµããŒããããŠããŸãã ã¡ãªã¿ã«ãTeaVMã®TodoMVCããªã¢ã³ãã¯Kotlinã§èšè¿°ãããŠããŸãã
- Javaéçºã®äžçã§ããç¥ãããŠããApache 2.0ãªãŒãã³ãœãŒã¹ã©ã€ã»ã³ã¹ã
Webã§Javaã䜿çšããçç±
æè¿ãJavaScriptéçºãšã³ã·ã¹ãã ã¯éåžžã«æçããŸããã éçºè ã¯ãGWTã®ãããªãããŒã¢ã³ã¹ã¿ãŒã䜿çšããã®ã§ã¯ãªããäºå®äžã®æšæºãšãªã£ãããŒã«ãæ§æããå€ãã®é«åºŠãªæ©èœãåããææ°ã®èšèªããŸãã¯ææ°ã®éçåä»ãèšèªïŒTypeScriptïŒã§èšè¿°ããæ¹æ³ãåŠã¶æ¹ãç°¡åã§ãã
åé¡ã¯ãããããã¹ãŠãç 究ããå¿ èŠããããšããããšã§ãã èšèªã®æ§æã ããå匷ããã®ã§ã¯ãªãïŒçµéšè±å¯ãªéçºè ã¯ããã«æ°æ¥è²»ãããŸãïŒãã©ã€ãã©ãªãã€ãã£ãªã ãéçºè ããŒã«ãªã©ãå€ãã®ããšãå匷ããŸãã æšæ¥ã®çµéšè±å¯ãªJavaéçºè ã¯ãããããã¹ãŠãæ°é±éã§åŠçãã察åŠããããšã«ãªããšç¢ºä¿¡ããŠããŸãããåé¡ã¯åœŒããããã©ããã£ãŠããŸãææ¡ã§ããããšããããšã§ãã 圌ã¯æ¬åœã«è¯ãã³ãŒããæžãããšãã§ããŸããïŒ åœŒå¥³ãç解ããŠã§ãããšããŠãããŸã åé¡ããããŸãã æåã«ãéçºè ã¯JavaãšJavaScriptã®éã§ã³ã³ããã¹ããåãæ¿ããå¿ èŠããããŸãã 第äºã«ããã®æ¹æ³ã§ã¯ãéçºè ã¯ããŒã«ã®èª¿æŽã«ããå€ãã®æéãè²»ããå¿ èŠããããŸãã
ããŠãJavaã³ãã¥ããã£ã«è³ªåããããŸãã äœããã®çç±ã§ãJavaScriptã®åŽããããã¯ãšã³ãã«åãã£ãŠãã®ãããªæ°žç¶çãªåãããããŸããïŒ ç§ã¯ãäžã§åŒçšããèæ ®äºé ãããããçã£ãŠããŸãã å察æ¹åã«åãåããããŠã¿ãŸãããïŒ ããã«ãJavaScriptããã³ããšã³ãéçºè ã®ã³ââãã¥ããã£ããããnode.jsãäžå¿ã«ããã¯ãšã³ããšã³ã·ã¹ãã ãå ±åã§äœæããŠããŸãã Javaéçºè ã³ãã¥ããã£ã®æ¹ãæªãã®ã¯ãªãã§ããïŒ ããããJavaScriptã¯é«éã§è»œéã§ãããJavaã¯å€§ãããŠéããããããã³ããšã³ãã®äœæã«ã¯é©ããªããšããç¥è©±ããããŸãã å®éãç§ã®ãããžã§ã¯ãã§ã¯ãããããŸãã«ç¥è©±ã§ãããé©åã«èª¿çãããJavaãå°ãã軜快ã§ããããšã蚌æããããšããŠããŸãã äžäŸãšããŠã125kbãèŠããTodoMVCã®å®è£ ããããŸãïŒReactãŸãã¯Angular 4ã§TodoMVCãäœæããŠã¿ãŠãã ããã
çµè«ãšããŠ
ãã¬ãŒããŒã«èå³ãããå Žåã¯ã以äžã®è³æãã芧ãã ããã
- è±èªã®ããã¥ã¡ã³ã ã
- Kotlinäžã®TodoMVC ã
- Javaã®ææµ·è ;
- RESTãæ€èšŒãããããããŠã³ã«ã¬ã³ããŒãã¢ãŒãã«ãŠã£ã³ããŠãªã©ãåããã å®éã«è¿ãCRUDã®äŸ ã
- ãã¡ãããç解ã§ããªããã®ããããã©ããã¯ãã€ã§ãç§ã«å°ããããšãã§ããŸãã
ãã£ãŒãããã¯ããåŸ ã¡ããŠããŸãã ç§ã®ãããžã§ã¯ãã«èå³ããããŸããïŒå°ããªã¢ããªã±ãŒã·ã§ã³ãäœæããããã«è©ŠããŠã¿ãŸãããïŒ ãŸã èšäºãå ¬éããå¿ èŠããããŸããïŒãããããªããæ£ç¢ºã«äœãèªã¿ããã§ããïŒ Flavorãã¥ãŒããªã¢ã«ãå ¬éããããFlavorãã©ã®ããã«é 眮ãããŠããããTeaVMãã©ã®ããã«æ©èœããŠããããäŒããããšãã§ããŸãã ãããã®ãã¡ãããªãã«ãšã£ãŠããèå³æ·±ããã®ã¯ã©ãã§ããïŒ