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
Construindo um Servidor Web com GO
Search
Beto Muniz
May 03, 2014
Programming
0
310
Construindo um Servidor Web com GO
Palestras que demonstra como é simples construir um servidor web com GoLang.
Beto Muniz
May 03, 2014
Tweet
Share
More Decks by Beto Muniz
See All by Beto Muniz
Inteligência Artificial no Desenvolvimento Web O paradigma está evoluindo. E você também deve.
obetomuniz
0
33
Projetando Aplicações Front-End Modernas
obetomuniz
0
15
Impactando sua carreira contribuindo para comunidade Open Source
obetomuniz
1
45
Engenharia de Software para Crianças
obetomuniz
1
370
Blockchain com JavaScript
obetomuniz
0
300
"Comunidade não dá dinheiro"
obetomuniz
1
210
Web Underground
obetomuniz
1
290
Progressive Web Apps in Depth
obetomuniz
1
300
Remote Work! Less Stress, More Productivity.
obetomuniz
6
610
Other Decks in Programming
See All in Programming
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
830
文字コードの話
qnighy
44
17k
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
720
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.7k
How to stabilize UI tests using XCTest
akkeylab
0
110
CSC307 Lecture 13
javiergs
PRO
0
320
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
230
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
230
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
130
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
680
SourceGeneratorのマーカー属性問題について
htkym
0
180
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
Featured
See All Featured
We Are The Robots
honzajavorek
0
190
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
The Invisible Side of Design
smashingmag
302
51k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.4k
Exploring anti-patterns in Rails
aemeredith
2
290
The Pragmatic Product Professional
lauravandoore
37
7.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
130
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
100
Transcript
CONSTRUINDO UM SERVIDOR WEB COM GO And there we GO…
Sou Beto Muniz Tenho 21 anos e sou um mineiro-capixaba.
E trabalho na Tagon8 Inc.
[email protected]
WWW.BETOMUNIZ.COM GITHUB.COM/OBETOMUNIZ FB.COM/OBETOMUNIZ
Mas porque usar Go Lang para um Servidor Web?
Fácil Aprendizado
Ótima para Single Page Applications
goroutines goroutine é tipo de função capaz de ser executada
simultaneamente com outras funções, ou seja, de forma assíncrona.
Fácil implementação de Concorrência
Ótimas biblioteca nativa de componentes
Incrível Biblioteca HTTP
Desenvolvimento baseado em componentes* (*semelhante aos módulos de NodeJS)
Desenvolvimento baseado em componentes semelhante aos módulos de NodeJS e
não grandes frameworks “engessados”
Mantido pela Google O que de certa forma garante bastante
qualidade, visibilidade e ótimos contribuintes para o projeto
Performance comparada a NodeJS e por vezes saindo melhor que
NodeJS.
NodeJS vs. Go : HttpRequests
NodeJS vs. Go : Simulação de Gargalo com Redis
OK! …mas só vi blahblahblah…E o código? ! ! @,@
…Um exemplo de uma aplicação web
Estrutura mínima de pastas para criação do nosso servidor
Iniciando nosso arquivo todos.go
Importando pacotes necessários para rodar um servidor web com view
engine HTML
Declarando a função que servirá de construtora e que também
será onde todas as configuração de rotas, porta, arquivos estáticos da aplicação estarão.
Bônus: Stub da API que nossa applicação irá consumir
Todo List App
Demo Time
E é isso… Dúvidas? Algo a acrescentar na talk? !
IT’S TIME!
FIM Obrigado pela presença de todos.
Referências http://www.golangbr.org/doc/ http://go-tour-br.appspot.com/#1 http://goporexemplo.pistach.es/ http://www.golangbr.org/ http://www.polydaic.com/blog/go-vs-node-js http://golang.org/doc/articles/wiki/