Googleã«ãšã£ãŠãããã¯ãã®çš®ã®æåã®ãããžã§ã¯ãã§ã¯ãããŸããã 2006幎以éãå®å šã«Javaã§Webã¢ããªã±ãŒã·ã§ã³ãäœæã§ããGoogle Web ToolkitããããŸãã ããšãã°ãAdwordsãšGoogle Waveãæ©èœããŸãã
ããããç¹ã«2006幎ã®åºæºãæ©äŒã«ãã£ãŠãçŸããçŽæãšéåžžã«æ·±å»ãªã«ãããããããGWTã¯æ±ºããŠãé¢éžãããŸããã§ããã ã¯ãããããžã§ã¯ãã¯ãµããŒãããã³éçºãããŠããŸãããéçºè ã®ã³ââãã¥ããã£ã¯ããŸããããŸããã§ããã ãµãŒãããŒãã£ã®ã³ã³ããŒãã³ãã¯ã»ãšãã©ãªãããµããŒããããŠããŸãããããã°ã©ãã®ã·ã¹ãã ã«ç²Ÿéããã®ã¯å°é£ã§ãã
GoogleãçŸåšå®£äŒããŠããDartèšèªã®ã»ãŒãã¹ãŠã®ããã³ãã¯ããã§ã«Webtoolkitã«å®è£ ãããŠããŸãã ãã®èšäºã§ã¯ãGWTã®é·æãšçæãåæããŠãå°æ¥ã®Dartã®æ³¥ã ããã®åœ¢ã調ã¹ãããšããŸãã
ç®æšãšç®ç
ããã°ã©ããŒã®èŠ³ç¹ããèŠããšãææ°ã®Webã¢ããªã±ãŒã·ã§ã³ãäœæããã«ã¯ãã¯ã©ã€ã¢ã³ãåŽã®HTMLãCSSãããã³Javascriptã®ãã¹ãŠã®æè¡ã䜿çšããå¿ èŠããããŸãã SQLãPHPãããã³å€ãã®å ŽåããµãŒããŒçšã®Smartyãªã©ã®ãã³ãã¬ãŒããšã³ãžã³ã ããŒã¿ã¯ãXMLãJSONããŸãã¯ããçš®ã®èªè»¢è»ã䜿çšããŠãããã¯ãŒã¯ãééããŸãã
ããã¯å€å žçãªUnixã®æ¹æ³ã§ããäœæ¥ã®åé åã«å¯ŸããŠç°ãªãããŒã«ã䜿çšãããŸãã ãã®ã¢ãããŒãã¯ãéåžžã«æè»ã§ãã ç¹å®ã®ããŒã«ãæ°ã«å ¥ããªãå Žåã¯ãå¥ã®ããŒã«ã«çœ®ãæããããšãã§ããŸããPythonçšã®PHPãNoSQLçšã®SQLãFlashçšã®HTMLã§ãã
ã³ã€ã³ã®è£åŽã¯ããããã®ããŒã«ã¯ãã¹ãŠéåžžã«ç°ãªããšããããšã§ãã æ§æãç°ãªãã ãã§ãªããæ ¹æ¬çã«ç°ãªããã©ãã€ã ããããŸãã ããã°ã©ããŒã¯ãããããããŸããã¹ã¿ãŒããã®ã«äœå¹Žãå¿ èŠã§ãã Webã®å Žåãããã¯é·ãããŸãã
2çªç®ã®åé¡ã¯ãé¿ããããªãã³ãŒãã®éè€ã§ãã ããšãã°ããŠãŒã¶ãŒã«æ¥ä»ïŒåºçºãªã©ïŒãå°ããå¿ èŠãããå Žåã¯ããã¬ãŒã³ããã¹ãå ¥åãã£ãŒã«ãã䜿çšããŠãå ¥åããå€ã確èªããå¿ èŠããããŸãã ãŸãããããDROP TABLEã§ã¯ãªãæ¥ä»ã§ããããšã確èªããå¿ èŠãããã次ã«ãè¿ãå°æ¥ã«ããããšã確èªããå¿ èŠããããŸãã ãããã®ãã§ãã¯ã¯ãã¯ã©ã€ã¢ã³ãéšåïŒäœ¿ããããïŒããµãŒããŒïŒã»ãã¥ãªãã£ïŒãããã³ããŒã¿ããŒã¹ïŒæŽåæ§ïŒã®3åå®è¡ããå¿ èŠããããŸãã ãããŠãã»ãšãã©ã®å ŽåãããŒã¿ããŒã¹ããã¹ãŠãèªåçã«ãã§ãã¯ããå ŽåããµãŒããŒãšã¯ã©ã€ã¢ã³ãã®éšåã®ãã§ãã¯ã¯ç¬ç«ããŠèšè¿°ãããã±ãŒã«ãæå®ããå¿ èŠããããŸãããããã¯æãç°¡åãªã¿ã¹ã¯ã§ã¯ãããŸããã ãã®çµæãåãããšãè¡ã2ã€ã®é¢æ°ãååŸã§ããŸãããã©ã¡ããäžæ¹ã䜿çšããããšããåã«ã³ããŒããããšãã§ããŸããã
GWTã¯ãDartãšåæ§ã«ããããã®åé¡ã解決ããããšãç®çãšããŠããŸãã GWTã®å Žåãåç©åã«æ®ã£ãŠããã®ã¯Javaãšå°ããªCSSã®ã¿ã§ããããã©ã³ããšè²ã®ã¿ãæ åœããŸãïŒãã ããèŠçŽ ã®ã¬ã€ã¢ãŠãã¯æ åœããŸããïŒã ãã以å€ã®ãã¹ãŠã¯ãã©ã€ãã©ãªã®æ·±éšã«é ãããŠããããæšæºã®ã¹ã¿ãã¬ãã«ã§äœ¿çšãããŸãïŒåäžã®divãæã€HTMLãã€ã³ã¿ãŒãã§ãŒã¹å šäœãåŸã§ããã°ã©ã ã§æ¿å ¥ãããŸãïŒã
æè¡åç©åã«å ããŠãIEãäž»å°ãããã©ãŠã¶åç©åããããŸãã çŸåšã§ããããŒãæŒããšããéåžžã®ã€ãã³ãïŒonkeypressïŒãåŠçââããã«ã¯ãjavascriptã§ãã©ãŠã¶ãŒã®ããŒãžã§ã³ã確èªããå¿ èŠããããŸãããã©ãŠã¶ãŒããšã«ç°ãªãæ¹æ³ã§ãã®é¢æ°ãåŒã³åºãããã§ãã ãã®åŸã2006幎ã«ã¯ãããŒãžãã»ãŒåãã«èŠããããã«ãèšå€§ãªæ°ã®æŸèæã䜿çšããå¿ èŠããããŸããã GWTã¯ãã®åé¡ãçŸãã解決ããŸããã
ä»çµã¿
GWTãããžã§ã¯ãå šäœã¯ãMVCãšãã¿ãŒã³ãåãããŠã©ãŒã ãã¥ãŒãJavaãšãã1ã€ã®ç°å¢ãš1ã€ã®èšèªã§èšè¿°ãããŠããŸãã ã»ãšãã©ãã¹ãŠã®æšæºã©ã€ãã©ãªããšãã¥ã¬ãŒãããããšããæå³ã§ã¯ãã»ãŒå®å šãªJavaã§ãããããã¡ãããã¹ã¯ãããã¢ããªã±ãŒã·ã§ã³ãããã¹ãŠã®ã³ãŒããåçŽã«è»¢éããããšã¯äžå¯èœã§ããã Googleã¯Eclipseãšãã£ã¿ãŒã®ç¹å¥ãªãã«ãããªãªãŒã¹ããŸããããã®ãã«ãã§ã¯ããããã°ãå«ããã¹ãŠãããã«äœ¿çšã§ããŸããã
ãµãŒããŒåŽã§ã¯ããã¹ãŠãGWTã©ã€ãã©ãªãæ¥ç¶ãããéåžžã®Java Server Pagesã®ããã§ããã ããããJSPãã¹ãã£ã³ã°ãèŠã€ããå¿ èŠãããããããã®çµæžå šäœã®èšå®ãäœããã®æ¹æ³ã§ææ¡ããå¿ èŠããããŸããã ãã ãããµãŒããŒéšåã¯äœã§ãäœæã§ããŸãããåäžèšèªã®å©ç¹ã¯ãã¹ãŠå€±ãããŸããã
ã¯ã©ã€ã¢ã³ãéšåã¯JavaããJavascriptã«ã³ã³ãã€ã«ããããã¡ã€ã«ã¯ãã©ãŠã¶ããšã«ã³ã³ãã€ã«ãããŠåçã«ããŒããããŸããã ããã«ããããã©ãŠã¶ã®ããŒãžã§ã³ã«é¢ããå€æ°ã®ãã§ãã¯ãåé¿ãããéåžžã¯éåžžã«ããŸãæ©èœããŸããã
HTMLèªäœã¯äœ¿çšãããŸããã§ããã çè«çã«ã¯ãHTMLããŒãžãäœæããé©åãªå Žæã«ããã°ã©ã ã§ã³ã³ãããŒã«ãæ¿å ¥ã§ããŸãããããã§ãäž»æµã¯å®å šã«åçãªã€ã³ã¿ãŒãã§ã€ã¹ãå®å šã«Javaã§äœæããããšã§ããã .Netãã©ãŒã ãšãã£ã¿ãDelphiã®ããã«ãããŠã¹ã§ã€ã³ã¿ãŒãã§ã€ã¹ãæç»ã§ããåæ©èœã®ã°ã©ãã£ãã¯ãšãã£ã¿ããããŸããã èŠçŽ ã®äœçœ®ãšãµã€ãºã¯ããã°ã©ã ã§èšå®ãããCSSã«ã¯ãã©ã³ããè²ãäžžãè§ã®ãããªå°ããªããªã«ã®ã¿ãæ®ããŸããã
äžè¬çã«ãçè«çã«ã¯ããã¹ãŠãéåžžã«ã¯ãŒã«ã«èŠããŸããã
ç·Žç¿ãã
å®éã«ã¯ããã¹ãŠãããã»ã©ãã©è²ã§ã¯ãããŸããã§ããã
ããªãŒããŒãã«ã¬ã€ã¢ãŠãã䜿çšããŠãèªåçã«äœæãããã€ã³ã¿ãŒãã§ã€ã¹èŠçŽ ã é·æ¹åœ¢ã®ãããã¯ã¯ãã¹ãŠãåäžã®ã»ã«ãæã€ããŒãã«ãçæããŸããã ããã«ïŒè€æ°ã®ãããã¯ãçµã¿åãããïŒã¯ã1è¡ãŸãã¯1åã®è¡šã§è¡šãããŸããã ãã€ã¢ãã°ããã¯ã¹ã¯ããã¹ããããããã«ã®å±±ã§ããã åºåã¯ãããªãé«åºŠã«ãã¹ããããããŒãã«ããã®æ··ä¹±ã§ãããã»ãšãã©ææ¡ããããšãã§ããŸããã§ããã ãã©ãŠã¶ã¯ãçµæãšããŠåŸããã巚倧ãªDOMã倧ããåã³ãªãåã¿ç ããã
ç§ã¯å®å šã«ã»ãã³ãã£ãã¯ã¬ã€ã¢ãŠãã®ãã¡ã³ã§ã¯ãããŸãããå€å žçãªOOPã®èŠ³ç¹ããããã°ã©ã ã«ããHTMLçæãå®è£ ããããšã¯å¯èœã§ãããIEã®ãã¹ãŠã®ããŒãžã§ã³ã§åãããã«åäœããããšããããŠ2006幎ã§ããããŒãã«ã§ã®ã¿å¯èœã§ãã£ãããšãç解ããŠããŸãã ããããGWTã§äœãèµ·ãã£ãã®ã-ãã é ããªããŸããã Chromeã§ããææ°ã®ããã»ããµã§ãããŠã£ãžã§ãããæ°çŸãããªãããŒãžã§ããé床ã¯äœäžããŸãã
ç¬èªã®HTMLãäœæããŠGWTã«ãã£ãŒãããããšããå®éã«ã¯ããã»ã©ç°¡åã§ã¯ãããŸããã§ããã ããã¯jQueryã§ã¯ãªããDOMãç°¡åã«æäœããé©åãšæãããHTMLãçæã§ããŸãã çè«çã«ã¯ãããŒãã«ã®äžäœã¬ãã«ãããã€ãä¿åããããšã¯ã§ããŸãããããããå®å šã«æŸæ£ããããšã¯ã§ããŸããã ææªãªã®ã¯ãGWTãšãã€ãã£ãJavascriptã®çžäºäœçšã§ããã
çè«çã«ã¯ãGWTã¯JSNIããµããŒãããŠããŸããããã¯ãã¢ã»ã³ãã©ãŒãšããŠJavascriptã®ã¿ã䜿çšããCèšèªã®ã¢ã»ã³ããªèšèªã§ãã ããããããã¯äžæ¹åã«ããæ©èœããŸããã ã€ãŸããGWTããå€éšjsã©ã€ãã©ãªãåé¡ãªãåŒã³åºãããšãã§ããŸãã ãããããã©ããã... javascriptãšã¯ãhtmlèŠçŽ ã®onclickãåæããŠGWTã§ã€ã³ã¿ãŒã»ããããŸãããã®ãããªã·ã£ãŒãããºã ã¯ããã¥ã¢ã«ã«ã¯èšèŒãããŠããããéçºè ã«ãã£ãŠãŸã£ããæäŸãããŠããªãããã§ãã ãããè¡ãããšã¯å¯èœã§ããããGWTã§ã¯ãªãJavascriptããªãã¯ã®å©ããåããŸããã
Googleã¯ãã©ãŠã¶ãŒéã®ãã¹ãŠã®éããå®å šã«ãããã¯ããããšããŸããããæåŸãŸã§ãããè¡ãããšãã§ããŸããã§ããã ïŒå°ãªããšãããŒãžã§ã³2.2ã§ã¯ããã以äžäœæ¥ããŸããã§ããïŒãŒãããããŠã¹ã¯ãªãã¯ã§ããã¹ãã匷調衚瀺ããããšã®çŠæ¢ãªã©ãjavascriptã§ããã·ã£ãŒãããºã ãã«å±ããããã€ãã®åŸ®åŠãªç¹ãæ®ã£ãŠããŸããã ããããããã¯éåžžã«éèŠã§ãã
æŠå¿µçãªåé¡
確ãã«ãGWTå šäœãæ©èœããŸããã ãã£ãããšãå€åããã€ãã®å Žæã§ã¯äžåšçšã§å®å šã«ã§ã¯ãªããããããŸããããããŸããããŸããã 圌ã®äž»ãªåé¡ã¯ãGWTã§å€§èŠæš¡ãªã¢ããªã±ãŒã·ã§ã³ãéçºããæªåé«ãé床ããæšæºæè¡ã®åç©åãããã¯ããã«é ãããšã§ãã ãããŠãDartãåã®ã»ã¯ã·ã§ã³ã®åé¡ã解決ããã°ãéçºé床ã«åé¡ã¯ãããŸããã
ãã¹ãŠã®ããã°ã©ãã³ã°ãã©ãã€ã ïŒå€å žçãªOOPããããã¿ã€ããæç¶ãåããªã¬ãŒã·ã§ãã«ãé¢æ°åïŒã¯ãã¹ãŠãã¥ãŒãªã³ã°å®å šã§ãããåãã¯ã©ã¹ã®åé¡ã解決ã§ããŸãã OOPãæè¯ã®ãã©ãã€ã ã§ãããšèšãããšã¯ããç§ã¯ã¬ãŒããŒã§ãããšèšããããªãã®ã§ãã å šäœã®è³ªåã¯ãã©ã®ãã©ãã€ã ã«ãã£ãŠç¹å®ã®åé¡ãè¿ éã«è§£æ±ºã§ããããšããããšã§ãã
Javaãããã³ããã䜿çšããåŸæ¥ã®OOPå šäœã¯ãã¯ã©ã¹ããªããžã§ã¯ãèªäœïŒã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ïŒããåé¢ãããšããèãã«åºã¥ããŠããŸãã ããã¯ãæ°çŸäžè¡ã®è«æ±æžãæ¯æããåšåº«æ®é«ãªã©ãåŠçããå¿ èŠãããããžãã¹ã¢ããªã±ãŒã·ã§ã³ã«é©ããŠããŸãã ã¯ã©ã¹ã¯æ¯èŒçå°ãªãã§ãããå€ãã®ãªããžã§ã¯ãããããŸãã
ãŠã§ãäžã§ã¯ããã§ã¯ãããŸããã 1ã€ã®ããŒãžã«ã¯ããã°ã€ã³ãã©ãŒã ã1ã€ããã¹ã±ããã1ã€ãçŸåšã®ãŠãŒã¶ãŒã1ã€ããæŠå©åãæ¯æãããã¿ã³ã1ã€ã ããããŸãã ãããã®èŠçŽ ããšã«åå¥ã®ã¯ã©ã¹ãäœæããŠãããåã¯ã©ã¹ã®ã³ããŒã1ã€äœæããã®ã¯ãªãã§ããïŒ å®éã«ã¯ãã»ãšãã©ã®å ŽåãWebäžã®ã¯ã©ã¹ãšãªããžã§ã¯ããåé¢ããå¿ èŠã¯ãªãããšã瀺ãããŠããŸãã
ããããŸããããã©ãŒã®ã£ã³ã°ã®ãã©ãã¯ãŒã¯èšãã§ããããããããããªããã»ã«ã³ããã¿ã³ãlootããå¿ èŠãšãããšãããããããŒã«ãã¿ã³ã§äœãèµ·ããã§ããããïŒ Javascriptã§ã¯ãããããŸãã«æ¬¡ã®ãšããã§ãã2çªç®ã®ãã¿ã³ã¯ãæåã®ãã¿ã³ã®ãããã¿ã€ãã«ãã£ãŠäœæãããŸããããã¿ã³ããããŸãã å€å žçãªOOPã§ã¯ãå¥åã®ã¯ã©ã¹ããããŸãããããã¯ããã»ã©æªããããŸããã äž»ãªããšã¯ãã€ã³ã¿ãŒãã§ã€ã¹ã匷調衚瀺ããŠãªãã¡ã¯ã¿ãªã³ã°ãããŸã£ããäœãããªãããã¯ã©ã¹ã®æ§é ãç¶æããã ãã®ã³ãŒããæžãããšã§ãã ãããŠãã¹ãŠéçãªã¿ã€ãã³ã°ã®ãããããã¿ã³ã ããã§ã¯ãªããçç ã®ãã¿ã³ãã䜿çšããããšã¯ã§ããŸããã
ç§ã¯GWTã§4幎éå·çããŸããããèªä¿¡ãæã£ãŠãããã¯ã¿ã€ãã³ã°ã¯Webã®éçãããåªããŠãããšèšããŸãã ãŸããã³ã³ãã€ã«é床ã®ã¿ã«åœ±é¿ããã³ãŒãå®è¡ã®é床ã«ã¯åœ±é¿ããŸããã
GWTã¯ãå€å žçãªOOPã®çã®ãã¡ã³ã«ãã£ãŠäœãããŸããã圌ã¯èãªããã¿ãŒã³ããã®éžè±ãèš±ããŸããã§ããã 誰ããã€ã³ã©ã€ã³ã¹ã¿ã€ã«ã®èŠçŽ ã䜿çšã§ããªããšå€æããå ŽåããããããŸããã ãã®ãããªæ©èœã¯ãããŸãããã¹ã¿ã€ã«ãå€æŽããããã«ãCSSã¯ã©ã¹ã§ãã¹ãŠãå®è¡ããŸãã ãã¡ãããäžè¬çã«ãã»ãšãã©ã®å Žåãã€ã³ã©ã€ã³ã¹ã¿ã€ã«ã¯å®éã«ã¯äœ¿çšãã¹ãã§ã¯ãããŸããããããšãã°ãã¢ãã¡ãŒã·ã§ã³ãå®è£ ããã«ã¯ã©ãããã°ããã§ããïŒ .opacity03 {opacityïŒ0.3}ãšãã圢åŒã®ã¯ã©ã¹ã20åäœæããŸããïŒ
ãããŒãGWTã«ã¯ãã°ãªããã¿ã€ãã®ã³ã³ããŒãã³ãïŒã»ã«ãç·šéã§ããããŒãã«ã®ãããªã³ã³ãããŒã«ïŒããããç¬èªã®MVCãå®å šã«å®è£ ãããŠããŸãã ããžã¥ã¢ã«ã³ã³ãããŒã«ã§... 2x3ã®ãã¬ãŒããäœæããå¿ èŠãããå Žåã¯ãã¢ãã«ãã³ã³ãããããã³ãªã¹ããèšè¿°ããå¿ èŠããããŸãã 200ã³ãŒãã®å Žåã®è¡:)
åãããŒã ãããŒãããã£ãã...ãããšãããããŸããã 2006幎ã§ã¯ãããŸããããJavascriptã¯æé·ããèœã¡çããjQueryã¬ãã«ã®ã©ã€ãã©ãªã§å€§ãããªããããŠããŸãã Dartããæ®åœ±ãããçç±ã¯1ã€ãããããŸããã Googleã®ãã¹ãŠã®åã«ããããããã