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

ActionCable和实时交互

0483666667da0ede142e86a3cc190d22?s=47 代码之力
September 24, 2016

 ActionCable和实时交互

未来属于实时交互

0483666667da0ede142e86a3cc190d22?s=128

代码之力

September 24, 2016
Tweet

Transcript

  1. ActionCable和实时交互 ็ێ @ShiningRay

  2. ىԭ౯ ̽JavaScriptṛᕆᑕଧᦡᦇ̾ᦲᘏ ܻᔦԪጯᑀᘶݳڠতՈ ูܻᩳᄓኮCTO ፓڹࣁႣਪFEDࢫᴚ҅ᜰݷ“ᳬط”

  3. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do

    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
 ҁ๚ׅၥکଗᨵ҂ FBI WARNING
  4. ԅ֜Railsᥝෆݳ ActionCable Ҙ ActionCableᚆԅԾߝଃ๶Ջԍݒ۸Ҙ

  5. 2012 PJAX Turbolinks 2016 Server-side push ActionCable 2005 AJAX Server-side

    generated javascript response
  6. አಁࡅཻ ๅளጱߥଫ᭛ଶ Rule #1

  7. Ӟፗզ๶๋ၞᤈጱଫአฎՋԍҘ

  8. 2000ଙ๶๋ၞᤈጱଫአ ᭜੪ᚸᦔଂࢵ ܨ෸᭗ᦔ

  9. ፡፡ᬯӻ॰៱ጱଫአ

  10. None
  11. ԾߝᕪቘғᬯԞᚆၞᤈҘ

  12. ୨଒០᭜ԧӞᐿஉग़Ոࣁᕚጱ࿈࿎

  13. አಁࡅཻ ᪙ၚጱՈԻ԰ Rule #2


  14. ෈๜ғು᨝מ௳ ࢶᇆғᶉாᥤᥧמ௳҅ᕡஙጱᤒఘ҅ᙏ֛ ᧍ᶪғ्ᶪמ௳҅ᕡஙጱ᧍ᶪ᧍᧣ ᥤ᷇ғۖாጱᥤᥧ޾्ᶪמ௳҅ݒ۸ጱמ௳ VRғဃၺୗጱقො֖ጱמ௳

  15. አಁࡅཻ ๅӿ੄ጱמ௳ᕡᜓ Rule #3


  16. ই֜ᷓᥟփᕹ Web/App

  17. ፗඎ

  18. GrabTaxi ጱਫ෸ڊᑄ᫣ړ૲

  19. Murally አಁܐݶਫ෸ڠ֢

  20. ౯ժᚆވ՗ࣁᕚ჋౭Ӿ឴஑ᅎఽҘ

  21. None
  22. ԰ᘶᗑጱ๚๶ંԭ
 ਫ෸Ի԰

  23. BUT

  24. ActionCableጱਫሿොୗঅހ?

  25. ࢧᶶӞӥActionCableच๜֛ᔮ

  26. Client-side ActionCable Process Rails Process Server-side 
 Channel Client-side 


    Channel Redis
 named Channel stream_from Notify #received #perform(action) ActionCable broadcast Connection Model Controller Job DOM
  27. ᬦԭ॔๥ጱ༷ஷ޾᭦ᬋ!

  28. Not rubyish! Keep It Simple, StupidѺ

  29. ౯ਫᴬమᥝጱ

  30. ই֜ਫሿҘ

  31. ᒼໜᬮฎMVC

  32. Model View Controller ᕮຎ ᧗࿢ ඙֢/ץද ឴ݐහഝ ჉ວ/ޝሿ Server-side Client-side

    Rails ጱ MVC ཛྷୗ
  33. Model View Controller User ፡ک ࢧ᧣ ඙֢ ᭗Ꭳ
 ๅෛ Client-side

    SmalltalkጱMVCཛྷୗ ᬌف/Ԫկ ᧛ݐහഝ
  34. Model A Server-side Client-side Model A’ View හഝݶྍ ๅෛ ඙֢


    ץද Controller ᧗࿢ ቘమጱਫ෸Ի԰ጱᑕଧཛྷୗ ඙֢/ᬌف
  35. ChannelҘ
 SubscriptionҘ
 BroadcastҘ
 MessageҘ

  36. ਠق෫ᵱीےᬯԶ༷ஷ

  37. Ӟӻஙੜጱᶱፓcoronajs https://github.com/coronajs/corona in Nodejs/TypeScript ՐՐԅԧḵᦤమဩ

  38. Demo https://github.com/coronajs/mouseroom

  39. Q & A ᨀᨀय़ਹ