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
Phoenix Framework
Search
Pedro Assumpcao
January 30, 2015
Programming
0
160
Phoenix Framework
Overall view of Phoenix Framework.
Pedro Assumpcao
January 30, 2015
Tweet
Share
More Decks by Pedro Assumpcao
See All by Pedro Assumpcao
Custom Data Types in Ecto
pedroassumpcao
0
440
Other Decks in Programming
See All in Programming
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
170
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
4
970
CSC305 Lecture 12
javiergs
PRO
0
240
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
Introduce Hono CLI
yusukebe
6
3.2k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
570
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
47k
Blazing Fast UI Development with Compose Hot Reload (Bangladesh KUG, October 2025)
zsmb
2
400
業務でAIを使いたい話
hnw
0
140
Google Opalで使える37のライブラリ
mickey_kubo
3
160
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
RailsConf 2023
tenderlove
30
1.3k
We Have a Design System, Now What?
morganepeng
53
7.8k
Bash Introduction
62gerente
615
210k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Embracing the Ebb and Flow
colly
88
4.9k
Product Roadmaps are Hard
iamctodd
PRO
55
11k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Transcript
A HIGHLY CONNECTED WEB FRAMEWORK Pedro Assumpcao Raise Conf •
01/30/2015
• DEVELOPED WITH ELIXIR BY CHRIS MCCORD; • TOP LAYER
OF A MULTI-LAYER: • PHOENIX; • PLUG (MIDDLEWARE); • COWBOY (HTTP SERVER). OVERVIEW
• ROBUST ROUTING; • WEBSOCKET AND PUB/SUB LAYER; • PLUG-BASED
ROUTES AND CONTROLLERS; • PRECOMPILED VIEW LAYER. FEATURES
• DISTRIBUTED WEB SERVICES FRAMEWORK; • SIMPLIFY THE USE OF
WEBSOCKETS, REAL TIME EVENTS AND SOA; • NO PRODUCTIVITY SACRIFICES FOR PERFORMANCE; • NO PERFORMANCES SACRIFICES FOR PRODUCTIVITY. GOALS
• CLONE PHOENIX GIT REPO; • FETCH DEPENDENCIES; • COMPILE.
SETTING UP
• AFTER PHOENIX IS SET UP, A MIX TASK IS
AVAILABLE TO CREATE APPS; • FETCH DEPENDENCIES; • COMPILE; • START SERVER. CREATING A NEW APP
• ROUTES; • CONTROLLERS; • VIEWS; • TEMPLATES; • CHANNELS.
LET'S SEE WHAT WE GOT
ROUTES
get “/pages/:slug”, PageController, :show # GET /pages/about # [“pages”, “about”]
def match(conn, “GET”, [“pages”, slug]) do Controller.peform_action(conn, PageController, :show, slug: slug) end get “/files/*path”, FileController, :show # GET /files/Users/pedro/Documents # [“files”, “Users”, “pedro”, “Documents"] def match(conn, “GET”, [“files” | path]) do Controller.peform_action(conn, FileController, :show, path: path) end ROUTES
CONTROLLERS
• VIEWS SERVER AS A PRESENTATION LAYER; • VIEWS RENDER
TEMPLATES; • TEMPLATES ARE PRECOMPILED INTO VIEWS; • EEX AND HAML ENGINE SUPPORT; VIEWS AND TEMPLATES
VIEWS # web/views/page_view.ex defmodule HelloPhoenix.PageView do use HelloPhoenix.View ! def
message do "Hello from the view!" end end
# web/templates/layout/application.html.eex <html> ... <body> <%= @inner %> </body> </html>
! # web/templates/page/show.html.eex <p>This is the message: <%= message %></p> TEMPLATES
• DEFINED IN THE ROUTER; • WEBSOCKET/PUBSUB ABSTRACTION; • PHOENIX.JS
AS BROWSER CLIENT. CHANNELS
Elixir: www.elixir-lang.org Phoenix: www.phoenixframework.org RESOURCES
THANKS!