Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AkafukuとAngular2で行う基幹システム開発
Search
hatappi
July 31, 2016
Technology
0
1.5k
AkafukuとAngular2で行う基幹システム開発
SpeeeKaigi#1
hatappi
July 31, 2016
Tweet
Share
More Decks by hatappi
See All by hatappi
Cloudflare を活用して変わったメルカリの開発体験 / How Cloudflare Changed Mercari's Development Experience
hatappi
1
660
RubyではじめるGraphQL
hatappi
0
860
RubyでChainerつくってます!!
hatappi
2
1.4k
TDDな個人開発
hatappi
0
310
できるだけ楽して楽しくRails開発しよう
hatappi
2
330
EKSにRailsをのせた
hatappi
1
1.2k
RubyとApache Arrow
hatappi
0
2.4k
Red Chainerを なぜ作って今後どうするのか
hatappi
2
2.4k
Fargateで夢は見られるのか
hatappi
1
2.2k
Other Decks in Technology
See All in Technology
アジャイルテストで高品質のスプリントレビューを
takesection
0
120
実践アプリケーション設計 ③ドメイン駆動設計
recruitengineers
PRO
3
260
Understanding Go GC #coefl_go_jp
bengo4com
0
1.1k
ドキュメントはAIの味方!スタートアップのアジャイルを加速するADR
kawauso
3
390
Goss: Faiss向けの新しい本番環境対応 Goバインディング #coefl_go_jp
bengo4com
0
1.4k
ソフトウェア エンジニアとしての 姿勢と心構え
recruitengineers
PRO
4
1.1k
AIエージェント就活入門 - MCPが履歴書になる未来
eltociear
0
540
AIドリブンのソフトウェア開発 - うまいやり方とまずいやり方
okdt
PRO
9
640
mruby(PicoRuby)で ファミコン音楽を奏でる
kishima
1
280
Effective Match Types - Scala Days 2025
bishabosha
1
110
Gaze-LLE: Gaze Target Estimation via Large-Scale Learned Encoders
kzykmyzw
0
320
認知戦の理解と、市民としての対抗策
hogehuga
0
370
Featured
See All Featured
BBQ
matthewcrist
89
9.8k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
Into the Great Unknown - MozCon
thekraken
40
2k
How to Ace a Technical Interview
jacobian
279
23k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Six Lessons from altMBA
skipperchong
28
4k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Automating Front-end Workflow
addyosmani
1370
200k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
Transcript
ͱAngular2Ͱߦ͏جװγεςϜ։ൃ גࣜձࣾSpeee ։ൃ෦ WM։ൃϢχοτ ാத༔࡞
ࣗݾհ •ാத ༔࡞ • גࣜձࣾSpeee •ओʹRailsॻ͍ͯ·͢ɻ • Twitter: @hatappi •
Github: hatappi • facebook: hatappi
ࠓ͢͜ͱ •ݖݶཧγεςϜ •Angular2 + Rails ApiͰͷ ΞϓϦέʔγϣϯ࡞
ݖݶཧγεςϜ
ݱঢ়ͷݖݶཧ ࢲͷࣄۀ෦ͰෳͷϓϩμΫτ͕ ੜΈग़͞Ε͍ͯΔ •ੲPHPͰ ͔͔ΕͨϓϩμΫτ ଟ •RailsͰ͔͔Εͨ ϓϩμΫτɻ PHP͔ΒϦϓϨΠε ͍ͯ͠Δͷ͋Δ
ݱঢ়ͷݖݶཧ hatappi hoge admin hatappi guest hoge admin hatappi admin
ݖݶཧ֤ΞϓϦέʔγϣϯ͝ͱʹ APP1 APP2
ݖݶཧ༻ͷαʔϏε࡞Δʁ
͕ɾɾɾ
None
GoogleAppsͰ ղܾͰ͖ΔͷͰʁ
GoogleApps ? •99.9% ͷՔಇ͕อূ͞Εͨ Google ͷఏڙ͢ ΔάϧʔϓΣΞ •WebͰͷπʔϧఏڙʹͳΔͷͰΠϯλʔωοτ ʹଓͰ͖͍ͯΕ༻Λ͡ΊΔ͜ͱ͕Ͱ͖ Δ
ݖݶAPIΛ࣮ݱ͢ΔͨΊʹ Spread Sheet Apps Script σʔλιʔεͱͯ͠༻ ϢʔβʔͱΞϓϦέʔγϣϯͷ ݖݶΛཧ SpreadSheetͷૢ࡞ʹ༻ ·ͨExecution
APIʹΑΓAPIͷػೳ ఏڙ
ߏਤ voyager markeshi p hoge admin admin fuga guest admin
hatappi admin guest ɾɾɾ ϦΫΤετʹԠͯ͡ σʔλΛऔΓग़͢ ϨεϙϯεΛ JSONͰ͔͑͢ APP1 APP2
ߏਤ voyager markeshi p hoge admin admin fuga guest admin
hatappi admin guest ϦΫΤετʹԠͯ͡ σʔλΛऔΓग़͢ ϨεϙϯεΛ JSONͰ͔͑͢ JSONͷϨεϙϯεͷॲཧͳͲ ֤ΞϓϦέʔγϣϯʹʁʁʁ ɾɾɾ APP1 APP2
Akafuku
Akafuku? ݖݶཧgem ࡞ͨ͠GoogleAppsScriptͷAPIͷ ϨεϙϯεΛΑ͠ͳʹѻͬͯ͘ΕΔɻ ඞཁͳใARϥΠΫʹऔΓग़͢ ͜ͱ͕ग़དྷΔɻ require 'akafuku' Akafuku.find(‘
[email protected]
’) =>
#<Akafuku:0x007fff2b378340 @authorites={"app1"=>"guest", "app2"=>2}, @post=1, @employment=1, @department=7>
Akafukuͷࢫຯ •ΞϓϦέʔγϣϯଆͰͷߋ৽ର Ԡbundle update •εϓϨουγʔτΛΓସ͑Ε ଞࣄۀ෦ͷԣల։Մೳ
ݖݶཧͷ·ͱΊ •αʔόʔϨεͰ ݖݶཧAPIͷ࡞ •gemΛ࡞͢Δ͜ͱͰࠓޙͷΞ ϓϦέʔγϣϯͷಋೖͷ͠ ͢͞Λఏڙ
Rails5 (Api mode) + Angular2
Rails5
Rails5 (api mode) assetsviewhelperͳͲapiͰඞ ཁͷͳ͍ͷ͕ফ͍͑ͯΔɻ cookieͱ͔sessionपΓͳ͍
Angular2
Angular1ͱશ͘ผΒ͍͆͠
ཪΛฦͤ1ΛΒͳͯ͘ 2͔ΒೖΔ͜ͱ͕ग़དྷΔ
ॲཧͷ্ Angular1ܥͷ࣌ΑΓ2.7ഒͷε ϐʔυ͕ग़Δͱͷ͜ͱ
ίϯϙʔωϯτࢦ UIύʔπ͝ͱʹׂ ϓϩύςΟΠϕϯτϋϯυϥͳͲ Λίϯϙʔωϯτͷதʹ·ͱΊΔ ίϯϙʔωϯτ࠶ར༻͕Մೳ
TypeScript͕ਪ ੩తܕ͚ݴޠͷίϯύΠϧΤϥʔ ͰTyposyntaxΤϥʔʹ͖ͮ͘͜ͱ ͕ग़དྷΔɻ IDEͰܕใ͔Βͷิػೳ͕ ༻͢Δ͜ͱ͕ग़དྷΔ
Angularͷબఆʹ͋ͨͬͯ ֶशίετߴΊ͕ͩɺඞཁͳػೳ ϏϧυΠϯ͞Ε͍ͯΔͷͰɺҰ ֮͑ͯ͠·͑ɺ։ൃʹूதͰ͖Δ ࣾʹAngularΛ͔͍͍ͯͨํ͕͍ ͨ ↑ ͳΜ͔ͩΜͩͰܾΊͯίίେ ͖͔ͬͨ
FrontͱBackΛΘ͚Δͱ •ϦϙδτϦ͝ͱ͔ΕΔͷͰɺσϓϩΠ͕ํ ʹࠨӈ͞Εͳ͍ •ԾʹAngular͕ବʹͳͬͨͱͯ͠FrontͷΈ Λվम͢Δ͜ͱͰରԠ͕Ͱ͖Δ •ೝূपΓʹ͕ඞཁ
FrontͱBackΛΘ͚Δͱ •ϦϙδτϦ͝ͱ͔ΕΔͷͰɺσϓϩΠ͕ํ ʹࠨӈ͞Εͳ͍ •ԾʹAngular͕ବʹͳͬͨͱͯ͠FrontͷΈ Λվम͢Δ͜ͱͰରԠ͕Ͱ͖Δ •ೝূपΓʹ͕ඞཁ
ೝূʹ͋ͨͬͯ Rails Apiʹsessioncookieؔ࿈͕ͳ͍ͷͰɺ ࠓ·ͰͷΑ͏ͳcookieʹใΛ อ࣋͢ΔΑ͏ͳ͜ͱ͕ग़དྷͳ͍ɻ TokenBased Auth
TokenBased Auth
ॴײ •Angular2ָ͍͠!! ͲΜͲΜνϟϯδ͍ͯ͜͠͏ •gemԽ͓ͯ͘͠ͱԿ͔ͱศར
͓ΘΓ