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

Tokyo Salesforce Developer Group Meetup #11

Tokyo Salesforce Developer Group Meetup #11

2016/02/23 Tokyo Salesforce Developer Group Meetup #11
Spring'16 リリースノート輪読の Lightning Component パートです。

50fc0fdc2327ecbe7350645812de52e3?s=128

Shingo Yamazaki

February 23, 2016
Tweet

Transcript

  1. Spring’16 ϦϦʔεϊʔτྠಡ Lightning Component Tokyo Salesforce Developer Group Meetup #11

  2. ࣗݾ঺հ ࢁ㟒ɹਅޗ
 גࣜձࣾνʔϜεϐϦοτ zaki___yama
 Blog: http://dackdive.hateblo.jp/ Lightning Component ͸ͦΜͳʹ… લճͷϋΠϥΠτ

  3. PR http://zaki-yama.github.io/salesforce-developers.info/ 
 Python੡ ੩తαΠτδΣωϨʔλPelican + GitHub Pages Ͱ࡞ͬͯ·͢ χϡʔεαΠτ

    ࡞Γ·ͨ͠
  4. ຊ೔͓࿩͢Δ͜ͱ • ΞΫηεݖνΣοΫͷΑΓݫ֨ͳద༻ • Lightning Out (ϕʔλ) • Lightning ίϯϙʔωϯττʔΫϯ


    (։ൃऀϓϨϏϡʔ)
  5. ຊ೔͓࿩͠ͳ͍͜ͱ • $A.error() ͷഇࢭ • format() ʹΑΔදࣔϥϕϧύϥϝʔλͷಈతͳೖྗ • ҆શͳΫϥΠΞϯτଆΩϟογϡʹΑΔύϑΥʔϚϯεͷ վળ

    • Sfdc JavaScript άϩʔόϧͷ࡟আ • List ·ͨ͸ Map ύϥϝʔλΛ࢖༻ͨ͠ Apex ίϯτϩʔϥ ͰͷΤϥʔͷղܾ
  6. ΞΫηεݖνΣοΫͷ ΑΓݫ֨ͳద༻

  7. ΞΫηεݖνΣοΫͷ ΑΓݫ֨ͳద༻ • <aura:application> ΍ <aura:component> ʹ
 access=“…” ଐੑ͕ ඞਢ

    ʹͳΓ·͢ • Spring’16: ϒϥ΢βίϯιʔϧͰܯࠂͷΈ
 (σόοάϞʔυݶఆ) • Summer’16 Ҏ߱: ΞΫηεͰ͖ͳ͘ͳΔ
  8. access ଐੑͷछྨ • private (aura:attribute ͷΈ) • ֎෦ࢀরෆՄ • public

    : σϑΥϧτ • ಉ໊͡લۭؒ಺Ͱ࢖༻Մೳ • global • ͢΂ͯͷ໊લۭؒͰ࢖༻Մೳ • ؅ཧύοέʔδͱͯ͠഑෍͢Δίϯϙʔωϯτ͸͜Εʁ https://developer.salesforce.com/docs/atlas.ja-jp.198.0.lightning.meta/lightning/access_intro.htm
  9. WARNINGͷҰྫ

  10. Α͘Θ͔Βͳ͍͜ͱ • ʮίϯϙʔωϯτΛදࣔͨ࣌͠ʯͰ͸ͳ͘
 <ui:xxx> ܥίϯϙʔωϯτΛૢ࡞ͨ࣌͠ʹܯࠂ͕දࣔ͞Ε͍ͯΔʁ • όά͍͘͞… • ͨΊ͠ʹ access

    ͳ͠Ͱ؅ཧύοέʔδԽɺଞ૊৫ʹΠϯετʔϧ • App Builder ࢖ͬͯ S1, LEX Ͱදࣔ → ܯࠂग़ͳ͍ • <namespace:Foo /> ͰίʔυʹຒΊࠐΈ → ෆՄ • σϑΥϧτͰpublic => public ͳΒলུՄೳʁ ิ଍ʣͳͷͰɺઌ΄Ͳʮඞਢʯͱॻ͖·͕࣮ͨ͠ࡍʹ͸
 ʮglobal ͚ͩ͸ͪΌΜͱఆٛ͠ͳ͍ͱɺΠϯετʔϧͯ͠࢖ͬͯ΋Β͏͜ͱ͕Ͱ͖ͳ͘ͳΓ·͢Αʯ
 ͱͳΔΜ͡Όͳ͍͔ͱ͍͏ͷ͕ࠓͷͱ͜ΖͷղऍͰ͢ɻ
 σϑΥϧτ public ͳͷʹશίϯϙʔωϯτʹ access=“public” ͬͯॻ͚ɺͩͱͪΐͬͱ໘౗Ͱ͢ΑͶɻɻɻ
  11. Lightning Out (ϕʔλ)

  12. Lightning Out (ϕʔλ) • Lightning Component Λ Lightning ͷ֎Ͱ΋࢖͑ ΔΑ͏ͳ࢓૊Έ

    • Visualforce ಺Ͱͷ࢖༻͸ Winter’16 ͔ΒՄೳͩͬ ͨ(LC4VF) • Spring’16 Ͱ Force.com ֎͔Β΋ར༻Մೳʹʂ
 ˠ υΩϡϝϯτݟ͔ͭΒͳ͍໰୊(ӳޠ൛΋)
  13. ެࣜϒϩάͰ΋

  14. ࢀߟ1: Visualforce Ͱ࢖͏

  15. ࢀߟ1: Visualforce Ͱ࢖͏ • ઐ༻ͷ Lightning App Λ༻ҙͯ͠
 ίϯϙʔωϯτΛ಺แ͢Δ •

    App ͸ extends=“ltng:outApp” ͕ඞཁ
  16. ࢀߟ1: Visualforce Ͱ࢖͏ 1. ίϯϙʔωϯτ 2. ଐੑ 3. ૠೖҐஔ 4.

    callback • lightning.out.js ͸ݱࡏ <apex:includeLightning /> • $Lightning.use -> createComponent https://developer.salesforce.com/docs/atlas.ja-jp.198.0.lightning.meta/lightning/components_visualforce.htm
 (஫: Winter’16)
  17. ࢀߟ2: Force.com֎͔ΒݺͿ http://appirio.co.jp/category/tech-blog/2015/12/hello-world-lightning-out/ 4QSJOH`Ͱ ଟগ͸ઃఆָ͕ʹͳͬͨͷ͔ͳ͋ɻɻɻ ͱ͍ͬͨͱ͜Ζ 

  18. Lightning ίϯϙʔωϯτ τʔΫϯ (։ൃऀϓϨϏϡʔ)

  19. Lightning ίϯϙʔωϯτ τʔΫϯ • ίϯϙʔωϯτͷ CSS ༻ʹม਺ΛఆٛͰ͖Δ • ίϯϙʔωϯτͱಠཱͨ͠ϑΝΠϧ
 (ϑΝΠϧ໊΋ࢦఆ͞Ε͍ͯΔ)

  20. τʔΫϯͷ࢖͍ํ • defaultTokens.tokens (ϑΝΠϧ໊ݻఆ) • ίϯϙʔωϯτͷ CSS ଆ

  21. ඪ४ઃܭτʔΫϯ • ඪ४Ͱ༻ҙ͞Εͨม਺܈ Lightning Component Developer Guide: Standard Design Tokens


    https://developer.salesforce.com/docs/atlas.en-us.200.0.lightning.meta/lightning/tokens_standard.htm ஫ ࢖͏ͱ͖͸ EFGBVMU5PLFOTUPLFOTʹ BVSBUPLFOTFYUFOETlGPSDFCBTF ͕ඞཁ
  22. ͋Γ͕ͱ͏͍͟͝·ͨ͠