MobX [v3.4.0-alpha.4] 发布,一个 TFRP 编程范式的实现

jopen 8年前
   <p style="text-align:center"><img alt="" src="https://simg.open-open.com/show/a1a245dcc1cfb8d1a1a54ac44c695ab0.png" /></p>    <p>要想知道MobX是什么,首先需要了解一下FRP是什么,FRP 的本质是,在声明一个值的时候,同时指定他的动态行为。这个值可能是事件,也可能是数据。 FRP 有两个重要的分支:</p>    <ul>     <li>基于 Event Stream 的 FRP<br /> 基于 Event Stream 的 FRP 擅长于管理 Stream,可进行 Joining, splitting, merging, mapping, sampling 等等。在需要处理多个 Event Stream 的时候非常有用,但对于简单场景来说,就过于复杂了。比如 RxJS 和 BaconJS 就属于此类。<br />  </li>     <li>Transparent FRP (TFRP)<br /> Transparent FRP 是在背后去实现 Reactive Programming 。和 Event Stream 的 FRP 一样,TFRP 会在需要的时候更新 View,不同的是 TFRP 不需要你定义如何 (How) 以及何时 (When) 更新。这一类型的框架有 Meter(Tracker),knockoutJS 和 EmberJS 。</li>    </ul>    <p>接下来介绍一下Mobx 和 其他实现有什么不同:</p>    <ul>     <li>同步执行 (这样监听的值始终是最新的,并且调试会方便,因为没有额外的 Promise/Async 库引入的堆栈信息)</li>     <li>没有引入额外的数据结构,基于普通的 Object, Class, Array 实现 (更少学习成本,更新数据时更自然)</li>     <li>独立方案 (不捆绑框架,相比 Meter, EmberJS 和 VueJS 而言)</li>    </ul>    <p><img alt="" src="https://simg.open-open.com/show/f5c1e529ee681e2ae4e086c4da195838.png" /></p>    <h2>更新日志</h2>    <ul>     <li>Fixed an issue preventing MGLAnnotationView from animating when its coordinate changes. Similarly, the user dot now animates between user locations when user tracking is disabled. (<a href="/misc/goto?guid=4958993555981445053">#6215</a>)</li>     <li>A <code>predicate</code> property on each MGLStyleLayer subclass allows you to access and modify the NSPredicate object that determines which source features are included in the layer. The predicate corresponds to the <code>filter</code> property in the stylesheet. (<a href="/misc/goto?guid=4958993556083277484">#6049</a>)</li>     <li>Added options for clustering point features to MGLGeoJSONSource. (<a href="/misc/goto?guid=4958993556190072194">#6217</a>)</li>     <li>Fixed an issue that caused the map to not update to reflect the <code>centerOffset</code> when the user location was tracked. (<a href="/misc/goto?guid=4958993556293240268">#6216</a>)</li>     <li>Clarified that the <code>-ObjC</code> linker flag is required for linking against the static framework distribution of this SDK. (<a href="/misc/goto?guid=4958993556401452784">#6213</a>)</li>    </ul>    <p>下载</p>    <ul>     <li><a href="/misc/goto?guid=4958993556498123034" rel="nofollow"><strong>mapbox-ios-sdk-3.4.0-alpha.4-dynamic.zip</strong></a></li>     <li><a href="/misc/goto?guid=4958993556602662599" rel="nofollow">28.4 MB<strong>mapbox-ios-sdk-3.4.0-alpha.4-fabric.zip</strong></a></li>     <li><a href="/misc/goto?guid=4958993556699293129" rel="nofollow">76.6 MB<strong>mapbox-ios-sdk-3.4.0-alpha.4-symbols-dynamic.zip</strong></a></li>     <li><a href="/misc/goto?guid=4958993556802826884" rel="nofollow">346 MB<strong>mapbox-ios-sdk-3.4.0-alpha.4-symbols.zip</strong></a></li>     <li><a href="/misc/goto?guid=4958993556908574617" rel="nofollow">87.8 MB<strong>mapbox-ios-sdk-3.4.0-alpha.4.zip</strong></a></li>     <li><a href="/misc/goto?guid=4958993557004822812" rel="nofollow"><strong>Source code</strong> (zip)</a></li>     <li><a href="/misc/goto?guid=4958993557109369127" rel="nofollow"><strong>Source code</strong> (tar.gz)</a></li>    </ul>    <p>本站原创,转载时保留以下信息:<br /> 本文转自:深度开源(open-open.com)<br /> 原文地址:<a href="http://www.open-open.com/news/view/6fb9df48">http://www.open-open.com/news/view/6fb9df48</a></p>