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
Goでwebアプリ作っている話
Search
polidog
August 26, 2017
Technology
1
380
Goでwebアプリ作っている話
shizuoka.go #12の資料です
polidog
August 26, 2017
Tweet
Share
More Decks by polidog
See All by polidog
小さな開発会社を作った理由
polidog
1
2.3k
小さな開発会社がWebサービスを作る理由
polidog
1
500
トランザクションスクリプトは何がダメなのか?
polidog
2
2.8k
React初心者がHooksを理解するためにコードを読んでみた
polidog
0
480
object-mapperを作ってる話
polidog
0
290
2020年から始めるSymfonyフレームワーク
polidog
2
1.2k
はじめてのモダンPHP
polidog
0
540
ソフトウェア設計は難しくない
polidog
3
940
柔軟なアプリケーションをSymfonyで作るために考えている事
polidog
1
3k
Other Decks in Technology
See All in Technology
Covariance, Contravariance & Diamond
alexdaubois
1
120
AWS Step Functionsのタスク入出力に秩序を与えよう
haku__hime
0
140
太田博三(@usagisan2020)
otanet
0
160
さくっと実践!Postmanを活用した高品質で持続可能なAPI管理
yokawasa
5
370
今日から始める技術的負債の解消
leveragestech
3
460
KongによるAPIライフサイクル マネジメント
hashitokyo
1
160
LLMOps : ΔMLOps
shuntaito
13
2.5k
いまからでも遅くない!コンテナでWebアプリを動かしてみよう入門(2-2)WebAPIハンズオン
nomu
0
130
Azure AI servicesと歯のおはなし/AzureTravelers_Fukuoka2024_baba
nina01
1
110
なぜ Rack を理解すべきかプレトーク / Why should you understand Rack - Pre-talk
hogelog
0
250
0x5F3759DF
ykozw
0
370
WebRTC と AI の組み合わせ
tnoho
0
390
Featured
See All Featured
Visualization
eitanlees
143
15k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
31
1.7k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
What's new in Ruby 2.0
geeforr
342
31k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
KATA
mclloyd
29
13k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Teambox: Starting and Learning
jrom
132
8.7k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Transcript
GoͰwebΞϓϦ࡞ͬ ͍ͯΔ @polidog shizuoka.go #12
ࣗݾհ • @polidog • tavii.com Inc. • PHPer, Symfony Japan
User Group • Gotanda.goͷओ࠵ऀͰ͢
http://gotrip.jp
WordPress
GoͰ࡞Γ͢
ࠓ͢͜ͱ • GoΛ࠾༻ͨ͠ཧ༝ • Goݴޠͷֶͼํ • ͬͯΔϥΠϒϥϦʹ͍ͭͯ • ΜͰΔͷͱ͜Ζ
ͳͥGoΛ͓͏ͱࢥͬͨͷ ͔ʁ
GoΛ࠾༻ͨ͠ཧ༝ • ͦ͏(αʔόඅ͍҆ͨ͘͠) • Gotanda.goͷओ࠵ऀͳͷʹGo͕·ͱʹॻ͚ ͳ͍ • PHP͡Όͳ͍ύϥμΠϜΛֶͼ͍ͨ • GoϒʔϜ͋Δؾ͕͢Δ
http://tech.mercari.com/entry/2017/07/13/103000
None
Goݴޠͷֶͼํ
ֶͼํ • Tour of Go • ຊΛಡΉ • ͱʹ͔͘ҰͭԿ͔࡞ͬͯΈΔ
https://github.com/ polidog/go-itunes
None
GoͳਓPR͕Β͑Δ
https://github.com/polidog/go-itunes/pull/1
https://github.com/ polidog/go-nowplaying
None
webΞϓϦͷͨΊͷࢿྉΛಡΉ • GoݴޠʹΑΔWebΞϓϦέʔγϣϯ։ൃ • https://astaxie.gitbooks.io/build-web- application-with-golang/content/ja/
͍ͬͯΔϥΠϒϥϦʹ͍ͭ ͯ
ϑϨʔϜϫʔΫͷબ
ϑϨʔϜϫʔΫ • Revel • martini • goji • echo •
gin • chi
͍ͬͺ͍͋ΔͶ
None
None
None
chiΑͦ͞͏
chiͷಛ • ͍ܰ • ͍ • net/httpͷޓੑ͋Δ • ֎෦ͷύοέʔδʹґଘ͠ͳ͍
Regex url parameters
None
Database(ORM)
৭ʑύοέʔδ͋ΔΑͶ • gorm • gorp • dbr • xorm •
sqlx
http:// pospome.hatenablog.com/ entry/2017/02/18/172307
gorm͕ྑͦ͞͏
http://jinzhu.me/gorm/models.html#model- definition
http://jinzhu.me/gorm/associations.html
http://jinzhu.me/gorm/crud.html#preloading- eager-loading
https://github.com/jinzhu/ gorm/issues/246
Memcache
https://github.com/ bradfitz/gomemcache
ଞʹબࢶ͕ͳ͔ͬͨ
StructΛmecachedʹ อଘ͍ͨ͠
StructΛγϦΞϥΠζͯ͠ Ωϟογϡ͢Δ
http://twinbird- htn.hatenablog.com/entry/ 2017/01/01/181058
ύοέʔδཧ
ଞͷݴޠͩͱ • npm • gem • composer …etc
GoͰʁ
https://github.com/golang/ go/wiki/ PackageManagementTools
͍Ζ͍Ζ͋ΔͶ
ެ͔ࣜͩΒdep͓͏ʂ
dep init
ύοέʔδͷՃ
dep ensure -add ύοέʔδ ໊
ʊਓਓਓਓਓਓਓਓਓʊ ʼɹpre-alpha stateɹʻ ʉY^Y^Y^Y^Y^Y^Y^Yʉ
ΜͰ͍Δͱ͜Ζ
σΟϨΫτϦߏ
ΠϯελϯεͷҾ͖ճ͠
Contextͷ͍ํ
࠷ޙʹ
GoΛͬͱॻ͚ΔΑ͏ʹͳΓ ͍ͨ
Gotripྑ͍αʔϏεͳͷ Ͱɺྑ͍ίʔυͰαʔϏεΛ ͍ͤͨ͞
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·͠ ͨɻ