ãæèä¼åº§.tech#7ãReactive Extensionsããã®è³æä¸è¦§ã§ãã
åç·¨ã§ã¯ãReactive Extensions (Rx) ã®æ©è½ãé¢æ°åããã°ã©ãã³ã°ã®è¦ç¹ã§èªã¿è§£ãããç¶ãã¦å¾ç·¨ã§ã¯ãåç·¨ã§ç´¹ä»ãã Rx ãé¢æ°åçãªæ©è½ãæä¾ãã¦ããèæ¯ãã¤ã¾ã Observable ã¨ä»ã®ä¸è¬çãªã³ã³ããã®é¢ä¿ã«å¯¾ãã¦ã¹ãããã©ã¤ããå½ã¦ã¦ã¿ããã ãããããæã£ã¦ããã¨ãæ¬ç·¨ã®è©±é¡ã¯ãå®éã« Rx ã使ãä¸ã§ç解ãã¦ããå¿ è¦ã¯ï¼ãã¾ãï¼ãªããã¨ããããã Observable ã¯ãList ã Future ã¨åããã¢ããã®ä¸ç¨®ã§ãã 以ä¸ã®è¡¨ã«åºã¦ããã³ã³ããã¯ãé£å士ã§äºãã«ããä¼¼ãï¼ãããã¯æ£å対ã®ï¼æ§è³ªãæã£ã¦ãã: åæ° è¤æ° åæ (pull) T/Try[T] Iterable[T] éåæ (push) Future[T] Observable[T] â¦ã¨ãã話ã ãè¨æ¶ã«çãã¦ãããã°ãããã§åãå³ãã¦ããªã¼ã±ã¼ãã¨ã¯ãããèå³ã®ãã人ã¯ãã®
ã©ããå§ãã¾ãã¦ã®äººã¯å§ãã¾ãã¦ã@neueccã¨ããã¾ãããã®è¨äºã¯Unity ã¢ã»ããçå¤ã®ã¢ããã³ãã«ã¬ã³ãã¼ 2014 Summerï¼ã¨ããã¤ãã³ãã®23æ¥ç®ã§ããã¯ãªã¹ãã¹ã®ã¢ã¬ï¼çå¤ã«â¦â¦ï¼ãããã¯ãªã¹ãã¹ã®ã¢ã¬ã¯æ¯è¼çè±è½ãå°ãªãã®ãªãã®ã§ãããããã¯è¦äºã¼ã«ç¶ãã¦ã¾ãããããæ¥ä»ãå¤ãã£ãç¬éã«å ¬éããããã¨ã®å¤ããã¨å¤ããã¨ããåã¨ããã®ã¯23:59:59ã ã¨æã£ã¦ããç§ã«ã¯è¾ã話ã§ãâ¦â¦ããã¦ãåæ¥ã¯naichiããã®ããã«é¨å±ãUnityã®ã²ã¼ã æ稿ãµã¤ãã«ã¢ã»ããæ¤ç´¢æ©è½ãä»ãã¦ã¿ãã§ããã便å©ã§ããã§ããã¼ãUniRxã使ã£ãã¢ã»ããã¨ãã¦æ²¢å±±ä¸¦ã¶æ¥ãæ¥ãã¨ããããªãã Reactive Programming ã¨ã¯ãã¨ãããã§7/30ã«è¡ãããã第1åãUnityã¢ã»ããã¾ã¿ãã®LT大ä¼ã§ä½¿ã£ãã¹ã©ã¤ããï¼ LTã¨ãããã¨ã§å¶éæé5åã ã£ããã§ããå½ç¶çµããã
original: The introduction to Reactive Programming you've been missing (by @andrestaltz) (translated by @ninjinkun, reviewed by @ma0e) ããªãã¯ãªã¢ã¯ãã£ãããã°ã©ãã³ã°ã¨å¼ã°ããæ°ããæ¹æ³ãæ°ã«ãªã£ã¦ããã åå¼·ããã®ã¯å¤§å¤ã§ãè¯ãææããªãã®ã§ããã«é£ãããç§ãåå¼·ãå§ããã¨ãã¯ãã¾ããã¥ã¼ããªã¢ã«ãæ¢ãããè¦ã¤ããã®ã¯ä¸æ¡ãã®å®è·µçãªã¬ã¤ãã ããããããããã¯è¡¨é¢ããªãã£ã¦ããã ãã§ããªã¢ã¯ãã£ãããã°ã©ãã³ã°ã®ã¢ã¼ããã¯ãã£å ¨ä½åãæ§ç¯ãããã¨ãã¦ã¯ããªãã£ããããé¢æ°ãç解ããã®ã«ãã©ã¤ãã©ãªã®ããã¥ã¡ã³ãã¯å½¹ã«ç«ããªããã¨ãããã ãããè¦ã¦æ¬²ããã Rx.Observable.prototype.flatMapLatest(selector,
MSãã¯ããã¸ç¥ããããªãã¨ããããã«è¨ããã¦ãããããã°ãã®è¾ºã®è©±ã¯å¤ã§ã¯ãã¾ãèããªããªãã¨æã£ãã®ã§ãã¡ãã£ã¨è»½ãæ¯ãè¿ã£ã¦ã¿ãã ãªããJavaããã°ã©ãåãã«ä¸é¨ç¿»è¨³ãã¦ãã®ã§ãC# ã®å®éã¨ã¯ã¡ãã£ã¨éãã ãã¤ã¦äººã ã¯ãonclickã§ãªã¯ã¨ã¹ããçºè¡ããã¼ã¿ãåã£ã¦ãã¦ããã®éã¯ãã¼ãã£ã³ã°ä¸ã¨ãã¦ã¢ã¤ã³ã³ãåããããã¦ã帰ã£ã¦ãããã¢ã¤ã³ã³ãæ»ãã¦åå¾ãããã¼ã¿ããtableãçµã¿ç«ã¦ãããã¦ããã ãã®ã·ã¼ã±ã³ã·ã£ã«ãªæç¶ãããã°ã©ã ã¯ãéåæãªGUIã¨ããç©ã¨å¤§å±¤ç¸æ§ãæªããããã«ã¢ã¤ã³ã³ãåãç¶ãããéä¸ã§ä½ãéãäºãããã¨è½ã¡ããã¨ãã£ããã°ãåãè¾¼ãã§ãã¾ãã人ã ã¯æ©ãã§ããã GUIããã°ã©ã ã®ãã°ã¯ã©ãããæ¥ãã®ã ãããï¼ ããã¯ãã¼ã¸ã®åçãªæããæ¥ããã¨ãã観å¯ããã£ãã éçãªhtmlã¯ãã¾ããã°ããªãã ä¸æ¦åããã¨ããäºãéçã«ç¢ºèªãããã°ããã以
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}