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 パートです。

Shingo Yamazaki

February 23, 2016
Tweet

More Decks by Shingo Yamazaki

Other Decks in Technology

Transcript

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

    View full-size slide

  2. ࣗݾ঺հ
    ࢁ㟒ɹਅޗ

    גࣜձࣾνʔϜεϐϦοτ
    zaki___yama

    Blog: http://dackdive.hateblo.jp/
    Lightning Component ͸ͦΜͳʹ…
    લճͷϋΠϥΠτ

    View full-size slide

  3. PR
    http://zaki-yama.github.io/salesforce-developers.info/ 

    Python੡ ੩తαΠτδΣωϨʔλPelican + GitHub Pages Ͱ࡞ͬͯ·͢
    χϡʔεαΠτ
    ࡞Γ·ͨ͠

    View full-size slide

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

    (։ൃऀϓϨϏϡʔ)

    View full-size slide

  5. ຊ೔͓࿩͠ͳ͍͜ͱ
    • $A.error() ͷഇࢭ
    • format() ʹΑΔදࣔϥϕϧύϥϝʔλͷಈతͳೖྗ
    • ҆શͳΫϥΠΞϯτଆΩϟογϡʹΑΔύϑΥʔϚϯεͷ
    վળ
    • Sfdc JavaScript άϩʔόϧͷ࡟আ
    • List ·ͨ͸ Map ύϥϝʔλΛ࢖༻ͨ͠ Apex ίϯτϩʔϥ
    ͰͷΤϥʔͷղܾ

    View full-size slide

  6. ΞΫηεݖνΣοΫͷ
    ΑΓݫ֨ͳద༻

    View full-size slide

  7. ΞΫηεݖνΣοΫͷ
    ΑΓݫ֨ͳద༻
    • ΍ ʹ

    access=“…” ଐੑ͕ ඞਢ ʹͳΓ·͢
    • Spring’16: ϒϥ΢βίϯιʔϧͰܯࠂͷΈ

    (σόοάϞʔυݶఆ)
    • Summer’16 Ҏ߱: ΞΫηεͰ͖ͳ͘ͳΔ

    View full-size slide

  8. access ଐੑͷछྨ
    • private (aura:attribute ͷΈ)
    • ֎෦ࢀরෆՄ
    • public : σϑΥϧτ
    • ಉ໊͡લۭؒ಺Ͱ࢖༻Մೳ
    • global
    • ͢΂ͯͷ໊લۭؒͰ࢖༻Մೳ
    • ؅ཧύοέʔδͱͯ͠഑෍͢Δίϯϙʔωϯτ͸͜Εʁ
    https://developer.salesforce.com/docs/atlas.ja-jp.198.0.lightning.meta/lightning/access_intro.htm

    View full-size slide

  9. WARNINGͷҰྫ

    View full-size slide

  10. Α͘Θ͔Βͳ͍͜ͱ
    • ʮίϯϙʔωϯτΛදࣔͨ࣌͠ʯͰ͸ͳ͘

    ܥίϯϙʔωϯτΛૢ࡞ͨ࣌͠ʹܯࠂ͕දࣔ͞Ε͍ͯΔʁ
    • όά͍͘͞…
    • ͨΊ͠ʹ access ͳ͠Ͱ؅ཧύοέʔδԽɺଞ૊৫ʹΠϯετʔϧ
    • App Builder ࢖ͬͯ S1, LEX Ͱදࣔ → ܯࠂग़ͳ͍
    • ͰίʔυʹຒΊࠐΈ → ෆՄ
    • σϑΥϧτͰpublic => public ͳΒলུՄೳʁ
    ิ଍ʣͳͷͰɺઌ΄Ͳʮඞਢʯͱॻ͖·͕࣮ͨ͠ࡍʹ͸

    ʮglobal ͚ͩ͸ͪΌΜͱఆٛ͠ͳ͍ͱɺΠϯετʔϧͯ͠࢖ͬͯ΋Β͏͜ͱ͕Ͱ͖ͳ͘ͳΓ·͢Αʯ

    ͱͳΔΜ͡Όͳ͍͔ͱ͍͏ͷ͕ࠓͷͱ͜ΖͷղऍͰ͢ɻ

    σϑΥϧτ public ͳͷʹશίϯϙʔωϯτʹ access=“public” ͬͯॻ͚ɺͩͱͪΐͬͱ໘౗Ͱ͢ΑͶɻɻɻ

    View full-size slide

  11. Lightning Out (ϕʔλ)

    View full-size slide

  12. Lightning Out (ϕʔλ)
    • Lightning Component Λ Lightning ͷ֎Ͱ΋࢖͑
    ΔΑ͏ͳ࢓૊Έ
    • Visualforce ಺Ͱͷ࢖༻͸ Winter’16 ͔ΒՄೳͩͬ
    ͨ(LC4VF)
    • Spring’16 Ͱ Force.com ֎͔Β΋ར༻Մೳʹʂ

    ˠ υΩϡϝϯτݟ͔ͭΒͳ͍໰୊(ӳޠ൛΋)

    View full-size slide

  13. ެࣜϒϩάͰ΋

    View full-size slide

  14. ࢀߟ1: Visualforce Ͱ࢖͏

    View full-size slide

  15. ࢀߟ1: Visualforce Ͱ࢖͏
    • ઐ༻ͷ Lightning App Λ༻ҙͯ͠

    ίϯϙʔωϯτΛ಺แ͢Δ
    • App ͸ extends=“ltng:outApp” ͕ඞཁ

    View full-size slide

  16. ࢀߟ1: Visualforce Ͱ࢖͏
    1. ίϯϙʔωϯτ
    2. ଐੑ
    3. ૠೖҐஔ
    4. callback
    • lightning.out.js ͸ݱࡏ
    • $Lightning.use -> createComponent
    https://developer.salesforce.com/docs/atlas.ja-jp.198.0.lightning.meta/lightning/components_visualforce.htm

    (஫: Winter’16)

    View full-size slide

  17. ࢀߟ2: Force.com֎͔ΒݺͿ
    http://appirio.co.jp/category/tech-blog/2015/12/hello-world-lightning-out/
    4QSJOH`Ͱ
    ଟগ͸ઃఆָ͕ʹͳͬͨͷ͔ͳ͋ɻɻɻ
    ͱ͍ͬͨͱ͜Ζ

    View full-size slide

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

    View full-size slide

  19. Lightning ίϯϙʔωϯτ τʔΫϯ
    • ίϯϙʔωϯτͷ CSS ༻ʹม਺ΛఆٛͰ͖Δ
    • ίϯϙʔωϯτͱಠཱͨ͠ϑΝΠϧ

    (ϑΝΠϧ໊΋ࢦఆ͞Ε͍ͯΔ)

    View full-size slide

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

    View full-size slide

  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
    ͕ඞཁ

    View full-size slide

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

    View full-size slide