ESFããã°ã©ã ã®äž»ãªç®çã®1ã€ã¯ããã¹ãŠã®ããã³ãã·ã¹ãã ãåäžã®æè¡ã¹ã¿ãã¯ã«å€æããããšã§ãã ããã§ã®ããã³ããšã³ãã·ã¹ãã ã¯ããŠãŒã¶ãŒãéè¡ãšããåãããããã®ã€ã³ã¿ãŒãã§ã€ã¹ã§ãã ããã¯ã€ã³ã¿ãŒãããéè¡ã§ããå¯èœæ§ããããŸã-å€ãã®äººãããžãã¹åãã®Sberbank OnlineãšSberbank Onlineã®ã¢ããªã±ãŒã·ã§ã³ãç¥ã£ãŠããŸã-ATMã端æ«ãæ¯åºãã³ãŒã«ã»ã³ã¿ãŒã®ãªãã¬ãŒã¿ãŒã€ã³ã¿ãŒãã§ã€ã¹ããã·ã¢ã®äœåãã®é¡§å®¢ãéè¡å¡ã䜿çšãããã®ä»ã®ã·ã¹ãã ã
ç§ãã¡ã解決ããäž»ãªåé¡ã¯ãå€ãã³ãŒãã®çœ®ãæãã§ããå€ãã®ããã³ããšã³ãã·ã¹ãã ãéè¡ã«ããããããããç¬èªã®ã¢ãŒããã¯ãã£ãšç¬èªã®èšèšãåããŠããŸãã
æããã«ãããã¯èª°ã«ãšã£ãŠãäžäŸ¿ã§ãã顧客ãåŸæ¥å¡ãéè¡å šäœã«ãšã£ãŠã¯äžäŸ¿ã§ãã
ãããã£ãŠãESFããã³ããšã³ãã®äž»ãªäœ¿åœã¯ãæ¢åã®hodgepodgeã眮ãæããŠããã¹ãŠãåäžã®ã³ãŒãããŒã¹ã«ã䟿å©ã§ç解ãããããŠãŒã¶ãŒã·ããªãªã§åäžã®æè¡ã¹ã¿ãã¯ã«ãŸãšããããšã§ãã
éçºãçŽé¢ããŠãã課é¡ã¯äœã§ããïŒ
- ä¿¡é Œæ§ãšã»ãã¥ãªãã£ãããã¯ãéè¡ãœãããŠã§ã¢ã«ã€ããŠè©±ããŠããããã§ãã
- èé害æ§ã ããã«99.99ïŒ
ãªã©ã®æ°å€ã衚瀺ãããŸããããã¯ãã·ã¹ãã ãäžæåæ¢ã§ãããšãã®å¹ŽéçŽ52åã§ãã
- ãŠãŒã¶ãŒã®ããŸããŸãªç€ŸäŒäººå£çµ±èšã«ããŽãªã®å©äŸ¿æ§ã ã€ã³ã¿ãŒãã§ã€ã¹ã¯ãçµéšè±å¯ãªéè¡å¡ãšåå¿è
ã®äž¡æ¹ã§ãäžçŽãŠãŒã¶ãŒãšç¥æ¯ã®äž¡æ¹ã«ãšã£ãŠæ確ã§ãªããã°ãªããŸããã åäžæ§ãšæšæºåã«ããããã·ã¢å
šåã®äœå人ãã®åŸæ¥å¡ã®ãã¬ãŒãã³ã°ã«ãããââæéã倧å¹
ã«ç¯çŽã§ãããšä»ãå ããŸããã
- äœæ¥ãšå®è£ ã®é床ãããããåžå Žæå ¥ãŸã§ã®æéã
EFSæ代ã®åã«ãæ°ããæè¡è£œåãåžå Žã«æå ¥ãããŸã§ã®æéã¯æ倧1幎ã§ããã ESFã䜿çšããŠãåžå Žæå ¥ãŸã§ã®æéã1ãæã«ççž®ããã¿ã¹ã¯ãèšå®ããŸããã
ãããŠãããã¯ã»ãã®å§ãŸãã§ãïŒ
ããã³ããšã³ãã¯ESFã§ã©ã®ããã«é 眮ãããŠããŸããïŒ
ESFãã©ãããã©ãŒã ã®éçºè ããŒã ãšãããžãã¹ããžãã¯ã®å®è£ ãã¿ã¹ã¯ãšããã¢ããªã±ãŒã·ã§ã³éçºè ãããŸãã
ãã©ãããã©ãŒã ããŒã ã¯ãå éšäœ¿çšã®ããã®UIã³ã³ããŒãã³ãã®ã©ã€ãã©ãªãéçºããŠããŸãã ãã®ãããªéçºã®ããªãã®äŸããããŸã-GoogleãYandexãAvitoãMail.ruãªã©ã®äŒæ¥ã«ãã³ã³ããŒãã³ãã©ã€ãã©ãªããããŸãã å¿çšãããžã§ã¯ãããŒã ã¯ãã®ã©ã€ãã©ãªã䜿çšããŠãããžã§ã¯ããå®è£ ããåé¡ãçºçããå Žåã«ãã£ãŒãããã¯ãæäŸããŸãã
ãã©ãããã©ãŒã ããŒã ã«ã¯çŸåš8人ãããŸãã ç§ãã¡ã¯2é±éã®ã¹ããªã³ãã§äœæ¥ããããããã®æåŸã«ãä¿®æ£ãšãå Žåã«ãã£ãŠã¯æ°ããã³ã³ããŒãã³ããå«ãã©ã€ãã©ãªã®æ°ããããŒãžã§ã³ããªãªãŒã¹ããŸãã ãã¡ãããã³ãŒãã¬ãã¥ãŒãšç¬èªã®ã³ãŒãã¹ã¿ã€ã«ããããŸããæé«ã®ããã°ã©ãã³ã°ææ³ãæ¡çšããèªåãã¡ã«åãããŠèª¿æŽããŸããã
ããŒã«ããããšããŠãã¢ãã©ã·ã¢ã³ã®ããŒã«ã»ããã䜿çšããŸããã¿ã¹ã¯ã®èšå®ã«ã¯JIRAãgitãªããžããªã«ã¯BitBucketãããã¥ã¡ã³ãã«ã¯Confluenceã䜿çšããŸãã
ã©ã€ãã©ãªã¯äœã§æ§æãããŠããŸããïŒ
- ããŸããŸãªUIèŠçŽ ïŒããŸããŸãªçš®é¡ã®éžæããã¿ã³ãããŸããŸãªããŒã¿åã®ããŸããŸãªãã£ãŒã«ãããã§ãã¯ããã¯ã¹ãã©ãžãªãã¿ã³ãããã³ãŠãŒã¶ãŒãæäœããä»ã®ãã©ãŒã èŠçŽ ã
- ãã¿ã³ãããããŒã®ããããŒãã«ãããã«ãªã©ãæ
å ±ã衚瀺ããæ¹æ³
- ã°ãªããã Bootstrapãã©ã®ããã«å®è£
ããããèŠãŠãç®çã«åã£ããã®ãäœæããŸããã ã°ãªããã«ãããšãã³ã³ããŒãã³ãã¯ãã©ãŒã äžã«æ§ç¯ãããŸãã
- ã³ã³ããŒãã³ããã¥ãŒã®æ·»ä»ã ãªãã¬ãŒã¿ãŒãæ·»ä»ãã¡ã€ã«ãæäœããããã«åœ¹ç«ã¡ãŸããããšãã°ãé åæžã®ãºãŒã ã€ã³ãå転ãè¡ããŸãã
- ãã¡ã€ã«ã¢ããããŒãã³ã³ããŒãã³ã
- React-applicationsã®éåæããŒãçšã®ã³ã³ããŒãã³ãïŒå€ãã®ããžãã¹ããã»ã¹ããããããããåå¥ã®React-applicationsã«åå²ããŸãããããã¯ãããããã»ã¹ããå¥ã®ããã»ã¹ãžã®ç§»è¡äžã«ããŒããããŸãã
ãã©ãŠã¶ã®ãµããŒã
ã¿ãŒã²ãããã©ãŠã¶ã¯IE8 +ã§ãã ä»ã§ã¯IE8ã¯ãèŠããŠãããªãããã€ãŠIE6ã®ããã§ãããã²ã©ãAPIãšã²ã©ããããã°ã§ãã ãã¡ãããIE8ã§ãããã°ã«è²»ããæéã¯è²Žéã§ãã IE8ã®ãããã°çšããŒã«ã¯éåžžã«è²§åŒ±ã§ããããšã©ãŒããŸã£ããå¥ã®å Žæã§çºçããããšã瀺ãããšããããããéçºè ããšã©ãŒãçºçããå ŽæãèŠã€ããããã«æ°æ¥éãè²»ããã±ãŒã¹ããããŸããã
IEã®ãµããŒãã¯å¶çºçãªãã®ã§ã¯ãªããRFIDã¿ãã¬ãããããŸããŸãªããªã³ã¿ãŒãã¹ãã£ããŒãªã©ã®ãã©ãŠã¶ãŒã®ããŒããŠã§ã¢ã䜿çšããå¿ èŠããããŸãã Webã«ã¯ããŒããŠã§ã¢ãæäœããããã®åäžã®æšæºããããŸãããé ãæãActiveXã¯ãããæäœããããã®ãã¯ãããžãŒãšããŠéžæãããŠããŸããã ActiveXã䜿çšããŠèšè¿°ããããœãããŠã§ã¢ã®éã¯èšå€§ã§ãããããã«ããIEãµããŒããäžå€ã«ããŠæŸæ£ããææ°ã®ãã©ãŠã¶ãŒã«åãæ¿ããããšã¯ã§ããŸããã èšç»ã«ã¯ãã¬ã¬ã·ãŒActiveXãJavaã¢ãã¬ããã«è»¢éããIE8ãæŸæ£ããããšãå«ãŸããŸãã
æè¡ã¹ã¿ãã¯
ç§ãã¡ã¯å€§èŠæš¡ãªçµç¹å ã®äžçš®ã®ã¹ã¿ãŒãã¢ããã§ãããããã³ããšã³ããã¯ãããžãŒã®ã¹ã¿ãã¯ã¯ãã»ãšãã©ã®ã°ããŒãã«ã¹ã¿ãŒãã¢ããïŒreactãreduxãPostCSSïŒãšããã»ã©å€ãããŸããã ãããã®æè¡ã¯ãã¹ãŠãã®äŸ¡å€ã蚌æããŠãããããã«IE8ããµããŒãããããšãã§ããŸãã ãã ãããã¯ãããžãŒã¹ã¿ãã¯ãåçã«å€æŽããããšã¯ã§ããŸããã ç¹å®ã®ã¢ããªã±ãŒã·ã§ã³ã¢ãŒããã¯ãã£ãé¢é£ä»ããããŠããŸããããšãã°ã1ã€ã®å·šå€§ãªã¢ããªã±ãŒã·ã§ã³ãäœçŸãã®å°ããªã¢ããªã±ãŒã·ã§ã³ã«åå²ããSystemJSã䜿çšããŠãªã³ããã³ãã§èªã¿èŸŒãããšãã§ããã®ã¯Reactã§ããã
åå¿ãã
ããã¯ã次ã®çç±ã§éžæããæåã®ãã¯ãããžãŒã§ãã
- ã¢ããªã±ãŒã·ã§ã³ãã³ã³ããŒãã³ãã«åå²ããŠãã³ã³ããŒãã³ãã¢ãããŒããéçºã«ç·šæã§ããŸãã
- ç°¡åã«ç¿åŸã§ããŸã-æ°ããååã«Reactãç¥ã£ãŠãããå¿
èŠã¯ãããŸããããããžã§ã¯ããç解ããã®ã«æ°æ¥ãäžããã ãã§ãã
- IE8ãµããŒãã å®éãIE8ããµããŒãããŠãããã¬ãŒã ã¯ãŒã¯ãšã©ã€ãã©ãªãèŠããšãããããéåžžã«å°ãªãããšãå€æãããããããããå§ããããšãã§ããŸããã æã人æ°ã®ãããã®-AngularãEmberãVue.js-ã¯ãµããŒãããŠããªããããReactã§ã©ãããŒã§ããã
ãŸããéçºããã»ã¹äžã«ãReact Nativeã®å®éšãéå§ããŸãããããã«ãããUIã³ã³ããŒãã³ãã®ã¯ãã¹ãã©ãããã©ãŒã ã©ã€ãã©ãªããªãªãŒã¹ã§ããŸããã ããã«ã€ããŠã¯ã æåã®èšäºã§èªãããšãã§ããŸãã
ã©ã®ããã«ããŠReactãšIE8ãåéã«ããã®ã§ããïŒ
第äžã«ãããæç¹ããIE8ã®ãµããŒããæåŠãããããReactã®ããŒãžã§ã³ãæŽæ°ããŠããŸããã 次ã«ães3ifyã䜿çšããŸããããã¯webpackã®ããŒããŒã§ãããES5ã³ãŒããååŸããŠES3ã«æž¡ããŸãã IE8ãæ©èœããªããã®ã眮ãæããã ãã§ãã
TypeScript
ç§ãã¡ãéžãã 2çªç®ã®ãã¯ãããžãŒã¯TypeScriptã§ããã
- 匷ãåä»ã
ç§ãã¡ã®åºæºã§ã¯ãã¿ã€ãanyã¯çŠæ¢ãããŠããŸãããã«ãŒã«ã«ã¯äŸå€ããããŸãã ãã¹ãŠã®ãã®ããã¯ã»ã©é ããgeneric'amiã§ã«ããŒã§ããŸãã
- 誰ã«ã§ãã§ãã
ç§ãã¡ã¯ç人éã§ãããæã«ã¯ééã£ãåã䜿çšããééã£ãããŒã¿ãæž¡ããã³ã³ãã€ã©ã¯åçŽã§ç解å¯èœãªãšã©ãŒã衚瀺ããŸãã
- ã¢ããªã±ãŒã·ã§ã³éçºè
ãšã®å©äŸ¿æ§
äžèšã®ããã«ãã©ã€ãã©ãªãã¢ããªã±ãŒã·ã§ã³éçºè ã«è»¢éããŸãã ãããã®å€ããTypeScriptã䜿çšããŠãããã³ã³ãã€ã«æ®µéã§ã³ã³ããŒãã³ããæ£ããæäœããæ¹æ³ãç解ããŠããŸãã
ã©ã€ãã©ãªã«ã¯çŽ70ã®ã³ã³ããŒãã³ãããããŸãã éçºãæåã«éå§ãããšãããã¹ãŠã®ã³ã³ããŒãã³ãã¯ãã¹ããŒããã§ãããã€ãŸããã³ã³ããŒãã³ãã«ã¯ç¶æ ãå«ãŸããŠããããã¹ãŠã®ããžãã¯ã¯å éšã«ãããŸããã ç¹å®ã®åé¡ã¯çºçããŠããŸããã ããããã³ã³ããŒãã³ããããè€éã«ãªããšããã«ããããã¯äºãã«æè³ãå§ãããããã®å€ãããããŸãããããã©ãŒãã³ã¹ã®åé¡ããŸã ããããšã«æ°ä»ããŸãããã©ã®ããã«ãããã解決ãããã説æããŸãã
æ§èœ
ãŸããã³ã³ããŒãã³ããããã ãã«ãããã€ãŸãç¶æ ãåãé€ããã¢ããªã±ãŒã·ã§ã³ã¬ãã«ã«ããŸããã çŸåšãã¢ããªã±ãŒã·ã§ã³éçºè ã¯ç¶æ ã®å€æŽæ¹æ³ã決å®ããå¿ èŠãªå°éå ·ã¯ã³ã³ããŒãã³ãã«ã®ã¿è»¢éãããŸãã
äŸãæããŸãããïŒ
export default class Input extends React.Component<Props, State> { static defaultProps: Props = { value: '' } state: State = { value: this.props.value } handleChange = event => { const value = event.nativeEvent.target.value; this.setState(prevState => ({value})) this.props.onChange(value); }; render() { return <input onChange={this.handleChange} value={this.state.value} />; } }
ã©ã€ãã©ãªã³ã³ããŒãã³ãInputããããç¶æ ã«å€ãä¿åãããã¬ã³ããªã³ã°ã§ã¯å ¥åãè¿ããonChangeã§ã¯ç¶æ ãå€æŽããŸãã ãã®ãããªã³ã³ããŒãã³ãã«ã¯å€ãã®ã³ãŒãããããŸããïŒ ééããªãããããããã®äŸããªãã¡ã¯ã¿ãªã³ã°ããŸãããïŒ
export default class Input extends React.Component<Props, {}> { static defaultProps: Props = { value: '' } handleChange = event => this.props.onChange(event.nativeEvent.target.value); render() { return <input onChange={this.handleChange} value={this.props.value} />; } }
ã³ã³ããŒãã³ãã³ãŒããçããªããäžèšã®ã¬ãã«ã§ãã³ã³ããŒãã³ãã®ç¶æ ã管çããæ¹æ³ã決å®ããFormã³ã³ããŒãã³ãããããŸãïŒreduxãŸãã¯æãåçŽãªsetStateãä»ããŠã å ¥åãããã·ã³ãã«ã«ãªããããã«å¿ããŠçç£æ§ãåäžããŸããã
第äºã«ãçŽç²ãªã³ã³ããŒãã³ãïŒPureComponentïŒã®ã¢ãŒããã¯ãã£ãã€ãŸã ãã¹ãŠã®å€éšããããã£ãå éšç¶æ ãããã³ã³ã³ããã¹ãã¯ã以åã®ç¶æ ã«æºæ ããŠãããã©ãããã§ãã¯ãããŸãã ç¶æ ãå€æŽãããŠããªãå Žåã¯ãããäžåºŠrenderãåŒã³åºããŠãæå³ããããŸããã ãã¹ãŠã®ã³ã³ããŒãã³ãã«è¿œå ãããshouldComponentUpdateã¡ãœããã§ãã®ãã§ãã¯ãå®è¡ããŸãã
ãããŠç¬¬äžã«ãã³ãŒã«ããã¯ã®ã¡ã¢ãªãªãŒã¯ãåãé€ããŸããã
export default class Button extends React.Component<Props, {}> { render() { return ( <button onClick={event => this.props.onClick(event)}> {this.props.children} </button> ); } }
ãã®äŸã§ã¯ãã³ã³ããŒãã³ãã«onClickã³ãŒã«ããã¯ããããç¢å°é¢æ°ãæž¡ãããŸãã
ãã®ããã«èšå®ãããšããªãŒã¯ãçºçããŸãã IE8ã§ã¯ããã®é¢æ°ãã¬ã³ããªã³ã°ããããã³ã«åŒã³åºããããã³ã«ãã®é¢æ°ãäœæãããã³ã³ããŒãã³ãã«èç©ãããŠãã¬ãŒããçºçãããããç¹ã«è¡šç€ºãããŸãã ãµã³ãã«ãå°ãå€æŽããŸãããã
export default class Button extends React.Component<Props, {}> { handleClick = event => this.props.onClick(event); render() { return ( <button onClick={this.handleClick}> {this.props.children} </button> ); } }
ã³ãŒãèªäœã¯ããç°¡æœã«ãªããŸãããããã«ãã³ãŒã«ããã¯é¢æ°ã¯ã¬ã³ããªã³ã°ã®åŒã³åºãããšã«äœæãããªããªã£ãããããªãŒã¯ãåãé€ããŸããã
å°æ¥ã®èšç»ã«ã¯ãIE8ã®ãµããŒãã®äžæ¢ãå«ãŸããŸããããã«ãããããé«åºŠãªããã³ããšã³ããã¯ãããžãŒã®äœ¿çšãå¯èœã«ãªããŸãã ããã«ããã§ã«ESFã¢ãã€ã«ãã©ãããã©ãŒã ãšã®å€§èŠæš¡ãªçµ±åãããžã§ã¯ãã®äœæ¥ãéå§ããŠãããReact Nativeã䜿çšããŠWebãšã¢ãã€ã«ããã€ã¹ã®äž¡æ¹ã«åãã³ãŒãã䜿çšã§ãããã€ããªããã©ã€ãã©ãªã®éçºãéå§ããŠããŸãã
ESFããã°ã©ã ã®ããã³ããšã³ãã«é¢ãã次ã®èšäºã§ã¯ãReduxã®äœ¿çšæ¹æ³ãšReduxãã¢ãŒããã¯ãã£ã®äžå¿ãšãªã£ãæ¹æ³ã«ã€ããŠèª¬æããŸããèŠéããªãããã«ããã°ã賌èªããŠãã ããïŒ
ã¢ã€ãã¢ãææ¡ãææ¡-æžããŠãèšäºãžã®ã³ã¡ã³ãã§ããªããšãã£ããã§ããããšãå¬ããæããŸãã