Annotation? Decorator?

Annotation? Decorator?

ng-kyoto#3

14084b6462b19a8512ce5208a76f8925?s=128

fand/amagitakayosi

November 22, 2015
Tweet

Transcript

  1. "OOPUBUJPOʜ 
 %FDPSBUPSʜ OHͷ"OOPUBUJPOʹ͍ͭͯ !BNBHJUBLBZPTJ

  2. @amagitakayosi

  3. None
  4. None
  5. OH ೖ໳

  6. )5.-ॻ͍ͯ

  7. +4ॻ͍ͯ

  8. None
  9. ΊͰͨ͠ ΊͰͨ͠

  10. ৄ͘͠͸ޙͰʂ ৄ͘͠͸ޙͰʂ

  11. ΊͰͨ͠ ΊͰͨ͠

  12. ͍΍͍΍

  13. None
  14. OHYYY  ϝιουνΣΠϯ

  15. None
  16. ΦϨΦϨ$MBTT

  17. ΋ͬͱϞμϯʹ ॻ͖͍ͨʂ

  18. OH ࠶ೖ໳

  19. )5.-ॻ͍ͯ

  20. +4όϕͬͯ +4όϕͬͯ +4όϕͬͯ +4όϕͬͯ +4όϕͬͯ

  21. None
  22. &4$MBTTʂ

  23. None
  24. ΊͰͨ͠ ΊͰͨ͠

  25. ͍΍͍΍ ͪΐͬͱ଴ͬͯ

  26. None
  27. None
  28. !$PNQPOFOU ͱ͸ʜʜʁ

  29. None
  30. None
  31. %FDPSBUPS

  32. None
  33. Decorator w &$."4DSJQU1SPQPTBMͷҰͭ
 TUBHF  w ؔ਺΍ΫϥεΛम০Ͱ͖Δ w 1ZUIPOͷEFDPSBUPSͱେମಉ͡

  34. ࢖༻ྫ w NJYJO %* ϝϞԽ ʜʜ w KBZQIFMQTDPSFEFDPSBUPS w DIBUXPSLXSBTTF

  35. https://speakerdeck.com/armorik83/es7-decorators ࢀߟBSNPSJL͞Μͷղઆ

  36. ࣮૷ঢ়گ w CBCFM
 CBCFMQMVHJOTZOUBYEFDPSBUPST  w 5ZQF4DSJQU
 Wd

  37. CBCFMͰ !$PNQPOFOU ࢖͑Δʂ

  38. None
  39. Μʜʜʁ

  40. None
  41. None
  42. SFqFDUNFUBEBUB ແ͠Ͱ !$PNQPOFOU࢖͏ͱ Τϥʔग़Δʂʂʂʂʂ 5ZQF4DSJQUͷ৔߹͸FNJU%FDPSBUPS.FUBEBUBΦϓγϣϯ͕ඞཁ

  43. reflect-metadata w NFUBEBUBΛѻ͏ͨΊͷQPMZpMM w &43FqFDUʹϝιου௥Ճ w 3FqFDUHFU.FUB%BUB ͱ͔

  44. 3FqFDU  .FUBEBUB

  45. ES6 Reflect w ϝλϓϩ༻ศརϝιουू w 1SPYZͱ͍ͬ͠ΐʹ࢖ͬͨΓ w AOFXAΛॻ͔ͣʹ
 Πϯελϯεੜ੒ͨ͠Γ

  46. http://www.2ality.com/2014/12/es6-proxies.html ࢀߟ
 .FUBQSPHSBNNJOHXJUI &$."4DSJQUQSPYJFT

  47. NFUBEBUBͬͯ Կʜʜ

  48. Θ͔Βͳ͍ͷͰ ΤϥʔՕॴ ݟͯΈΔ

  49. NPEVMFTBOHVMBSTSDDPSFVUJM EFDPSBUPSTUTͰΤϥʔग़ͯΔ

  50. ͙͢ԼͷNBLF%FDPSBUPSͰ 3FqFDU৮ͬͯΔ

  51. ͙͢ԼͷNBLF%FDPSBUPSͰ 3FqFDU৮ͬͯΔ

  52. None
  53. None
  54. "OOPUBUJPO

  55. Annotation w 5SBDFVS"U4DSJQUͰ࠾༻͞Εͨ
 ಛघه๏ͷҰͭ w ؔ਺΍ΫϥεΛؾ߹Ͱम০͢Δ w 1ZUIPOͷEFDPSBUPSͱશવҧ͏

  56. None
  57. ର৅ΦϒδΣΫτʹ BOOPUBUJPO഑ྻΛ ڧҾʹੜ΍͠ "OOPUBUJPOΛอଘ

  58. AtScriptͷग़ྗJSΛݟΔͱ w "OOPUBUJPO͸ؔ਺Ͱͳ͘Ϋϥε w ର৅ͷΫϥεʹ
 BOOPUBUJPOϑΟʔϧυΛੜ΍͠
 "OOPUBUJPOͷΠϯελϯεΛอଘ

  59. ڧҾ

  60. "OOPUBUJPOͰ Ͱ͖Δ͜ͱ͸ %FDPSBUPSͰ΋ Ͱ͖Δʂʂʂʂʂ

  61. ࣌ܥྻ w 5SBDFVSʹ"OOPUBUJPO͕௥Ճ w &4%FDPSBUPSTͷQSPQPTBM w "U4DSJQUൃද w "U4DSJQUऴྃͷ͓஌Βͤ

  62. ࣌୅͕มΘͬͨͷͰ ࢓ํͳͦ͞͏ ʢ◞‸◟ʣ

  63. ͜ΕΛ౿·͑ͯ NBLF%FDPSBUPSΛ ಡΉͱ

  64. DMTBOOPUBUJPOT഑ྻͷ୅ΘΓʹ SFqFDUNFUBEBUB࢖ͬͯΔ

  65. 3FqFDUHFU0XO.FUBEBUB Λ ͨͲ͍ͬͯ͘ͱ 8FBL.BQΛ࢖ͬͯ ΦϒδΣΫτຖͷ.FUBEBUBΛ อଘ͍ͯ͠Δ

  66. NBLF%FDPSBUPSͷ ໾ׂ͸ʜʜʁ

  67. "OOPUBUJPOͷ࢓૊ΈΛ ࠶ݱ͢Δ

  68. "OOPUBUJPOͷ࢓૊ΈΛ ࠶ݱ͢Δ BOOPUBUJPO$MT͔Β %FDPSBUPSΛ࡞ͬͯฦ͢

  69. "OOPUBUJPO୅ΘΓͷ %FDPSBUPSΛ࡞Δ ؔ਺ͩͬͨʂ

  70. !$PNQPOFOUͷ ࣮૷͸ʁ

  71. NPEVMFTBOHVMBSTSDDPSF NFUBEBUBUT-- NBLF%FDPSBUPSʹ $PNQPOFOU.FUBEBUBΛ౉ͯ͠Δ

  72. NPEVMFTBOHVMBSTSDDPSF NFUBEBUBEJSFDUJWFTUT-

  73. ͏Ή

  74. ·ͱΊ

  75. ·ͱΊ w "OOPUBUJPOͱ%FDPSBUPS͸ผ w OH͸ੲ"OOPUBUJPOΛ࢖ͬͯͨ w ݱࡏ͸SFqFDUNFUBEBUBΛ࢖͍
 %FDPSBUPSͰ"OOPUBUJPOΛ
 ࠶ݱ͍ͯ͠Δ

  76. ײ૝ w OHɺֶशϦιʔεړΔΑΓ
 ຊମίʔυͷίϝϯτಡΜͩ΄͏ָ͕ w SFqFDUNFUBEBUBɺ
 8FBL.BQ࢖͑͹͍͍͚ͩͰ͸ʁ w QSPQPTBMग़͢ͷ͸੓࣏త͗͢Δ

  77. ڭ܇ ϓϩδΣΫτʹ ࣌ؒΛ͔͚͗͢Δͳ

  78. ͋Γ͕ͱ͏͍͟͝·ͨ͠

  79. ˣؔ࿈ϖʔδͷϒΫϚˣ http://b.hatena.ne.jp/amagitakayosi/ng2/