Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ripple.js(とcomponent関連)の話

 ripple.js(とcomponent関連)の話

天下一クライアントサイドJS MV*フレームワーク武道会

Tajima Junpei

July 11, 2014
Tweet

Other Decks in Programming

Transcript

  1. ripple.js֓ཁ • reactiveͳviewΛఏڙ͢ΔܰྔϑϨʔϜϫʔΫ • ripple.jsͷreadmeΑΓ: WBS1FSTPOSJQQMF EJW\\OBNF^^EJW  BUUS OBNF

    \SFRVJSFEUSVF UZQFTUSJOH^  ! WBSQFSTPOOFX1FSTPO \ OBNF5PN ^  ! QFSTPOBQQFOE5P EPDVNFOUCPEZ  QFSTPOOBNF#BSSZ %0.͕ࣗಈతʹߋ৽͞ΕΔ
  2. composition WBS"WBUBSSJQQMF  JNHTSDIUUQHSBQIGBDFCPPLDPN\\VTFSOBNF^^QJDUVSF  WBS-JOLSJQQMF  BISFGIUUQXXXGBDFCPPLDPN\\VTFSOBNF^^\\VTFSOBNF^^B  !

    WBS1SPpMFSJQQMF < EJWDMBTTQSPpMF  QSPpMFBWBUBSVTFSOBNF\\VTFSOBNF^^QSPpMFBWBUBS  QSPpMFMJOLVTFSOBNF\\VTFSOBNF^^QSPpMFMJOL  EJW >KPJO   DPNQPTF QSPpMFBWBUBS "WBUBS  DPNQPTF QSPpMFMJOL -JOL  ! WBSQSPpMFOFX1SPpMF \VTFSOBNFBOUIPOZTIPSU^  BQQFOE5P EPDVNFOUCPEZ  EJWDMBTTQSPpMF JNHTSDIUUQHSBQIGBDFCPPLDPNBOUIPOZTIPSUQJDUVSF BISFGIUUQXXXGBDFCPPLDPNBOUIPOZTIPSUBOUIPOZTIPSUB EJW
  3. plugin • eventsϓϥάΠϯΛར༻͍ͯ͠Δαϯϓϧ WBS'PSNSJQQMF < GPSN  CVUUPOPODMJDL\\UIJTDMJDLFE^^CVUUPOCVUUPO  GPSN

    >KPJO   VTF SJQQMFFWFOUT  ! 'PSNQSPUPUZQFDMJDLFEGVODUJPO F \ FQSFWFOU%FGBVMU  BMFSU DMJDLFE  ^ ! WBSGPSNOFX'PSN BQQFOE5P EPDVNFOUCPEZ 
  4. ओͳϓϥάΠϯҰཡ • shortcuts - add custom key binding combos •

    events - add event listeners to the DOM and call methods on the view • each - Basic iteration using the each directive. • bind-methods - Bind all methods on the prototype to the view • markdown - Adds a directive to render markdown using Marked. • extend - Makes adding methods to the view prototype a little cleaner • intervals - Easily add and remove intervals • computed - Add computed properties. • refs - Easily reference elements within the template • dispatch - Dispatch custom DOM events up the tree
  5. • componentͱripple.jsͷαϯϓϧ: WBSSJQQMFSFRVJSF SJQQMF  WBSSFGTSFRVJSF bSFGT  WBSSFGTSFRVJSF FWFOUT

     WBSUFNQMBUFSFRVJSF UFNQMBUF  ! WBS'PSNSJQQMF UFNQMBUF  VTF FWFOUT  VTF SFGT  ! WBSGPSNOFX'PSN BQQFOE5P EPDVNFOUCPEZ