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.4k
AkafukuとAngular2で行う基幹システム開発
SpeeeKaigi#1
hatappi
July 31, 2016
Tweet
Share
More Decks by hatappi
See All by hatappi
RubyではじめるGraphQL
hatappi
0
790
RubyでChainerつくってます!!
hatappi
2
1.3k
TDDな個人開発
hatappi
0
270
できるだけ楽して楽しくRails開発しよう
hatappi
2
300
EKSにRailsをのせた
hatappi
1
1.1k
RubyとApache Arrow
hatappi
0
2.2k
Red Chainerを なぜ作って今後どうするのか
hatappi
2
2.2k
Fargateで夢は見られるのか
hatappi
1
2k
個人サービスをFargateに移行したよ
hatappi
1
630
Other Decks in Technology
See All in Technology
[JAWS-UG新潟#20] re:Invent2024 -CloudOperationsアップデートについて-
shintaro_fukatsu
0
150
[Oracle TechNight#85] Oracle Autonomous Databaseを使ったAI活用入門
oracle4engineer
PRO
1
210
20241218_マルチアカウント環境におけるIAM_Access_Analyzerによる権限管理.pdf
nrinetcom
PRO
3
150
Storage Browser for Amazon S3
miu_crescent
1
340
効率的な技術組織が作れる!書籍『チームトポロジー』要点まとめ
iwamot
2
190
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
820
AWS re:Invent 2024 Recap in ZOZO - Serverless で好きなものをしゃべってみた
chongmyungpark
0
1k
AWS環境におけるランサムウェア攻撃対策の設計
nrinetcom
PRO
1
350
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
6
1.5k
「完全に理解したTalk」完全に理解した
segavvy
1
270
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
250
Unlearn Product Development - Unleashed Edition
lemiorhan
PRO
2
160
Featured
See All Featured
Speed Design
sergeychernyshev
25
720
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
19
2.3k
Visualization
eitanlees
146
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
A designer walks into a library…
pauljervisheath
205
24k
Code Review Best Practice
trishagee
65
17k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Unsuck your backbone
ammeep
669
57k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
330
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
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Խ͓ͯ͘͠ͱԿ͔ͱศར
͓ΘΓ