ããæ°å¹Žã®æµãã«ã€ããŠ
æè¡çåŽé¢
- Webããã³ããšã³ãïŒã»ãŒTypeScriptïŒReactçéïŒã«ãããŠããªããžã§ã¯ãæåïŒå³å¯ã«èšããšã¯ã©ã¹ã®å©çšïŒããè±åŽããæµãããããŸããåå ã¯ä»¥äžã®2ç¹ã
- ã¯ã©ã¹ã®ç¶æ¿ã®åé¡ç¹ãïŒITæ¥çå šäœã«ïŒåºãå®çããããš
- JS/TSã®é²åãReactã®é²åãé¢æ°åèšèªã®èãæ¹ãªã©ã®åœ±é¿ã«ãããã¯ã©ã¹ãçšããŠããŒã¿ãšé¢æ°çŸ€ãçŽã¥ããã¡ãªãããèããªã£ãããš
- çŸç¶ãèšèšã¬ãã«ïŒå®åçã«ã¯ã©ã®é¢æ°ãçºããŠã¢ãžã¥ãŒã«åããã®ããã¢ãžã¥ãŒã«å士ãã©ãç¹ãåãããã®ãããã©ã«ãå²ãã©ãããã®ãçïŒã®ããŠããŠããŸã åºãŸã£ãŠããããæ¢åã®èšèšè«ã¯ãããªãã«æå¹ã§ãã
ã³ãã¥ããã£çåŽé¢ïŒæ¿æ²»ïŒ
- ãããã®æµãã¯Webããã³ããšã³ãã®äžã§ãTypeScriptïŒReactã®çéãäž»å°ããŠããããã®ããŠããŠã¯é·å¹Žçµ¶å¯ŸèŠãããŠãããªããžã§ã¯ãæåã解äœãããããªå 容ã§ãã£ãããããã以å€ã®çéãç¹ã«ããªããªã«ãªããžã§ã¯ãæåãã£ãŠãã人ã ãšåºŠã è«ãã«ãªã£ãŠããŸããã ããã³ããšã³ã以å€ã®äººãå€ãã§ãããããã³ããšã³ãã§ããã®çµã¿åããã§ãã£ãŠã人ã¯ãŸã ãŸã å°ãªããæ¡çšããŠããŠãè·é¢ã眮ãããŠãããããŸãã
- ãŸãæ¬å®¶ã®é¢æ°åèšèªçéãšãè·é¢ãããããæ¬æ Œçã«é¢æ°åããã«ã¯æ©èœã¯è¶³ããŠãªããææ³ãéããã§ããŠãããšäžç·ã«ããªãã§ã»ããã
TSãªããŠå端ãªã®ã¯æšãŠãŠElmãPureScriptããããðªïŒå§èªïŒããšãããããªå£°ãèããŸããåŸã«è¿°ã¹ãŸãããå¿æ ãšããŠç解ã¯ã§ããã®ã§ããã®èšäºã®ã¿ã€ãã«ãé¢æ°åã颚ãã«ãªã£ãŠããã®ã¯ãããžã®é æ ®ã§ãã - ãã®ãããªçµç·¯ããããQiitaãZennã§ããäžã èšäºãåºããéå ¬åŒãªããæåãªTypeScriptã®ããã¥ã¡ã³ããæèè ã®åçš®ããã°çã§ããæè¿ã¯é¢æ°åãæµè¡ã£ãŠããã§ããïœããšä»ãããããã«çãŸã£ãŠããŸããåå¿è åãèšäºã¯ããã亀æµãªã©ãå°ãªãããã£ãŠã人ãæš©åšãéåç¥ã«ããè£ä»ãããªãã®ã§ææ§ãªèšè¿°ã«ãªããã¡ã§ãã
èšäºãæžããåæ©
ããããã®é¢šæœ®ãããã§ãããð« èšäºãåºãªãçç±ã¯
- ïŒäžã§èª¬æãããããªïŒè«ããèŠãŠé æ ®ããŠãã
- ããããçºå±éäžãããã¯çŸåšé²è¡åœ¢ã®ã ãŒãã¡ã³ãã§ãããããŠããŠã確ç«ããŠãªãã暡玢äž
ã«ã€ãããšæããã§ãããã ããããå§çž®ããŠè±¡çã®å¡åããã®ã¯è¯ããªããšæããŸãã誰ã説æããªããã©ç¥ã£ãŠãŠåœç¶ãªããŠã®ã¯ãæ°èŠåå
¥è
ã空æ°ãèªãã®ã«èŠåŽããŸãããâŠâŠã
ãŸãèªåã¯ééãšã³ãžãã¢ãªãã§ããããã®èŸºãã®æµããšè¡ãæ«ã«ããªãé¢å¿ããããŸããããã2021幎ã¯ãããŸãäžã®äººããã®æ
å ±çºä¿¡ãèŠã€ãããããæ
å ±åéã«å°ã£ãŠããã®ã§ãèªåãªãã«ãŸãšããããšã«ããŸããã
å šäœå
ãã®ã ãŒãã¡ã³ããç解ããã«ããã£ãŠéèŠãªããŒã¯ãŒãã¯
- åºå®ããŒã¿ïŒ=ã€ãã¥ãŒã¿ãã«ãªããŒã¿ïŒ/å€åããããŒã¿ïŒ=ç¶æ /StateïŒ
- çŽç²ãªé¢æ°/å¯äœçšã®ããé¢æ°
ã§ãããããã培åºçã«åå²ãã管çãããããããšããã®ã倧æ ã®èãæ¹ãšãªããŸããã€ãŸãMVCã§èšããšããã®Modelã®çŽ°ååã§ããæšæ§é ã«ãããšãããªæãã§ããã
- Model
- ããŒã¿
- åºå®ããŒã¿ïŒ=ã€ãã¥ãŒã¿ãã«ãªããŒã¿ïŒ
- å€åããããŒã¿ïŒ=ç¶æ /StateïŒ
- ããžãã¯
- çŽç²ãªé¢æ°
- å¯äœçšã®ããé¢æ°
- ããŒã¿
ãããŸã§ã³ãŒãã£ã³ã°ããæèã®äžã®è©±ã§ããããã©ã«ãæ§æãšã¯ãŸãå¥ã§ãããã ããŒããã©ãªãªãšãå°ããªãããã¯ãã ãšmodelãšãserviceãšãäœã£ãŠå
šéšçªã£èŸŒãæããã¹ã¿ãŒãããŠããããããããŸãããã
ããŒã¿ãšããžãã¯ã®åé¢ã¯ãçŸåšäž»æµã®ã¯ã©ã¹ã䜿ã£ããªããžã§ã¯ãæåã§ã¯çŠå¿ãšãããŠããŸãããããç¡èŠããŠãã ããã å€éšã©ã€ãã©ãªãã¯ã©ã¹ããŒã¹ãããªãéããçè«äžãã¯ã©ã¹ã䜿ãå¿
èŠã¯ãããŸããã 代ããã«èšå€§ãªæ°ã®å(type)ãšãé¢æ°ãšããŒã¿ã§ããã°ã©ã ãå¶åŸ¡ããŸãã
ãŸãç¶æ 管çïŒãšåæ¹åããŒã¿ãããŒãçšããã³ã³ããŒãã³ããžã®åæ ïŒã«ã€ããŠãé¢æ°åäºã ãšãããããã¯ãWebããã³ããšã³ãå«ãGUIããã°ã©ã ç¹æã®é¢å¿äºãšããæãã§ãããããããã«ä»ãããð¥ãªéçºåéã®äžã€ã§è²ããªã©ã€ãã©ãªããããŸããããã«é¢ããŠã¯uhyoããã«ãããŸãšãèšäºãçŽ æŽãããã®ã§ã芧ãã ãããReactã䜿ã£ãŠãªããŠãã倧ãã«åŠã³èããããããéšåã¯ããããšã
Mã«ã€ããŠã°ããæžããŸããããVã«é¢ããŠã¯ã³ã³ããŒãã³ãå¿åã§å®å®ããŠããã§ãcomponentsãã©ã«ãã®äžã«ã³ã³ããŒãã³ãããšã®tsx/jsxãã¡ã€ã«ãå ¥ãåããŠããæãã«ãªããŸããã©ã®ç²åºŠã§1ãã¡ã€ã«ã«ãããã¯Atomic Designã®èãæ¹ãåèã«ãªãããšæããŸããéããã説æã§ãããŸããã
é¢æ°å颚ãžã®è¿ã¥ãæ¹
åèã«ãªããåãããŸãããèªåã®å€é·ã眮ããŠãããŸãã
1.ã³ã¬ã¯ã·ã§ã³ïŒâé åïŒæäœã«ãããŠé«éé¢æ°ç³»ã¡ãœããïŒ.map/.foreachç³»ïŒã«èŠªãã
ããããªãããããç³»ã¡ãœããã£ãŠäœãŠåŒã¹ã°ããã®ãæªã ã«åãããã®ã§åããèŸãæžãæ¹ã«ãªã£ãŠããŸãã
ããŠãçè«çãªããšã¯ããŠãããJSerã®ã¿ãªããå€ãã®äººãçŽç²ãªé¢æ°ã®æçšæ§ãèã§ç解ããã®ã£ãŠãããããªãã§ãããããå¥ã«ããã³ããšã³ãã«éã£ã話ã§ããªã倧åã®èšèªã§å®è£
ãããŠããããåæ©ãããæãããã®ã§ãããäžã®äžã«ã¯foreachç³»é¢æ°ã¯ãããã©ãå°éã«for-eachæ§æã§ãã£ãæ¹ãããæåèšèªãããã®ã§âŠâŠã
ç¹ã«ããã°ã©ã åå¿è
ã®äººã¯æèŠã«æ
£ããŠãããããã§ãããmapãfilterãªã©ãçŽç²ãªé¢æ°ã§ãã§ãŒã³ããŠïŒå¿
èŠãããã°ïŒããã¡ã«forEachã§å¯äœçšïŒçŸããâš
2.ã¯ã©ã¹ã«ãããŠãçŽç²ãªã¡ãœãããšå¯äœçšã®ããã¡ãœããã«åããããšãã
ããŠçŽç²ãªé¢æ°ãšå¯äœçšã®ããé¢æ°ã«ãã£ã¡ãåããæèŠã身ã«ä»ããé ãããã¯æ®éæ§ãããªããã¯ã©ã¹ã®ã¡ãœããäœãæãåããŠããã¹ãã ãªããšèãããªããžã§ã¯ãæåãå®ããªããçŽç²ãªã¡ãœãããšå¯äœçšã®ããã¡ãœããã«åãåããããšããŸããã
ãããåãåããŠããæäžã«ããçåã湧ããŠããŸããã
çŽç²ãªã¡ãœããã£ãŠããããã£ãäžååç §ãããå šéšåŒæ°ã§ãã©ã¡ãŒã¿ãæ³šå ¥ããŠãããã¯ã©ã¹ã«å±ããŠãæå³ããªãããããé¢æ°ã§ãããªãïŒ
å€ãå€ããå ¥ã£ãŠããŠå¥ã®å€ãå€ã«åºãŠè¡ããããŒã«ãªãã®ã§çŽç²ãªã¡ãœãããé¡èã§ãããå¯äœçšããã®ã¡ãœããã«ããŠãããããã£ãäžååç §ããªããªãã®ã§ãã¯ã©ã¹ã§æ¬ãæå³åããèãã§ããã
3.é¢æ°ã«ããããšãããããŸãšãããããŠãŒãã£ãªãã£ã¯ã©ã¹å
ããŠé¢æ°ã«ããããšæã£ããã®ã®ãçŸå®ã«ã¯ä»¥äžã®ãããªæµãã«ãªãããšã
- çŽç²é¢æ°ãæœåºããŠäžŠã¹ã ã
- ãã ã®é¢æ°ã ãšæ°ãå€ãããŠç®¡çããããªã
- ãããããªããžã§ã¯ãæåããæªæãšããããã©ããŠãŒãã£ãªãã£ã¯ã©ã¹åããããã€ã³ã¹ã¿ã³ã¹åããæå³ãªããstaticã§ãçµã¿èŸŒã¿ã§ãMathã¯ã©ã¹ãšããããçŽç²é¢æ°ã®å¡ãªããããŸã§åé¡ãªããããâŠâŠ
- ãããããšå¯äœçšããã®é¢æ°ããŠãŒãã£ãªãã£ã¯ã©ã¹å
ãªããžã§ã¯ãæåã霧ã£ãŠããšç¹ã«ãããªããã¡ããªãšãèªåãæåã®é ãã£ãŠãŸãããð
TypeScriptã§èšããš public static readonly
ã¡ãœããã®å±±ã¿ãããªw
2017ïœ2018幎é ã ã£ãããstaticãããã絡ã¿ã®ã³ã¡ã³ãã§JSerïŒæ»èªïŒãšæãã人ã®åŸ®åŠãªåè©äŸ¡ãšã埮åŠãªæè·ã³ã¡ã³ããèŠãããããšãããã®ã§ããããããããã®æ®µéã®äººã§ãã
ä»èšèªã ãšä»æ§ã®é¢ä¿ã§ãããŸã§ããç¡çãªå ŽåããããããããŸããâŠâŠãã ä»ã®JavaScriptã¯ããäžæ©å
ã«è¡ããŸãã
ãã€ãŠã®èªåå«ãããã®æ®µéã®äººåãã«ãmizchiããã®èšäºãããã®äžæãåŒçšããŸãã
ãŸããåå空éãã»ããã ãã®ã¯ã©ã¹ãäžèŠã§ãã
ð²
4.é¢æ°ã®ã¢ãžã¥ãŒã«å
ãããé¢æ°ã®å€§çŸ€ã管çããäžã§æ¬åœã«æ¬²ããã®ã¯åå空éã ã£ããã§ããexport class
ã°ã£ã䜿ã£ãŠãŠãã£ããå¿ããŠããã§ãããJavaScriptã§ã¯
//é¢æ°ã®ã¿ã®ã¢ãžã¥ãŒã«(module.js)
export const getHoge = () => "hoge"
//䜿ãåŽ
import { getHoge } from "./module"
const hoge = getHoge()
ã¿ãããªåœ¢ã§ã䜿ãããã§ãããä»TypeScript&Reactãããã ãããåœããåãããããŸãããããã£ãšclass䜿ã£ãŠããå€æ°ãé¢æ°ãexportã§ããããšãå¿ããŸããw
ãããã®ã¢ãžã¥ãŒã«åãã©ãè¡ããïŒïŒå€§éã®é¢æ°çŸ€ãã©ãçºãããïŒãšããéšåã«ãããŠã¯çŸåšã®èª²é¡ã§ãããæ§æ¥ã®èšèšè«ãå€å°ã¯çããã®ããªãšããæããããŸãã
5.ããŠããŠç¡ãèéã§æ¹åã®ããã«æš¡çŽ¢ãã
ãããŸããããåèªèº«ãããã§æ¢ãŸã£ãŠãã®ã§å
·äœçã«çŽ¹ä»ã§ããã®ã¯ãããŸã§ã§ãããã®å
ã®æ®µéãŸã§è¡ã£ãŠãèšäºãšãªããšäžæ°ã«æžãã®ã§ãããããé¢æ°å颚ã®ãŠãŒã¶ãŒã®ããªã¥ãŒã ãŸãŒã³ããã ã ãšèããŠããŸããã
ã§ããã®æ®µéã ãš ãã€ãã¥ãŒã¿ãã«ãšé¢æ°ã®åºå¥ïŒçŽç²ãåŠãïŒã«ãšããšãæã£ãæç¶ãåŒããã°ã©ãã³ã°ã ãšåŒã¹ãªãããªããããªãã§ãããð
ããã§ã¯é¢æ°åçéãããäžç·ã«ãããªããšèšãããŠãä»æ¹ããªããªãšããæ°æã¡ã¯ãããŸãããªã®ã§ã颚ããã€ããŠããŸãã
ããŠãããããå ã¯ãäžã®äººéã®ååãèŠãéãã
- ç¶æ 管çã©ã€ãã©ãªãè©Šã
- çŸç¶ã®TSã ãšã€ãã¥ãŒã¿ãã«åãäžå®å šã«ãªããããã®ã§ãéšåçã«ã¯ã©ã¹äœ¿ãïŒïŒïŒ or immer.js/Immutable.jsãå°å ¥ãããïŒéãã«ã€ããŠã¯uhyoããã®æ¯èŒèšäºãåç §ã®ããšïŒ
- é¢æ°åæïŒã«ãªãŒåïŒãé§äœ¿ãã ã
- fp-tsãå°å ¥ãã
ãããã次ã®ã¹ããããšãªãã£ãœãå°è±¡ãåããŠããŸãããŸãæåã®2ã€ã¯é¢æ°åäºã ãšãã¡ãã£ãšãºã¬ã課é¡ã«ãªããŸããã
ãã®äžã§èšããšãé¢æ°åæïŒã«ãªãŒåïŒã2015幎ãããïŒïŒïŒã«ã¡ãã£ãšæµè¡ã£ãŠèšäºã¯ãããããããã§ãããåèªèº«ã¯äœ¿ãã©ãããåãããªãïŒçŸåšã®ææ³ã ãšæ¬åŒ§ã®ãã¹ãã«ãªããããŠå¯èªæ§ãèœã¡ããšããã£ãŠãæ®éã«importããé¢æ°ãã©ããããŠexportããŠãæãã§ããæè¿ã§ã¯JavaScriptã«ãã€ãã©ã€ã³ããã£ãŠãããšãã話ãåºãŠããŠãããå°å ¥ãããããã®ãããã®é¢šæœ®ãããªãåãããã§ããã
課é¡ãšçå
1.ã¯ã©ã¹ã®äœ¿ãã©ããã«ã€ããŠïŒã€ãã¥ãŒã¿ãã«åã®çŸç¶ã«ã€ããŠïŒ
ãããªãJavaScriptåå¿è åãã®èª¬æã«ãªããŸãããconstã§ããªããžã§ã¯ãã®å€ã®å€æŽã¯å¯èœã§ãã
const healthState = { isHealthy:true }
state.isHealthy = false
console.log(state.isHealthy) // false
å
šç¶ã€ãã¥ãŒã¿ãã«ãããããŸããããããé²ãããã«TSã«ãas constãšãreadonlyãšãReadonly<T>ãšãè²ã
æ©èœãæèŒãããŠãããã§ãããã©ãããŠãé¢åã ã£ããå
¥ãå¿ãããã§äžå®å
šã«ãªããã¡ã§ãã ãeslintã®ã«ãŒã«ã§ãconstã§å²ãåœãŠããªããžã§ã¯ããã¯ã©ã¹ã€ã³ã¹ã¿ã³ã¹ãé
åãèªåçã«ãã£ãŒãReadonlyããas constæ±ããããã€ã§ããªãããªãã ãšããã€ããŠããããã«ã¯èªèããŠãŸãð
ã€ãæè¿ããã®èšäºã§æžãããŠãããããªææ³ãè©Šãããã®ãšæããããã¯ã©ã¹ã䜿ããªãã¢ããªãå®éã«äœã£ãŠã¿ãæ°ä»ããšããèšäºãèŠã€ããŠããèšããŠãããšã¯åãããããã£ã±immerå
¥ããŠããªãããšæããŸããã
ããã§ãå人éçºãšãã空æ°ã®èªããŠãã¡ã³ããŒã ããªãå
šç¶åãããã§ããããããã¯ãéçããããã ãããªãšããã®ã¯æããŠãŠãgetterãé§äœ¿ããŠã€ãã¥ãŒã¿ãã«ãªããŒã¿åãäœãããã ã£ããã¯ã©ã¹ã®å©çšãã¢ãªãšã¯æããŸãã
2.åãšé¢æ°ã¢ãžã¥ãŒã«ã®åœå
ååã«é¢ããŠã¯ãç解ããããããããã«ããŸãã«åœåãããæ¹ãªãã§ãããããããç解ã®ããã®äŸ¿å®äžã®åã£ãŠæœè±¡çãããŠååã®ã€ãããããªãã±ãŒã¹ãå€ããŠåœåã«å°ããŸãããããšé¢æ°ã®åŒæ°ã®ããŒã¿åãšãã¯ãè¿ãå€ãåºãããã«å¿
èŠãªãã©ã¡ãŒã¿çŸ€ã以äžã®æå³åãããªããã¿ãŒã³ãããã®ã§ãããå°ã£ãŠãŸãã
é¢æ°ã¢ãžã¥ãŒã«åã«é¢ããŠã¯ãã³ãåçŽãªè©±ã§ãæ¢åã®ã¯ã©ã¹åœåèŠåããåçšãããããŠããã§ããã©ããã¯ã©ã¹ã£ãœãååãªã®ã«äžèŠãããã ã®é¢æ°ã®å¡ã ã£ããå«ããªïœããšæ°ã«ãã¡ãã£ãŠããšããã ãã§ãw
3.èšå€§ãªæ°ã®typeãšé¢æ°ãã©ãã¢ãžã¥ãŒã«åãããïŒãã¡ã€ã«ã§çºãããïŒãã©ããã£ã¬ã¯ããªåãããã
ãããæ©ã¿ã©ããã§ãããç¹ã«typeã®ç®¡çãæ·±å»ã§ã
- ãŸãšãæ¹ïŒçœ®ãå ŽæïŒ
- é¢é£ããé¢æ°ã¢ãžã¥ãŒã«ã«äžç·ã«çœ®ã
- typeã ãçºããType.tsãäœã
- exportã®ä»æ¹
- åããšexport
- åã¯exportãããé¢æ°ã®å
¥åºåã®åãšããŠ
Parameters<type>,ReturnType<type>
ã§éæ¥çã«ååŸãã
è²ã
è©Šãããã§ããã埮åŠã«äžé·äžçãããŸãã
ããªãæèŠå²ãããããããŸãããããŸãexportã®ä»æ¹ã«é¢ããŠã¯é¢æ°ã®å
¬éã€ã³ã¿ãŒãã§ãŒã¹ãšããèãæ¹ãéèŠããŠãå ã
ãšååã€ããŠåããšexportãã¡ãã£ãŠããããšæããŸãã
眮ãå Žæã«ã€ããŠã¯ãäž»æµã¯é¢é£ããé¢æ°ã¢ãžã¥ãŒã«ã«äžç·ã«çœ®ã圢ããªãšæããã§ãããå人çã«ã¯äžã€ã®ããŒã¿åã«é¢é£ããé¢æ°ãäžã€ãšã¯éããã¢ãžã¥ãŒã«ãè·šãããšãé »ç¹ã«ããã®ã§ãtypeã ãã®ãã¡ã€ã«ãšããŠåãåºãã®ã劥åœããªãšæã£ãŠããŸããåã«èªåã®ããŒã¿ãé¢æ°ã®èšèšãè¯ããªãå¯èœæ§ãååãããŸããâŠâŠã
ãã ãã¡ã€ã³ãšããŠã®ããŒã¿åãšãé¢æ°ã®ã€ã³ã¿ãŒãã§ãŒã¹ãšãã®ãã皮䟿å®äžã®ããŒã¿åããã£ãŠãå°ãªããšãåè
ã¯çŽæ¥å©çšããé¢æ°ããªããããåç¬ã§ååšãããã®ã§ãã©ããã®é¢æ°ã¢ãžã¥ãŒã«ã«æ·»ãç©ãšããŠåå®çŸ©ã眮ãã®ã¯ããããªãã ãããšããæ°ãããŠããŠããšã¯ããäž¡è
ã®å¢çã¯ææ§ãªæ°ãâŠâŠð€
typeåšãã«ã€ããŠé·ã ãšæžããŸããããã©ãé¢æ°ãã¢ãžã¥ãŒã«åãããããšãããã©ã«ãåãã©ããããçãèªåã®äžã§ææ§ãªãã§ããããZennã®ãââ䜿ã£ãŠâ³â³äœããŸãããç³»èšäºã«ãã£ã¬ã¯ããªæ§æå³ãèŒããŠãããæ¹ãå€ãã®ã§ãããããžãåèã«ããŠãäœãšãããããããŠãŸãã
4.ïŒããžãã¯ãšããŒã¿ã®åé¢ã«ã€ããŠïŒãã¡ã€ã³ã¢ãã«è²§è¡çã§ã¯ãªãããšããæ¹å€ã«ã€ããŠ
èªåã¯ããã¯ãšã³ããå€å°è§Šã£ãŠããã§DDDã¯æ°ã«ãªãã€ã€å匷ããŠãªããã§ããïŒæ æ
¢ïŒããã¡ã€ã³ã¢ãã«è²§è¡çã«é¢ããŠã¯èšäºãå€ããŠããç®ã«ããŸããããã§ãããã³ããšããã¯ã®éãã¯ããã©ããããŸã§èšãåã£ãŠãããããã¯ã®ã³ãã¥ããã£ã§ã¯æ¯æããããŠãã®ã«ããžãã¯ãšããŒã¿ãåé¢ãã¡ãã£ãŠããã®ããªâŠâŠããšçµæ§æ©ãã§ãŸãã
ãã ãã¡ã€ã³ã¢ãã«è²§è¡çãšããèšèãäœã£ãMartin Fowleræ¬äººã«ããèšäºãèŠãŠããªããžã§ã¯ãæåãæ ¹æ¬ã«ãªã£ãŠãã®ã§ããã®æ ¹æ¬èªäœã解äœããã€ã€ããããã³ãã«é¢ããŠã¯ãšããããæ£äžãã«ããŠãŠããã®ããªãšã
ãŸãããã³ããšããã¯ã®éããšããããšã§çã¥ããŠããããã§ããã©ãå人çã«ã¯node.jsããã¯ãšã³ãïŒãšãããTSããã¯ãšã³ãïŒãããã¡ããæ®åãããšæã£ãŠãã®ã§ããããŸãç¡èŠããããªããã§ãããããã®å
ãããã³ããããã£ãªã¢ãå§ãã人éãã©ãã©ãããã¯ã«ãé²åºããŠãæåçè¡çªãèµ·ãããšæããŸããã
node.jsããã³é¢æ°åèšèªã§ããã¯ãšã³ããã£ãŠã人éã£ãŠããã®ãããã¢ãã«çŽæããŠããšæããã§ãããã©ãæãåãã€ããŠããã ãâŠâŠã
ããšè¥å¹²è©±é¡ãå€ãããŸãããé¢æ°åèšèª+DDDã«ã€ããŠæžããããDomain Modeling Made Functionalãã£ãŠè±æžãããããããŠãè©å€ãããã®ã§ããããžã®ã¢ã³ãµãŒãèŒã£ãŠãã®ãæ°ã«ãªã£ãŠãŸãããŸãDDDãå匷ããŠããâŠâŠïŒãããªããã¿ãŒã³ïŒ
åè
- ãªããžã§ã¯ãæåã®åªããšããã®é¿ãæ¹ - mizchi's blog
- çŸä»£ã®ãªããžã§ã¯ãæåã® class ã®å²ãçªåãšå®£èšçããã°ã©ãã³ã°
- ãªããžã§ã¯ãæåã«ã¯ãã«ã¡ã©ããã£ãšã€ããããã®ã¬ã©ã±ãŒã®ã€ã¡ãŒãžããã - ããã ã®Hatena
- äžèŠãªã¯ã©ã¹å®£èšãããã¡ããã£ãïŒ - ã¿ãªã«ã±ããäœæ
- Elixirè©Šé£²é² (4) â ãªããžã§ã¯ãæåãšé¢æ°åã®éã
- ã¯ã©ã¹ã䜿ããªãã¢ããªãå®éã«äœã£ãŠã¿ãæ°ä»ã
- ç§å®¶ç TypeScript æœè±¡ããŒã¿åè¡šçŸ
- ã€ãã¥ãŒã¿ãã«ã«ã€ããŠïŒå¯äœçšïŒ - ãã£ãŠã¿ã
- é¢æ°åã¯ããã°ã©ãã³ã°ã¹ã¿ã€ã«