1. JavaãšJavaScriptã®åºæ¬
JavaãšJavaScriptã¯ååã䌌ãŠãããããæ··åãããŠããŸãããšããããããŸãããå®éã«ã¯å šãç°ãªãèšèªã§ããä»åã¯ãã®äž¡è ã®éãã詳ãã解説ããŠãããŸãã
ããããã®åºæ¬çãªçŽ¹ä»ããå§ãããã®ç¹åŸŽã®è§£èª¬ãéããŠã JavaãšJavaScriptã®éããç解ããããããããšãç®çãšããŠããŸãã
ãã®æ å ±ã«ãã£ãŠãJavaãšJavaScriptã®éã®æ··ä¹±ãã¯ãªã¢ã«ããããããã®ç¹æ§ãæ£ããç解ããããšãå¯èœãšãªããŸãã
1.1 Javaãšã¯
Javaã¯1990幎代ã«ãµã³ã»ãã€ã¯ãã·ã¹ãã ãºã§éçºãããæ±çšããã°ã©ãã³ã°èšèªã§ããåŸæ¥ã®Cèšèªããäžéšã®æ§æãåŒãç¶ãã§ããŸããããWrite once, Run anywhereïŒäžåºŠæžãã°ãã©ãã§ã§ãåãïŒããšããç¹æ§ãããç°ãªããã©ãããã©ãŒã ã§ã®å®è¡ãå¯èœãªã®ãç¹åŸŽã§ãã
Javaã¯ãäŒæ¥ã®ããžãã¹ã·ã¹ãã ããµãŒããŒãµã€ãã®éçºã«ãã䜿ãããŠããŸãããŸãããªããžã§ã¯ãæåèšèªã§ãããå®å šæ§ãããŒã¿ããªãã£ãé«æ§èœãç¹åŸŽã§ãã
ãã ããåå¿è ãåŠã¶ã®ã«ã¯é£æ床ãé«ããšèšãããããšããããŸãããã®ãããçµéšè ã«ãšã£ãŠã¯åŒ·åãªããŒã«ãšãªãäžæ¹ãåããŠããã°ã©ãã³ã°ãå匷ãã人ã«ãšã£ãŠã¯æ«æããããèšèªã§ãã
1.2 JavaScriptãšã¯
JavaScriptã¯ã1990幎代ã«Netscape Communications瀟ã§éçºãããã€ã³ã¿ãŒããªã¿åŒã®ããã°ã©ãã³ã°èšèªã§ããåœåã¯äž»ã«Webãã©ãŠã¶äžã§äœ¿ãããHTMLææžã«åçãªèŠçŽ ãäžããç®çã§äœ¿ãããŠããŸããã
ããã«é²åããçŸåšã§ã¯ããµãŒããŒãµã€ãã§ãå©çšããããªã©ãéçºã®é åãå€§å¹ ã«åºããŠããŸãããŸããæããåŠç¿ã§ããããã°ã©ãã³ã°åå¿è ã«ã芪ããŸããŠããŸãã
JavaScriptã¯Javaãšã¯ç°ãªãéåæåŠçãåŸæãšããŠããŸãããŸãããã®èšèªã¯éåžžã«èªç±åºŠãé«ããåå¿è ããçµéšè ãŸã§ãå€æ§ãªããŒãºã«å¯Ÿå¿ããããšãã§ããŸãã
1.3 Javaã®ç¹åŸŽ
Javaã®æ倧ã®ç¹åŸŽã¯ãå ã»ã©ãè¿°ã¹ãéããWrite once, Run anywhereãã§ãããã®ç¹æ§ã¯JavaãJVMïŒJava Virtual MachineïŒãšããäžéèšèªãä»ããŠåäœããããã§ãã
JVMäžã§åäœãããããšã«ãããOSãããŒããŠã§ã¢ã«äŸåããã«ã³ãŒããå®è¡ããããšãå¯èœãšãªããŸãããããšããããç°å¢ã§Javaã®ã³ãŒããå®è¡ããããšãã§ããŸãã
ããã«ãJavaã¯åŒ·åãªãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ãããã³ãŒãã®åå©çšæ§ãé«ããè€éãªããã°ã©ã ã管çããããããŸãã
1.4 JavaScriptã®ç¹åŸŽ
JavaScriptã®äžçªã®ç¹åŸŽã¯ãWebãã©ãŠã¶äžã§åäœãããšããç¹ã§ããããã«ãããHTMLãšçµã¿åãããŠããŠãŒã¶ãŒãšã®ã€ã³ã¿ã©ã¯ã·ã§ã³ãããã°ã©ã ããããšãå¯èœãšãªããŸãã
ãŸããNode.jsãªã©ã®æè¡ãç»å Žããããšã«ãããJavaScriptã§ã¯ãµãŒããŒãµã€ãã§ã䜿ãããããã«ãªã£ãŠããã®ãç¹åŸŽçã§ãã
ãããŠãJavaScriptã¯æè»æ§ãé«ãåé¢ããã®èªç±åºŠããã³ãŒããæžãéã®ççŸããã°ã«å¯Ÿãããã©ãã«ãå€ããšãèšãããŠããŸããããããé©åãªåŠç¿ãšçµéšã«ãããããã¯åŒ·åãªããŒã«ãšãªãã§ãããã
2. JavaãšJavaScriptã®éã
JavaãšJavaScriptãšãã2ã€ã®ããã°ã©ãã³ã°èšèªã¯ãååã䌌ãŠããããšããæ··åãããããã§ãããããããããã¯å šãå¥ã®èšèªã§ãããããããã«ã¯ç°ãªãç¹æ§ãçšéããããŸãã
ãã®èšäºã§ã¯ãJavaãšJavaScriptãã©ã®ããã«ç°ãªã£ãŠããã®ãããã®éãã詳ãã解説ããŸãã
ããã§ã¯ããŸãã¯ããã2ã€ã®èšèªã®çšéã«ã€ããŠèŠãŠãããŸãããã
2.1 çšéã®éã
Javaã¯äž»ã«ãµãŒããŒãµã€ãã§ã®åŠçãAndroidã¢ããªã®éçºãªã©ã倧èŠæš¡ãªã·ã¹ãã éçºã«çšããããŸãã
äžæ¹ãJavaScriptã¯å ã ã¯ãã©ãŠã¶å ã§åäœããã¹ã¯ãªããèšèªãšããŠéçºãããŸããããã®ãããäž»ã«ãŠã§ãããŒãžã®å¶äœãæäœãç®çãšããåŠçã«çšããããŸãã
ããã«è¿å¹Žã§ã¯ãNode.jsã®ç»å Žã«ããJavaScriptããµãŒããŒãµã€ãã§ãå©çšã§ããããã«ãªããŸãããããã®åºæ¬çãªçšéã¯ãŠã§ãããã³ããšã³ãéçºã§ãã
ç¶ããŠããããã®èšèªãåäœããç°å¢ã«ã€ããŠè©³ããèŠãŠãããŸãããã
2.2 å®è¡ç°å¢ã®éã
Javaã®ã³ãŒãã¯ãJavaããŒãã£ã«ãã·ã³ïŒJVMïŒäžã§åäœããŸããããã«ãããJavaã¯ãäžåºŠæžãã°ã©ãã§ãåãããšããç¹æ§ãæã£ãŠããŸãã
å¯Ÿç §çã«ãJavaScriptã¯å ã ãŠã§ããã©ãŠã¶äžã§å®è¡ãããèšèªã§ããããã©ãŠã¶ãçŽæ¥è§£éãå®è¡ããŸããããããè¿å¹Žã§ã¯Node.jsã®ç»å Žã«ããããã©ãŠã¶å€ã®ç°å¢ã§ãå©çšå¯èœã«ãªããŸããã
ãã®ããã«ã2ã€ã®èšèªã¯åºæ¬çãªå®è¡ç°å¢ãç°ãªããŸããããããç°å¢ã®éãã«ããããããããåŸæãšããåéãçšéãå€ãããŸãã
次ã«ãJavaãšJavaScriptã®èšèªæ§é ã®éãã«ã€ããŠèª¿æ»ããŠãããŸãããã
2.3 èšèªæ§é ã®éã
Javaã¯éçåä»ãèšèªã§ãå¯èªæ§ãå®å šæ§ãéèŠããèšèªèšèšã«ãªã£ãŠããŸãã
äžæ¹ãJavaScriptã¯åçåä»ãèšèªã§ãæè»ãªããŒã¿æäœãå¯èœã§ãããäºæãã¬ãšã©ãŒãåŒãèµ·ããå¯èœæ§ããããŸãã
ãŸããJavaã¯ã¯ã©ã¹ããŒã¹ã®ãªããžã§ã¯ãæåãæ¡çšããŠããŸãããJavaScriptã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåãæ¡çšããŠããŸãã
æåŸã«ãããããã®ãšã©ãŒãã³ããªã³ã°ã®éãã«ã€ããŠè§£èª¬ããŸãã
2.4 ãšã©ãŒãã³ããªã³ã°ã®éã
Javaã§ã¯ãå šãŠã®ãšã©ãŒã«å¯ŸããŠäŸå€åŠçãå®çŸ©ããããšã矩åä»ããããŠããŸãã
å¯Ÿç §çã«ãJavaScriptã§ã¯ãšã©ãŒãã³ããªã³ã°ã¯ä»»æã§ãäŸå€åŠçãçç¥ããããšãå¯èœã§ãããããããããåå ã§äºæããªããšã©ãŒãçºçããå¯èœæ§ããããŸãã
ãã£ãŠãäž¡èšèªã§ã¯ãšã©ãŒãã³ããªã³ã°ã«å€§ããªéãããããJavaã®ã»ããå ç¢æ§ã«åªããJavaScriptã¯æè»æ§ã«åªããŠããŸãã
3. JavaãšJavaScriptã®çšé
ä»åã®ç« ã§ã¯ãJavaãšJavaScriptã®äž»ãªçšéã«ã€ããŠè©³ããèŠãŠããããšã«ããŸãããããäºã€ã®ããã°ã©ãã³ã°èšèªã¯ãããããç°ãªãç¹å®ã®åéã§ã®äœ¿çšãæ±ããããŸãããã®ç解ãæ·±ããããšã§ãããªããé©æé©æã«èšèªã掻çšããããšãã§ããã§ãããã
3.1 Javaã®äž»ãªçšé
Javaã¯ããã®å®å šæ§ãšãã©ãããã©ãŒã ã®ç¬ç«æ§ãããå¹ åºãé åã§å©çšãããŠããŸããäž»ã«ãµãŒããŒåŽã®éçºã§ãã掻çšããããšã³ã¿ãŒãã©ã€ãºãœãããŠã§ã¢ãAndroidã¢ããªéçºãªã©ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸãã
ãŸããJavaã¯ããã°ããŒã¿ã®ã³ã³ããã¹ãã§ã®ã¢ããªã±ãŒã·ã§ã³éçºã«ã䜿çšãããŠããŸããç¹ã«Apache HadoopãApache Sparkãªã©ã®ã³ã³ããŒãã³ãã¯Javaã§æžãããŠããŸãã
ããã«ãJavaã«ã¯åŒ·åãªãããã¯ãŒã¯æ©èœããããããIoTïŒInternet of ThingsïŒã®åéã§ãéžã°ããããšãå€ããããŸãã
3.2 JavaScriptã®äž»ãªçšé
äžæ¹ãJavaScriptã¯ããšããšãã©ãŠã¶å ã§åãã¹ã¯ãªããèšèªãšããŠéçºããããŠã§ããµã€ãã®ã€ã³ã¿ã©ã¯ãã£ãæ§ãé«ããããã«äœ¿çšãããŠããŸãããäŸãã°ããŠãŒã¶ãŒã®ã¢ã¯ã·ã§ã³ã«å¿ããŠè¡šç€ºå 容ãåçã«å€æŽãããšãã£ãäºãå¯èœã§ãã
è¿å¹Žã§ã¯ãNode.jsã®ç»å Žã«ãããµãŒããŒãµã€ãã§ãJavaScriptã䜿ãããããã«ãªããŸãããããã«ãããããã³ããšã³ããšããã¯ãšã³ããäžã€ã®èšèªã§çµ±äžããMEANïŒMongoDB, Express.js, AngularJS, Node.jsïŒã¹ã¿ãã¯ãªã©ã人æ°ãåããŠããŸãã
ãŸããReactãVue.jsãšãã£ã人æ°ã®ãã¬ãŒã ã¯ãŒã¯ãJavaScriptã§æžãããŠããããããŠã§ãã¢ããªã±ãŒã·ã§ã³ã®éçºã§JavaScriptã®äœ¿çšé »åºŠã¯é«ãŸã£ãŠããŸãã
3.3 ãªãJavaãéžã°ããã®ã
Javaãéžã°ããçç±ã®äžã€ã¯ããã®æç床ãšå®å®æ§ã«ãããŸããJavaã¯é·å¹Žã«æž¡ã£ãŠç¢ºåºããå°äœãä¿ã€æè¡ã§ããã確ããªçµæãä¿¡é Œã§ããŸãã
ãŸããJavaã¯è±å¯ãªã©ã€ãã©ãªãååšããåå©çšå¯èœãªã³ãŒããå€æ°æäŸãããŠãããããéçºè ã¯æéãšåŽåãå€§å¹ ã«ç¯çŽã§ããŸãã
ããã«ãJavaã¯æ¥µããŠå®å šãªèšèªã§ãããšããç¹åŸŽããããŸããJavaã®ã»ãã¥ãªãã£æ©èœã¯å ç¢ã§ãä¿è·ãå¿ èŠãªãšã³ã¿ãŒãã©ã€ãºããŒã¿ãå®å šã«æ±ãããšãå¯èœã§ãã
3.4 ãªãJavaScriptãéžã°ããã®ã
JavaScriptãéžã°ããçç±ã¯ããã®æ±çšæ§ãšåŠç¿ã®å®¹æãã«ãããŸãããã©ãŠã¶äžã§åäœãããŠãŒã¶ãŒãã¬ã³ããªãŒãªãŠã§ãã€ã³ã¿ãŒãã§ãŒã¹ãæ§ç¯ããããšãã§ããŸãããã®ãããããã³ããšã³ãéçºè ã«ãšã£ãŠéåžžã«é åçãªèšèªãšãªã£ãŠããŸãã
ãŸããNode.jsã®ç»å Žã«ãããµãŒããŒãµã€ãã§ã䜿ããããã«ãªããå šäœã®éçºçµ±åãå¯èœã«ããŸãããããã«ããäžã€ã®ããã°ã©ãã³ã°èšèªã§å šãŠãéçºã§ãããšããå©äŸ¿æ§ãåŸãããŸããã
ããã«ãJavaScriptã®ã³ãã¥ããã£ã¯éåžžã«æŽ»çºã§ã質åãåé¡ã«å¯Ÿãã解çãåŸããããšããå©ç¹ããããŸããããã¯éçºè ã«ãšã£ãŠå€§ããªé åãšãªã£ãŠããŸãã
4. JavaãšJavaScriptã®èšèªç¹æ§
JavaãšJavaScriptã¯ååã䌌ãŠããã ãã«ãšã©ãŸãããèªæ³ãããŒã¿åããªããžã§ã¯ãæåæ§ããšã©ãŒãã³ããªã³ã°ãªã©ãå€ãã®é¢ã§å ±éç¹ãšéãããããŸããå ·äœçã«äœãã©ã®ããã«ç°ãªãã®ããäžã€äžã€è©³ããèŠãŠãããŸãããã
4.1 èšèªæ§æã®éã
Javaã¯C++ã«äŒŒãéçãªåä»ããåãç¶ãéçèšèªã§ããã€ãŸããå€æ°ã¯å ã«æ確ã«å®£èšããããã®åãããã«æ±ºå®ãããŸãããããJavaã®æ確ã§æŽç¶ãšããæ§é ã®äžã€ã®èŠå ã§ãããã
äžæ¹ãJavaScriptã¯åçèšèªã§ãå€æ°ã®åã¯å®è¡æãŸã§ç¢ºå®ããŸãããããã«ãããJavaScriptã¯æè»æ§ãæã¡åãããŠããŸãããåæã«ãšã©ãŒãçºçãããããªããŸãã
ãŸããJavaã¯ã³ã³ãã€ã«ãå¿ èŠãªèšèªã§ããã€ãŸããã³ãŒããå®è¡ããåã«ã³ã³ãã€ã©ã«ãã£ãŠæ©æ¢°èªã«å€æããå¿ èŠããããŸããäžæ¹ãJavaScriptã¯ã€ã³ã¿ãŒããªã¿èšèªã§ããã©ãŠã¶ãçŽæ¥ã³ãŒãã解éããŠå®è¡ããŸãã
4.2 ããŒã¿åã®éã
äž¡è
ã®ããŒã¿åã倧ããç°ãªããŸããJavaã¯
äžæ¹ãJavaScriptã«ã¯
ãŸããJavaã§ã¯ãããŒãã«ä¿åãããè€åããŒã¿åãçšæãããŠããŸãããJavaScriptã§ã¯ãªããžã§ã¯ãã¯ç¹æ®ãªåç §åã§ãä»ã®ããªããã£ãåãšã¯å¥ã«æ±ãããŸãã
4.3 ãªããžã§ã¯ãæåã®éã
Javaã¯å®å šãªããžã§ã¯ãæåèšèªã§ããããã¯ãJavaã§æžããããã¹ãŠã®ã³ãŒããã¯ã©ã¹ã䜿çšããŠçµç¹åãããŠããããšãæå³ããŸããããã«ãããJavaã®ã³ãŒãã¯åå©çšæ§ãé«ãŸããä¿å®æ§ãåäžããŸãã
äžæ¹ãJavaScriptã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªã§ãæ確ãªã¯ã©ã¹æŠå¿µã¯ãããŸããã代ããã«ããªããžã§ã¯ãã¯ä»ã®ãªããžã§ã¯ãã”ãããã¿ã€ã”ãšããŠåç §ãããã®ããããã£ãšã¡ãœãããç¶æ¿ããŸããããã«ãããJavaScriptã¯åçã§æè»ãªãªããžã§ã¯ãã¢ããªã³ã°ãå¯èœã«ããŸãã
ããããJavaScriptã®ãªããžã§ã¯ãæåã¢ãã«ã¯Javaãšç°ãªããç解ããã®ãé£ããé¢ããããŸããJavaScriptã®ES6ã§ã¯ãããJavaã©ã€ã¯ãªãã¯ã©ã¹ãã®æŠå¿µãå°å ¥ãããŸããããããã¯åºæ¬çã«ã¯ãããã¿ã€ãããŒã¹ã®ç¶æ¿ã®ã·ã³ã¿ãã¯ã¹ç³ã§ãããèåŸã«ããä»çµã¿ã¯å€ãã£ãŠããŸããã
4.4 ãšã©ãŒãã³ããªã³ã°ã®éã
ãšã©ãŒãã³ããªã³ã°ãäž¡è ã§å€§ããç°ãªããŸããJavaã§ã¯ãäŸå€ãæããïŒthrowïŒããšã§åŠçã§ããªããšã©ãŒãåŒã³åºãå ã«æ»ããŸããJavaã§ã¯ãæ€æ»äŸå€ãšéæ€æ»äŸå€ã®2ã€ã®äŸå€ãåºå¥ããŸãã
äžæ¹ãJavaScriptã§ã¯ããšã©ãŒã¯ãªããžã§ã¯ããšããŠæããããtry…catchãããã¯ã䜿çšããŠææããããšãã§ããŸããJavaScriptã§ã¯ãJavaãšã¯ç°ãªããæ€æ»äŸå€ãšéæ€æ»äŸå€ã®åºå¥ã¯ãããŸããã
ãµã³ãã«ã³ãŒããèŠãŠã¿ããšãJavaãšJavaScriptã®ãšã©ãŒãã³ããªã³ã°ã®éããäžç®çç¶ã§ããäŸãã°ãJavaã§ã¯try…catchãããã¯ã䜿çšããŠIOãšã©ãŒãåŠçããŸãããJavaScriptã§ã¯try…catchãããã¯ã§ãšã©ãŒãªããžã§ã¯ãããã£ããããŸãã
5. JavaãšJavaScriptã®åŠç¿
JavaãšJavaScriptã2ã€ã®èšèªã¯ããããç°ãªãå©ç¹ãšå¶çŽãæã¡ããã®åŠç¿ã®é²ãæ¹ãããããç°ãããšãããåå¿è ã«ãšã£ãŠã©ã¡ãããå§ããã¹ããè¿·ãç¹ãå€ãã§ãããããã®ç¯ã§ã¯ãã©ã¡ããå ã«åŠã¶ã¹ãããããã«ããããã®åŠç¿ã®é²ãæ¹ã«ã€ããŠèå¯ããçµéšè ããèŠãäž¡è ã®éãã觊ããŠãããŸãã
5.1 ã©ã¡ããå ã«åŠã¶ã¹ãã
JavaãšJavaScriptãã©ã¡ããå ã«åŠã¶ã¹ããã¯ãå°æ¥ã®ç®æšãèå³ã«ãããŸãããããŠã§ããµã€ãã®éçºã«èå³ãããå ŽåããŸãJavaScriptããå§ããããšããå§ãããŸããããã«å¯ŸããŠãAndroidã¢ããªãéçºãããããããã¯ãµãŒããŒãµã€ããšã³ãžãã¢ã«ãªããããšé¡ããªãã°ãJavaãæåã®äžæ©ãšãªãã§ãããã
ããããã®èšèªã¯ç¬èªã®æŠå¿µãšååãæã€ãããååŠè ã¯èšèªã®åºæ¬æŠå¿µã確ççã«ææ¡ããããšãåªå ãã¹ãã§ãããŸãåãã«å¿ èŠãªã®ã¯ãã©ã®èšèªãéžã¶ãã§ã¯ãªããããã°ã©ãã³ã°ã®åºæ¬çãªææ³ãèãæ¹ãåŠã¶ããšã§ãã
5.2 JavaåŠç¿ã®é²ãæ¹
JavaåŠç¿ã®é²ãæ¹ãšããŠæåã«æããããã®ã¯ãåºæ¬æ§æã®ç解ã§ããæåã«å€æ°ãé åãå¶åŸ¡æ§é ãªã©ã®åºæ¬æŠå¿µãç解ããããšããå§ããŸãããããã®ã¹ããããå®äºãããã次ã«ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æŠå¿µãåŠã¶ããšã«ãªããŸãã
Javaã®åŠç¿ã§ã¯ãçè«åŠç¿ãšåæã«æãåãããŠããã°ã©ã ãäœãå®è·µåŠç¿ãéåžžã«éèŠã§ããææãèªãã ãã§ãªããèªåã§è²ã ãªããã°ã©ã ãäœã£ãŠã¿ãããšã§ãããæ·±ãç解ãæ·±ããããšãã§ããŸãã
5.3 JavaScriptåŠç¿ã®é²ãæ¹
JavaScriptåŠç¿ã®é²ãæ¹ãããŸãã¯åºæ¬æŠå¿µããå§ããŸãããã®åŸãDOMæäœãã€ãã³ãã®æŠå¿µã«ç§»ãã次ã«éåæåŠçã®æŠå¿µãªã©ãç解ããé åºã§åŠã¶ãšè¯ãã§ãããã
JavaScriptã®ç¹æ§äžããã©ãŠã¶ã§çŽæ¥ã³ãŒããæžããŠå®è¡ã§ãããšããå©ç¹ã掻ãããŠãå®éã«äœããªããåŠã¶ããšã匷ãæšå¥šããŸããèªèº«ã§ãµã€ããäœæããŠã¿ããªã©ããŠãããã³ããšã³ãã®éçºææ³ãåŠç¿ããã®ãå¹æçã§ãã
5.4 çµéšè ããèŠãJavaãšJavaScriptã®éã
çµéšè ããèŠãJavaãšJavaScriptã®éããšããŠããŸãã¯ããããã®äž»ãªçšéã«éãããããŸããJavaã¯ãµãŒããŒãµã€ãããããã¯Androidã¢ããªéçºã«äœ¿ãããŸãããJavaScriptã¯äž»ã«ãŠã§ããµã€ãã®ã¯ã©ã€ã¢ã³ããµã€ãã§åäœãããŠã§ããµã€ããåçã«ããããã«äœ¿çšãããŸãã
ãŸãã圢åŒçãªé¢ã§ã¯JavaScriptã¯åçã¿ã€ãèšèªã§ãå€æ°ã®åãèªåçã«æšæž¬ããŸããäžæ¹ã®Javaã¯éçåä»ãã®èšèªã§ãå€æ°ã®åãæ瀺çã«æå®ããå¿ èŠããããŸãããããã®éãã«ãããããããã§å¿ èŠãšãããæèã察çãç°ãªããŸãã
ãããã®éããç解ããããå¹ççãªåŠç¿ãé²ããŠããããšãéèŠã§ããããããã®èšèªã®ç¹æ§ãçšéãç解ããããšã§ãèªåã®åŠç¿ç®æšã«åãããæé©ãªåŠç¿æ¹æ³ãéžæã§ããã§ãããã
6. JavaãšJavaScriptã®éžæã¬ã€ã
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãJavaãšJavaScriptã®ã©ã¡ããéžã¶ã¹ããã«ã€ããŠã®ã¬ã€ãã³ã¹ãæäŸããŸãããããžã§ã¯ãã®çš®é¡ãå°åãæ¥çã®ãã¬ã³ããéçºè ã®ã¹ãã«ã¬ãã«ããããŠé·æçãªèŠç¹ããã©ã®ããã«éžæãã¹ããã詳现ã«è§£èª¬ããŸãã
6.1 ãããžã§ã¯ãå¥ã®éžæåºæº
Javaã¯ãšã³ã¿ãŒãã©ã€ãºã¬ãã«ã®ã¢ããªã±ãŒã·ã§ã³éçºã«å€ã䜿çšãããç¹ã«ãµãŒããŒãµã€ãã®éçºã«åããŠããŸããäžæ¹ãJavaScriptã¯ãŠã§ãéçºãã¯ã©ã€ã¢ã³ããµã€ãã®éçºã«éç¹ã眮ããŠããããã察話åã®ãŠã§ããµã€ãããŠã§ãã¢ããªã±ãŒã·ã§ã³ã®äœæã«é©ããŠããŸãã
ããããã®ããã°ã©ãã³ã°èšèªã¯ç°ãªãèŠä»¶ãæã€ãããžã§ã¯ãã«å¯ŸããŠç°ãªãã¹ãã«ã»ãããæäŸããŸãã®ã§ããããžã§ã¯ãã®èŠä»¶ã«å¿ããŠéžæããŸãã
äŸãã°ã倧èŠæš¡ãªçµç¹ã«ããã倧èŠæš¡ããŒã¿åŠçãªã©ãéãåŠçãå¿ èŠãªå Žåã¯Javaãé©ããŠãããããããŸãããäžæ¹ãåçã§å¿çæ§ã®é«ããŠã§ããµã€ããäœæããããã«ã¯JavaScriptãæé©ãªéžæãããããŸããã
6.2 å°åãæ¥çã«ããããã¬ã³ã
å°åãæ¥çå¥ã®ãã¬ã³ãã«ã¯æ³šæãæãããšãéèŠã§ããäŸãã°ãç¹å®ã®å°åãæ¥çã§ã¯Javaã®éèŠãé«ããããããŸãããããŸãå¥ã®å°åãæ¥çã§ã¯JavaScriptã®ã¹ãã«ãæ±ããããŠãããããããŸããã
ç¹å®ã®åžå Žãå°åã§ã®å°±è·æ©äŒãæ倧åããããã«ã¯ããã®å°åãåžå Žãæ±ããã¹ãã«ã»ããã«åãããã¹ãã§ãã
æ¥çã®ãã¬ã³ããè¿œããããã ãã§ãªããæè¡ãã¬ã³ããææ¡ããããšãéèŠã§ãæ°ããæè¡ãæ¥éã«ç»å Žããæ¥çã®ãã¬ã³ããå»äžå»ãšå€ããçŸä»£ã§ã¯ãææ°ã®ãã¬ã³ãã«ã€ããŠããããšãå¿ èŠãšãªããŸãã
6.3 éçºè ã®ã¹ãã«ã¬ãã«
ã³ãŒããæžãèœåããŸãéèŠãªèŠçŽ ã§ãããJavaãšJavaScriptã¯ææ³ãæ©èœã倧ããç°ãªããããéçºè èªèº«ã®ã¹ãã«ã¬ãã«ãšå¿«é©ãã«ãã£ãŠéžæããããšããããŸãã
Javaã¯åŒ·ãåä»ããããèšèªã§ããã倧èŠæš¡ãªãããžã§ã¯ãã«é©ããŠããŸãããã€ãã£ãªã ããã¿ãŒã³ãããããåŠã°ãªããã°ãªããªããããåŠç¿æ²ç·ã¯ããæ¥ã§ããäžæ¹ãJavaScriptã¯åçã§æè»ãªèšèªã§ãå³åº§ã«çµæãåŸãããšãã§ããŸããããã®èªç±åºŠããããè€éããç解ããã«ã¯æéãããããããããŸããã
ãããã£ãŠãéçºè ãšããŠããªããã©ã®èšèªã«èŠªããã§ãããããŸãã¯ã©ã¡ãã®åŠç¿æ²ç·ãèªåã«åã£ãŠãããã«ãã£ãŠãèšèªãéžæããã¹ãã§ãã
6.4 é·æçãªèŠç¹ããã®éžæ
èšèªãéžæããéã«ã¯ããããžã§ã¯ãã®çæçãªéèŠã ãã§ãªããé·æçãªèŠç·ãå¿ èŠã§ããäŸãã°ãèšèªã®çåèœåãæŽæ°é »åºŠãã³ãã¥ããã£ã®ãµããŒããªã©ãèæ ®ãããŸãã
JavaãšJavaScriptã®äž¡æ¹ãšãéåžžã«åŒ·åãªã³ãã¥ããã£ãæã£ãŠãããããããé·æçãªçåèœåããããŸããJavaã¯25幎以äžã®æŽå²ãæã¡ãå€ãã®ãšã³ã¿ãŒãã©ã€ãºã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããŠããŸããäžæ¹ãJavaScriptã¯ãŠã§ãã®äž»èŠãªèšèªãšããŠãæ¥éã«ãã®äœ¿çšç¯å²ãåºããŠããŸãã
çµå±ã®ãšãããJavaãšJavaScriptã®ã©ã¡ããæ¡çšãããã¯ããããžã§ã¯ãã®èŠä»¶ãããªãèªèº«ã®ã¹ãã«ã¬ãã«ãå奜ãããã³å°æ¥çãªç®æšã«ãããšããã倧ããã§ãã