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
180
Simplifying systems with Elixir - Belgrade
sasajuric
3
450
Simplifying systems with Elixir
sasajuric
2
570
Metagrokking Elixir
sasajuric
4
290
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
880
Elixir - valentine edition
sasajuric
0
130
Phoenix
sasajuric
1
230
Phoenix
sasajuric
0
120
Other Decks in Programming
See All in Programming
速いWebフレームワークを作る
yusukebe
5
1.7k
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.3k
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
250
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
430
ソフトウェアテスト徹底指南書の紹介
goyoki
1
150
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
240
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
320
私の後悔をAWS DMSで解決した話
hiramax
4
210
print("Hello, World")
eddie
2
530
アルテニア コンサル/ITエンジニア向け 採用ピッチ資料
altenir
0
100
今から始めるClaude Code入門〜AIコーディングエージェントの歴史と導入〜
nokomoro3
0
120
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
56
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
It's Worth the Effort
3n
187
28k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
The Language of Interfaces
destraynor
161
25k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
The Power of CSS Pseudo Elements
geoffreycrofte
77
6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
Site-Speed That Sticks
csswizardry
10
810
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