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
What's the fuss about Phoenix?
Search
Saša Jurić
October 31, 2016
Programming
2
1.1k
What's the fuss about Phoenix?
WebCamp Zagreb, 2016
Saša Jurić
October 31, 2016
Tweet
Share
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
170
Simplifying systems with Elixir - Belgrade
sasajuric
3
440
Simplifying systems with Elixir
sasajuric
2
570
Metagrokking Elixir
sasajuric
4
290
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
860
Elixir - valentine edition
sasajuric
0
130
Phoenix
sasajuric
1
220
Phoenix
sasajuric
0
120
Other Decks in Programming
See All in Programming
オープンソースコントリビュート入門
_katsuma
0
150
TSConfigからTypeScriptの世界を覗く
planck16
1
170
UMAPをざっくりと理解 / Overview of UMAP
kaityo256
PRO
3
1.6k
Storybookの情報をMCPサーバー化する
shota_tech
3
1.4k
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
2
580
flutter_kaigi_mini_4.pdf
nobu74658
0
160
Flutterでllama.cppをつかってローカルLLMを試してみた
sakuraidayo
0
160
note の Elasticsearch 更新系を支える技術
tchov
9
3.7k
クラシルリワードにおける iOSアプリ開発の取り組み
funzin
1
230
型安全なDrag and Dropの設計を考える
yudppp
4
270
Cloudflare Workersで進めるリモートMCP活用
syumai
12
1.7k
ComposeでのPicture in Picture
takathemax
0
150
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
430
Build your cross-platform service in a week with App Engine
jlugia
231
18k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
A designer walks into a library…
pauljervisheath
205
24k
GraphQLとの向き合い方2022年版
quramy
46
14k
It's Worth the Effort
3n
184
28k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
Code Reviewing Like a Champion
maltzj
523
40k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
33k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
105
19k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Transcript
What’s the fuss about Phoenix? @sasajuric aircloak.com
Phoenix web framework Elixir programming language Erlang VM written in
runs on
productivity simplicity maintainability interoperability fault-tolerance scalability
Erlang is a programming language used to build massively scalable
soft real-time systems with requirements on high availability. erlang.org
None
None
separate execution no shared memory separate garbage collection cooperation through
communication isolated crashes detectable crashes of other processes
run different "things" separately
scheduler scheduler scheduler scheduler CPU CPU CPU CPU Erlang VM
Node 1 Node 2 Node 3
None
None
DEMO
conn conn your code
conn conn plug
conn log conn handle authenticate authorize fetch session
endpoint conn conn router controller
endpoint conn conn router controller endpoint conn conn router controller
endpoint conn conn router controller
CODE
client server socket
client server
client server join "lobby" send "room:42", "message", payload send "room:42",
"message", payload socket send “lobby", "rooms", payload join "room:42"
socket client channel channel socket client channel channel
import Socket from "phoenix" socket = new Socket("/socket") socket.connect() room
= socket.channel("room:elixir", payload) room.join()
room.push("some_event", payload) room.on("some_event", (payload) => { // ... })
defmodule MyEndpoint do socket "/socket", MySocket # ... end
defmodule MySocket do use Phoenix.Socket transport :websocket, Phoenix.Transports.WebSocket transport :longpoll,
Phoenix.Transports.LongPoll channel "lobby", LobbyChannel channel "room:*", RoomChannel # ... end
defmodule RoomChannel do use Phoenix.Channel def join(topic, payload, socket) do
# ... end def handle_in(event, payload, socket) do # ... end def handle_info(erlang_message, socket) do # ... end end
push(socket, event, payload) broadcast(socket, event, payload) broadcast_from(socket, event, payload)
on_some_ui_event(() => channel.push("user_message", payload)) channel.on("user_message", (payload) => render(payload))
defmodule RoomChannel do # ... def handle_in(event, payload, socket) do
broadcast(socket, event, payload) # ... end # ... end
conference program chat
conference program chat ticket purchasing newsletters ratings raffles administration …
start simple go far
onboarding - getting started guides - Elixir - Phoenix -
elixirforum.com
40% off with code ctwwczg at manning.com https://joind.in/talk/60946