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
390
Goでwebアプリ作っている話
shizuoka.go #12の資料です
polidog
August 26, 2017
Tweet
Share
More Decks by polidog
See All by polidog
小さな開発会社を作った理由
polidog
1
2.5k
小さな開発会社がWebサービスを作る理由
polidog
1
560
トランザクションスクリプトは何がダメなのか?
polidog
2
3.1k
React初心者がHooksを理解するためにコードを読んでみた
polidog
0
500
object-mapperを作ってる話
polidog
0
300
2020年から始めるSymfonyフレームワーク
polidog
2
1.2k
はじめてのモダンPHP
polidog
0
580
ソフトウェア設計は難しくない
polidog
3
960
柔軟なアプリケーションをSymfonyで作るために考えている事
polidog
1
3k
Other Decks in Technology
See All in Technology
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
860
Azureの開発で辛いところ
re3turn
0
240
Amazon Route 53, 待ちに待った TLSAレコードのサポート開始
kenichinakamura
0
170
今年一年で頑張ること / What I will do my best this year
pauli
1
220
Accessibility Inspectorを活用した アプリのアクセシビリティ向上方法
hinakko
0
180
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
250
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
180
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
350
Kotlin Multiplatformのポテンシャル
recruitengineers
PRO
2
150
AWS re:Invent 2024 recap in 20min / JAWSUG 千葉 2025.1.14
shimy
1
100
GoogleのAIエージェント論 Authors: Julia Wiesinger, Patrick Marlow and Vladimir Vuskovic
customercloud
PRO
0
160
JuliaTokaiとJuliaLangJaの紹介 for NGK2025S
antimon2
1
120
Featured
See All Featured
Producing Creativity
orderedlist
PRO
343
39k
Docker and Python
trallard
43
3.2k
The Cult of Friendly URLs
andyhume
78
6.1k
How GitHub (no longer) Works
holman
312
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
19
2.3k
Designing Experiences People Love
moore
139
23k
Bash Introduction
62gerente
610
210k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
How STYLIGHT went responsive
nonsquared
96
5.3k
Unsuck your backbone
ammeep
669
57k
What's in a price? How to price your products and services
michaelherold
244
12k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
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ྑ͍αʔϏεͳͷ Ͱɺྑ͍ίʔυͰαʔϏεΛ ͍ͤͨ͞
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·͠ ͨɻ