最近在使用 Vuex 来实现项目的 Flux 模式,刚好看到有人出了这本电子书,形式也比较有意思,就翻了一下
内容是基于 Vue 2 和 Vuex 0.6.3 的,出版有快一年的时间了,里面的例子也已经部分过时了,尤其是 Vuex 的部分,不好还好能够看到 Flux 的影子,也能适当的吸收部分
leanpub 这样的电子书的形式,也是第一次体验,感觉就是太过于随意,没有「编辑」,没有「校对」,书的售价还算便宜(最低7.9美金),对于专业性比较强的内容而言,感觉这样的形式比不上视频学习的效果好,而且还不能够实时同步最新的学习内容,这些缺陷都有待改进
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.
摘录:
Flux is not a framework, architecture or language. It’s a concept. When we use Flux in Vue (or any other language/framework) we create an unique way to update data that ensures every thing is right. This way to update data also ensures that the view components also keep the right state. This is really important to complex SPAs (Single Page Applications), that has plenty tables and screens, and of course events and data changes all the time.