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
770
RubyでChainerつくってます!!
hatappi
2
1.3k
TDDな個人開発
hatappi
0
260
できるだけ楽して楽しくRails開発しよう
hatappi
2
290
EKSにRailsをのせた
hatappi
1
1.1k
RubyとApache Arrow
hatappi
0
2.1k
Red Chainerを なぜ作って今後どうするのか
hatappi
2
2.2k
Fargateで夢は見られるのか
hatappi
1
2k
個人サービスをFargateに移行したよ
hatappi
1
620
Other Decks in Technology
See All in Technology
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
110
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Engineer Career Talk
lycorp_recruit_jp
0
160
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
強いチームと開発生産性
onk
PRO
34
11k
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
580
Lexical Analysis
shigashiyama
1
150
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
470
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Producing Creativity
orderedlist
PRO
341
39k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
Speed Design
sergeychernyshev
24
610
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
For a Future-Friendly Web
brad_frost
175
9.4k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
BBQ
matthewcrist
85
9.3k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
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Խ͓ͯ͘͠ͱԿ͔ͱศར
͓ΘΓ