Nodeå¦å 29æéç® Node.jsã®ã³ã©ãã¬ã¼ã¿ã«ãªããã®ã§ããã£ããã»ãªã£ã¦ãéç¨ï¼ã©ããªã³ããããããï¼ã»ãããªã£ãå¾ãªã©ãã£ãã°ããã«ã話ããã¾ã
mochaã¨ã¯ mocha(ã¢ã«)ã¯ãjavascriptã®åä½ãã¹ãã§ãã使ç¨ããã¦ãããã¹ããã¬ã¼ã ã¯ã¼ã¯ã§ãã node.jsããã©ã¦ã¶ããå®è¡ã§ãããã¨ãã§ãã¾ããã¾ããéåæã®ãã¹ããå¯è½ã«ãªã£ã¦ã¾ãã ãªããmochaèªä½ã¯ã¢ãµã¼ã·ã§ã³æ©è½ã¯æã£ã¦ãã¾ããããªã®ã§ãå¤ã®æ¤è¨¼ã¯æ¨æºã®assertã¨ãchaiã¨ãshouldã使ç¨ãã¾ãã TDDãBDDã¹ã¿ã¤ã«ã§ãã¹ããè¨è¿°ã§ãããã¹ãçµæããããããªå½¢å¼ã§åºåã§ãã¾ãã ä»åã¯mochaã®åºæ¬çãªä½¿ç¨æ¹æ³ã«ã¤ãã¦ç´¹ä»ãã¾ãã ç°å¢æ§ç¯æ¹æ³ ä»å使ç¨ããåä½ç°å¢ã¯ä»¥ä¸ã®ã¨ããã§ãã OS : MacOS X 10.7.4 Node.js : v0.8.15 npm : 1.1.66 é©å½ãªãã£ã¬ã¯ããªãä½æããããã§npmã使ç¨ãã¦mochaãã¤ã³ã¹ãã¼ã«ãã¾ãã mochaã³ãã³ãã使ç¨ããã®ã§ãgãªãã·ã§ã³ã¤ãã§ã¤ã³ã¹ãã¼ã«ã
æ¥å¹´ãä½ãããï¼ãµãã®ã¨ãæçãæºå«ããã2024å¹´æ¥ã®è¨é² æ¥ã¯èªçã楽ããå£ç¯ 1å¹´ã®ä¸ã§æãèªçã楽ããå£ç¯ã¯æ¥ã ã¨æããã¹ã¼ãã¼ã®æ£ã«ãããããªè²åãã®éèã並ã¶ã¨èªç¶ã¨ããããå¼¾ãã ä¸ã§ãã¨ãããã®ã¯å±±èã ãæ©ãã¨2æä¸æ¬ãããã並ã³å§ããããã¯ãã¿ã©ã®è½ããµãã®ã¨ãã¨ç¶ããæ¡ã®é ã«ã¯ããããã¦ãããâ¦
â»2012/01/09 è¿½è¨ ç¶ããããã ãããã å ææ´ãã¦socket.ioã¯ã©ã¹ã¿ãããã¥ã¼ã ãããæ³å®ãã¦ããããxhr-pollingæ¥ç¶ãå¤ãã¦ãã¬ãã¬ãªç¶æ³ã«ã ãããxhr-pollingã®æ§è½è©ä¾¡ããã¨ãã¹ãã ã£ããªã¼ã¨æãã馳ããã¢ã«ãã«ã ããã§socket.io-clientã§ãã³ããã¼ã¯ãèµ°ãããã®ã ã websocketã¨æã¨ç°ãªãã³ãã¯ã·ã§ã³ãããã«è©°ã¾ãã¨ããèªä½ãçºçâ¦ï¼ ã¢ã«ãã«å¤§æç¥ã®éå½ãããã«ï¼ï¼ ç¾è±¡ socket.io-clientã§xhr-pollingã®ã³ãã¯ã·ã§ã³è²¼ãã¾ããã¨5ã³ãã¯ã·ã§ã³ã§è©°ã¾ãã æéãçµã¤ã¨ãã®å ãã«ãã¨é²ãã chromeãfirefoxã§ãåæ§ã èª¿æ» æ§ã ãªã¯ã©ã¤ã¢ã³ãããå®è¡ãã¦ãåæ§ã®ç¶æ³ãè¦ããããã ãµã¼ãã®åé¡ã¨æå®ããµã¼ã調ã¹ãã ãããã³ã¼ã追ã£ãããã¬ã¼ã¹åã£ãããã¦ãã¾ã£ããåå ããããâ¦
æè¿ä»äºã§ã¯Node.jsããæ¸ãã¦ãªãtoritoriã§ãã ãä»äºã§ãexpressãsocket.ioã使ã£ã¦ããã®ã§ãã Webã¢ããªã±ã¼ã·ã§ã³ã®ãã¹ãã«ã¤ãã¦Webä¸ã«ãã¾ãæ¸ããã¦ããªããããªæ°ããã¾ãã ç¹ã«ã½ã±ããæ¥ç¶ããå¾ã®ã¡ãã»ã¼ã¸éä¿¡/åä¿¡ã®é¨åã§ãã ä»ã¾ã§ã®ãããªHTTPã®åç´ãªãªã¯ã¨ã¹ã/ã¬ã¹ãã³ã¹ã¨ã¯ææ³ãç°ãªãã¾ããã©ããããã®ãã¨ã ããã§ãèªåã¯ãããªæãã§ãã¹ããã¦ã¾ããã¼ãã¨ããè¨äºãæ¸ãã¦ã¿ã¾ãã è£ãè¿ãã°ããã£ã¨ããæ¹æ³ãããï¼ãã¨ããã®ãèãããã®ã§ãï¼ï¼ ãµã³ãã«ã«ã¤ã㦠socket.ioã®example ã使ãã¾ãã ãã ãããµã³ãã«ã§ã¯ãã°ã¤ã³æã«é·ç§»ããªãæ¹å¼ãªã®ã§ ããå°ãå®ç¨çãªåä½ã«è¿ã¥ããããã ããã¦ãã°ã¤ã³URLããé·ç§»ããããã«ãã ã»ãã·ã§ã³ãRedisã使ãããã«ãã¦expressã¨socket.ioã§ã»ãã·ã§ã³ã
The cross-platform JavaScript test framework jstest is a testing framework for JavaScript thatâs designed to run on any platform with minimal effort. It provides a familiar RSpec-style API for organising tests that can run on the following platforms: Web browsers: Chrome, Firefox, Internet Explorer, Opera, Safari Headless browsers: PhantomJS, SlimerJS Server-side platforms: Node.js, Narwhal, Ringo
A declarative, data-retrieval and aggregation gateway for quickly consuming HTTP APIs Try me prodid = select ProductID[0].Value from eBay.FindProducts where QueryKeywords = 'macbook pro'; details = select * from eBay.ProductDetails where ProductID in ('{prodid}') and ProductType = 'Reference'; reviews = select * from eBay.ProductReviews where ProductID in ('{prodid}') and ProductType = 'Reference'
ï¼â»ï¼ãã®ãã¼ã¸ã§ç´¹ä»ãã¦ããäºé ã¯è¨äºååºæç¹ã®æ å ±ã«åºã¥ãããã®ã§ããæ¬ãã¼ã¸ã¯ã¢ã¼ã«ã¤ãã¨ãã¦æ²è¼ãã¦ãã¾ãã ãã¤ã¼ã 2012å¹´7æ31æ¥ ä»ãã½ããã¦ã§ã¢éçºè ã®ä¸ã§æ³¨ç®ããã¦ãããNode.jsããæ¬è¨äºã®ååã¯ãNode.jsãèªçããèæ¯ã¨ããã¾ã§ã®æ©ã¿ã¨ãã£ãæ¦è¦ã«ã¤ãã¦ç´¹ä»ãã¾ããå¾åã§ã¯ãNode.jsã®ã¢ã¼ããã¯ãã£ã®æ¦è¦ãä»å¾ã®èª²é¡ãå±æãªã©æè¡çãªå 容ã«ã¤ãã¦èª¬æãã¾ãããªããNode.jsã®æ£å¼å称ã¯Nodeã§ããä»ã¨åºå¥ãããæã«Node.jsã¨å¼ã¶ãã¨ã«ãªã£ã¦ãã¾ãããããã§ã¯åãã¦Node.jsãç¥ãæ¹ã«ãããããããããè¨è¼åãNode.jsã§çµ±ä¸ãã¾ãã Node.jsãçã¾ããã¾ã§ 1995å¹´ã«èªçããJavaScriptã¯ããã©ã¦ã¶ä¸ã§åä½ããã¹ã¯ãªããè¨èªã¨ãã¦éçºããã¾ãããå½åã¯JavaScriptã®å®è¡é度ãé ããã»ãã¥ãªãã£ã®åé¡ãæ°
æè¿ãNode.jsã«èå³ãããã¾ããNode.jsã調ã¹ã¦ããã¨ãI/Oé¢ä¿ã§ãéåæI/Oããã³ããããã³ã°ãã³ã¼ã«ããã¯çãããããã¨ãã¼ã¯ã¼ããã§ã¦ãã¦æ··ä¹±ãã¦ãã¾ãã ããã§ãããã°ã«æ¸ãã¦æ´çãããæãã¾ããééããããã°æ¯éãææãã¦ãã ããã è¨èã®å®ç¾© âéåæå¼ã³åºãï¼Asynchronous Callï¼ã¨åæå¼ã³åºãï¼Synchronous Callï¼ã®éã åæå¼ã³åºãï¼Synchronous Callï¼ é常ã¡ã½ãããå¼ã³åºãã¨ã¡ã½ããå ã®å¦çãå®äºããã¾ã§ãå¼ã³åºãå ã«ã¯æ»ã£ã¦ããªãããã®ãããªã¡ã½ããå¼ã³åºãã®ãã¨ã éåæå¼ã³åºãï¼Asynchronous Callï¼ ã¡ã½ãããå¼ã³åºããç¬éã«å¼ã³åºãå ã«å¦çãæ»ã£ã¦ãããããªå¼ã³åºãã®ãã¨ãéåæã§å¼ã³åºãããã¡ã½ããã¯ãç°å¢ã«ãã£ã¦å¦çãããã¿ã¤ãã³ã°ãå¤ããã âãã«ãã¹ã¬ããï¼multithread
Node.js ã®æ¬¡ã®ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ 0.12 㧠yield ã使ããããã«ãªãã¾ãã ãã®ãããã§ãJavaScript ã®ã³ã¼ã«ããã¯å°çã«å ãå·®ãè¾¼ãã®ã§ãããããããããªããã³ã¼ã«ããã¯å°çã 7 å¹´ããã§å®ç¾ãã yield 2006 å¹´ãFirefox 2 ã®ãªãªã¼ã¹ã¨åæã« yield 㯠JavaScript çã«ç»å ´ãã¾ãããéåã¨åã®è©±ã§ããã ç»å ´ããå½æ㯠JavaScript çéã§ãã£ãã話é¡ã«ãªã£ã¦ãã¾ããã JavaScript 1.7 ã® yield ãåããã件ã«ã¤ã㦠- ITæ¦è¨ Latest topics > JavaScript 1.7ã®yieldæã£ã¦ãªããããã» - outsider reflex JavaScript 1.7 ã®æ°æ©è½: Days on the Moon ç»å ´ããã¨ãã«ã¯ã¤ã³ãã¯ã大ããã£ããã®ã®ãçµå± Firefox
intro ãªãã ããã WebSocket ã使ã£ã¦ãã®ã«ã WebSocket ãµã¼ããèªåã§æ¸ãããã¨ãç¡ãã£ãã®ã§ãRFC ãè½ã¡çãã¦ãããããã§ãä»æ§ãèªã¿ãªããå®è£ ãã¦ã¿ããã¨æãã¾ããã "WebSocket ãµã¼ã å®è£ " ã¨ãã§ã°ã°ãã¨ã Socket.IO ã¨ã pywebsocket 㧠WebSocket ã¢ããªä½ã£ã¦ããWebSocket ãµã¼ããå®è£ ãã¿ãããªã¿ã¤ãã«ã«ãªã£ã¦ããã¨ãå¤ãã¿ããã§ããã (Apache ã« PHP 㧠HelloWorld ãã¦ããHTTP ãµã¼ãå®è£ ãã¾ãããã¨ã¯è¨ããªãããã) ãã®è¨äºã§ã¯ã WebSocket ãããã³ã«ãããã¹ããµã¼ãèªä½ãå®è£ ãã¾ãã ã¨ãã£ã¦ããå ¨é¨ããã®ã¯ã¡ãã£ã¨å¤§å¤ã ã£ãã®ã§ãåºæ¬çãªããã¹ãã¡ãã»ã¼ã¸ã®ããã¨ãã®é¨åã ããã£ã¦ãã¨ã³ã¼ãµã¼ããã§ããã¨ããã¾ã§ããã¾ããã å®æçã®ã½ã¼ã¹ã¯ä»¥ä¸ã§
è¿½è¨ 11/7/31 Socket.IO v0.7 解説ãæåã«éä¸ã¾ã§ã§åºãã 11/8/1 ã ãããå ¨é¨æ°æ©è½ãªã®ã§ '(æ°æ©è½)' ã£ã¦æ¸ãã®ãããã 11/8/4 ãªãã·ã§ã³ã®è¨å®å¨ããè¿½è¨ 11/8/6 èªè¨¼å¨ããè¿½è¨ 11/8/12 ã¹ã¿ã³ãã¢ãã¼ã³ã®ãµã³ãã«ãè¿½è¨ 11/9/27 Socket.IO v0.8 対å¿ã«ã¤ãã¦è¿½è¨ 11/9/27 ã¿ã¤ãã«ã Socket.IO API 解説ã«å¤æ´ 11/9/27 翻訳ãµã¤ããªã³ã¯è¿½å å ¬å¼ããã¥ã¢ã«ç¿»è¨³ãµã¤ã ããããã°å ¬å¼ãµã¤ãã®ç¿»è¨³ããã©ã¼ã¯ãããªãã¸ããªã§ããããªãã®æ´æ°é »åº¦ã§ãã£ã¦ã¾ãã ãªãã¸ããªã® wiki ãå°å³ã«è¨³ãã¦ã¦ãã£ã¡ã¯çµæ§å½¹ã«ç«ã¡ã¾ããæ¬è¨äºã¨åããã¦ã©ããã æ¬å®¶ http://socket.io/ 翻訳ãã¼ã¸ http://jxck.github.com/socket.io wiki https:/
http://www.meteor.com/ ã§å ¬éããã Meteor.js ãå°ã触ã£ã¦ã¿ã¾ãããTechCrunch ãªããã§ã話é¡ã«ãªã£ã¦ãã¾ãããã Meteor.js 㯠JavaScript ã«ããã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã§ãããã¯ã©ã¤ã¢ã³ããµã¤ãã§ããµã¼ãã¼ãµã¤ãã§ããªãã"Isomorphic" ãªãã¬ã¼ã ã¯ã¼ã¯ã§ãã ã³ã³ã»ããã¨ãã¦ããã¤ãç¹å¾´ãããã®ã§ããããã®æãããã®ã¯ "Reactive Programming" ã§ãã¢ãã«ãã»ãã·ã§ã³ãªã©ã®ã¹ãã¬ã¼ã¸ãæ´æ°ããã¨ãã®æ´æ°å 容ããªã¢ã«ã¿ã¤ã ã«ããã®ã¢ããªã±ã¼ã·ã§ã³ãéãã¦ããå ¨ã¯ã©ã¤ã¢ã³ãã«ä¼ãããããªã¢ããªã±ã¼ã·ã§ã³ãç°¡åã«ä½ããã¨ãã§ãã¾ãã ãã®è¾ºã¯å®ä¾ãè¦ãã®ãæ©ãã§ãã http://www.meteor.com/examples/leaderboard ããã«ããåç»ã§ã¯ããããã©ã¦ã¶ã§
ãæ¨æ¶ ããã«ã¡ã¯ããã³ãã³ã®New Bambooã¨ããä¼ç¤¾ã§Webã¨ã³ã¸ãã¢ã¨ãã¦åãã¦ãã@makoto_inoueã§ããããã®ã¨ãããPusherã¨ããWebSocketã®ã¯ã©ã¦ããµã¼ãã¹ã®éçºã«é¢ãã£ã¦ãã¾ããä»åãã3åã«æ¸¡ã£ã¦WebSocketã«é¢ããçæé£è¼ãæ å½ããã¦ããã ãã¾ãã ç§ãå«ããNew Bambooã®é¢ã ï¼æã ã¯èªåãã¡ã®ãã¨ãBambinoã¨å¼ãã§ãã¾ãï¼ãWebSocketã«ãªãèå³ãæã£ããã¨ãããã¨ããã¯ãã¾ããå®éã«ã¯ã©ã¦ããµã¼ãã¹ãå§ããã¾ã§ã«ããã£ãã¹ãã¼ãªã¼ãã話ããããã¨æãã¾ãããã®ã¹ãã¼ãªã¼ãéãã¦ãWebSocketãåãéãããªã¢ã«ã¿ã¤ã Webããªä¸çã¸ã®å¯è½æ§ãæè¡ç課é¡ãçããã¨å ±æã§ããã°ã¨æã£ã¦ãã¾ãã
Misc modules that extend Express or provide useful utilities. session.socket.io (SessionSockets) -- Connect middleware sessions in socket.io Express Expose -- Expose js objects, functions, and modules to client-side scripts Express Messages -- Flash message display dynamicHelper Express Configuration -- Async configuration Express Resource -- Resourceful routing Express Helpers -- Misc view helper
eBayããJavaScriptã¢ããªã±ã¼ã·ã§ã³ããSQLæã®ãããªå½¢å¼ã§ãã¼ã¿ãã¼ã¹ã¸ã®åãåãããè¨è¿°ã§ããDSLï¼ãã¡ã¤ã³åºæè¨èªï¼ã®ql.ioãçºè¡¨ããªã¼ãã³ã½ã¼ã¹ã¨ãã¦å ¬éãã¾ããã ç¾å¨ãå¤ãã®Webã¢ããªã±ã¼ã·ã§ã³ããããã¯ã¨ã³ãã¨ã®ãã¼ã¿ã®ããã¨ãã«HTTPããã¼ã¹ã«ããAPIãç¨ãã¦ãã¾ããããããWebãã¼ã¹ã®APIã«ãã£ã¦ãã¼ã¿ãåãåºãã®ã¯ãããã°ã©ãã«ã¨ã£ã¦å®ã¯æéã®ããããã¨ã§ãã ä¾ãã°ããã¼ã¯ã¼ããå ¥åããã¨é¢é£ããååã®ååã詳細ãè³¼å ¥è ã®è©ä¾¡ãã¦ã¼ã¶ã¼ã«è¡¨ç¤ºãããã¨ããWebã¢ããªã±ã¼ã·ã§ã³ã§ã¯ãã¾ããã¼ã¯ã¼ãã§ãã¼ã¿ãã¼ã¹ãæ¤ç´¢ãã¦ååIDãåå¾ããä»åº¦ã¯ãã®ååIDããã¼ã«ãã¦ååãæ¦è¦ãè©ä¾¡ã®æ å ±ãåå¾ãããã¨ãã£ãããã«ãAPIãç¹°ãè¿ãå¼ã³åºãå¿ è¦ãããã¾ãã ql.ioã¯ããããå 容ãSQLã®ããã«åãããããè¨è¿°ã§å®ç¾ããã ãã§ãªããè¤æ°ã®
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}