[ Javascript ] CTJS Note
Redux設計概念與實戰
Redux
簡報: http://slides.com/dmoon/redux-intro#
Why
SPA more complecated
data跟view分開, 類似angular, data只有一份,data changed -> view changed
React:
data and view bind
Problem:
props傳遞地獄
Redux
predictabble state container
三大原則
Redux Flow
Produc -> 畫面需要改變 -> 產生action
|
Server <- action -> dispatch -> reducer
|
return newState -> 資料變更&view重繪
Action
Action Creter
Reducer
--------------------------------------------------------------------------------------------------------------
Node.js and BOT
簡報 : http://slides.com/simonsun2001/bots#/
--------------------------------------------------------------------------------------------------------------
Angular 2
支援Server-side render
Augury - 開發工具
支援多平台
從框架轉向平台
組成
所有東西都是元件 Componet
頁面的組成
應用程式元件+樣板+樣式
元件的組成
Template 範本
HTML
Class 類別
--------------------------------------------------------------------------------------------------------------
React Native Intro
--------------------------------------------------------------------------------------------------------------
Nodejs 自動化
speaker: Spooky
lean production
Lightning talk
WebdriverIO
Redux
簡報: http://slides.com/dmoon/redux-intro#
Why
SPA more complecated
data跟view分開, 類似angular, data只有一份,data changed -> view changed
React:
data and view bind
Problem:
props傳遞地獄
Redux
predictabble state container
三大原則
- Single source of truth 單一資料來源
- 整個應用的state存在一顆object tree中,並放在唯一的container(state)內
- State is read only
- 唯一改變state的方法就是觸發action(修改資料唯一方法)
Redux Flow
Produc -> 畫面需要改變 -> 產生action
|
Server <- action -> dispatch -> reducer
|
return newState -> 資料變更&view重繪
Action
- js obj
- type是必要的,表示 要執行的動作
- 包含事件的描述與更新state所需要的相關資料
Action Creter
- pure function, return an action
- dispatch到reducer
Reducer
- pure function
- return new state
- 存放共用state的容器
- immutable
- 更新的時候都時回傳新的資料,不去污染舊的資料
--------------------------------------------------------------------------------------------------------------
Node.js and BOT
簡報 : http://slides.com/simonsun2001/bots#/
--------------------------------------------------------------------------------------------------------------
Angular 2
支援Server-side render
Augury - 開發工具
支援多平台
從框架轉向平台
組成
所有東西都是元件 Componet
頁面的組成
應用程式元件+樣板+樣式
元件的組成
Template 範本
HTML
Class 類別
- Angular CLI (套件
- ng new demo1
- cd demo1
- npm install
- {{}} -> data binding
- [href]="item.href" -> property binding
- [(ng-model)] = "property" -> event binding
- (click) -> on click
--------------------------------------------------------------------------------------------------------------
React Native Intro
--------------------------------------------------------------------------------------------------------------
Nodejs 自動化
speaker: Spooky
lean production
- transportation dev -> production
- waiting -> 規格不清楚...etc
- defects -> 透過QA,其他人在測試code
- 透明
- 資料庫版控(Schema版控)
- Sequelize
- 環境版控
- docker
- 測試案例版控
- Mocha
- 建置指令的版控
- npm, gulp, makefile (unix), package.json
- 生產流程版控
- jenkins 2 pipeline
Lightning talk
WebdriverIO
Common.js
Vue.js
Redux thunk
thunkify
thunk = delay
處理非同步的action
################### Hackpad Backup ###################
canon mg3620 printer to wifi
回覆刪除connect canon printer to wifi
brother printers troubleshooting
canon mx922 setup
brother printer installer