Slide 1

Slide 1 text

react-based architecture ಥሳ [email protected]

Slide 2

Slide 2 text

• who am I? • yiminghe@github/gmail/twitter • ಥሳ@alipay/taobao • projects • kissy/modulex/xtemplate • react-component/antd/antm

Slide 3

Slide 3 text

Outline • overview • detail • prospect

Slide 4

Slide 4 text

overview

Slide 5

Slide 5 text

detail

Slide 6

Slide 6 text

package manager

Slide 7

Slide 7 text

npm

Slide 8

Slide 8 text

tnpm tnpm install @alipay/antm

Slide 9

Slide 9 text

tools

Slide 10

Slide 10 text

ant-tool • http://github.com/ant-tool • based on webpack • foundation for scaffolds • antd-init • antm-init • generator-rc

Slide 11

Slide 11 text

why ant-tool • make webpack easy to use • webpack is complext • plugin/loader/middleware/… • engineering • lint/mock/proxy/test • doc/demo • build/deploy • monitor

Slide 12

Slide 12 text

component

Slide 13

Slide 13 text

react-component • http://github.com/react-component • cross-platform components based on react • rc-xx (core components, mainly pc) • rmc-xx (web mobile components) • rn-xx (react native components)

Slide 14

Slide 14 text

component • https://github.com/react-component/calendar • assets: prototype less • bem + prefixCls • examples: es6 js • src: es6 js • tests: mocha js

Slide 15

Slide 15 text

component infrastructure • npm start • http://localhost:8000/examples/xx.html

Slide 16

Slide 16 text

component infrastructure • npm test/run coverage/run chrome-test

Slide 17

Slide 17 text

component infrastructure • git commit • npm run lint

Slide 18

Slide 18 text

component infrastructure • npm run pub • compile/npm publish • push master/gh-pages • http://react-component.github.io/calendar • react-native needs custom app to view demo • http://react-component.github.io/rn-cascader/

Slide 19

Slide 19 text

learned lessons • fine-grained modular • shared across platform

Slide 20

Slide 20 text

learned lessons • use nested component • Aspect Oriented Programming

Slide 21

Slide 21 text

learned lessons • high order components • expose functionality

Slide 22

Slide 22 text

antd • http://ant.design • An enterprise-class design language and high quality UI style. • Rich library based on React Component

Slide 23

Slide 23 text

antd

Slide 24

Slide 24 text

antd style • high quality and coherent style • modular component

Slide 25

Slide 25 text

antd modules(1.0) modular component

Slide 26

Slide 26 text

modular less

Slide 27

Slide 27 text

less dependency

Slide 28

Slide 28 text

use

Slide 29

Slide 29 text

use on demand(1.0) • babel-plugin-antd

Slide 30

Slide 30 text

markdown doc/demo

Slide 31

Slide 31 text

antd website(1.0) • Universal static SPA doc • react-router • ant-tool • antd-md-loader • require(‘antd-md!button/basic.md’)

Slide 32

Slide 32 text

others from alibaba • http://uxco.re/

Slide 33

Slide 33 text

others from alibaba

Slide 34

Slide 34 text

mobile • antm(developing) • web • react-native

Slide 35

Slide 35 text

application architecture

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

react-router, redux and its family roof(developing)

Slide 38

Slide 38 text

url route • react-router

Slide 39

Slide 39 text

data(store) • redux • plain object • optional immutable.js

Slide 40

Slide 40 text

data -> view • react-redux • reselect • roof(developing)

Slide 41

Slide 41 text

view - css • css-modules • bem (*)

Slide 42

Slide 42 text

action <> store • redux-saga

Slide 43

Slide 43 text

redux-saga • before: redux-thunk

Slide 44

Slide 44 text

redux saga • after: redux-saga

Slide 45

Slide 45 text

data <> server • isomorphic-fetch • promise • standard • falcor (*)

Slide 46

Slide 46 text

falcor • before

Slide 47

Slide 47 text

falcor

Slide 48

Slide 48 text

falcor • after

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

summary

Slide 51

Slide 51 text

No content