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
400
Goでwebアプリ作っている話
shizuoka.go #12の資料です
polidog
August 26, 2017
Tweet
Share
More Decks by polidog
See All by polidog
小さな開発会社が受託開発に力を入れる理由
polidog
0
64
小さな開発会社を作った理由
polidog
1
2.8k
小さな開発会社がWebサービスを作る理由
polidog
1
650
トランザクションスクリプトは何がダメなのか?
polidog
2
3.5k
React初心者がHooksを理解するためにコードを読んでみた
polidog
0
530
object-mapperを作ってる話
polidog
0
340
2020年から始めるSymfonyフレームワーク
polidog
2
1.3k
はじめてのモダンPHP
polidog
0
640
ソフトウェア設計は難しくない
polidog
3
990
Other Decks in Technology
See All in Technology
AWS テクニカルサポートとエンドカスタマーの中間地点から見えるより良いサポートの活用方法
kazzpapa3
2
540
SalesforceArchitectGroupOsaka#20_CNX'25_Report
atomica7sei
0
170
Witchcraft for Memory
pocke
1
310
Yamla: Rustでつくるリアルタイム性を追求した機械学習基盤 / Yamla: A Rust-Based Machine Learning Platform Pursuing Real-Time Capabilities
lycorptech_jp
PRO
3
120
Postman AI エージェントビルダー最新情報
nagix
0
110
OpenHands🤲にContributeしてみた
kotauchisunsun
1
430
CI/CD/IaC 久々に0から環境を作ったらこうなりました
kaz29
1
170
変化する開発、進化する体系時代に適応するソフトウェアエンジニアの知識と考え方(JaSST'25 Kansai)
mizunori
1
210
Uniadex__公開版_20250617-AIxIoTビジネス共創ラボ_ツナガルチカラ_.pdf
iotcomjpadmin
0
160
BigQuery Remote FunctionでLooker Studioをインタラクティブ化
cuebic9bic
3
280
なぜ私はいま、ここにいるのか? #もがく中堅デザイナー #プロダクトデザイナー
bengo4com
0
410
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
26k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Gamification - CAS2011
davidbonilla
81
5.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Building Adaptive Systems
keathley
43
2.6k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
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ྑ͍αʔϏεͳͷ Ͱɺྑ͍ίʔυͰαʔϏεΛ ͍ͤͨ͞
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·͠ ͨɻ