Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Phoenix Framework
Search
Pedro Assumpcao
January 30, 2015
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Phoenix Framework
Overall view of Phoenix Framework.
Pedro Assumpcao
January 30, 2015
Transcript
16 slides
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!
More Decks by Pedro Assumpcao
See All by Pedro Assumpcao
Custom Data Types in Ecto
pedroassumpcao
0
480
Other Decks in Programming
See All in Programming
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
250
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
120
LLM 101
dalinaum
0
480
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
320
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
370
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
260
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
230
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
170
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
340
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
280
Event is what happens
moro
2
4.5k
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
530
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
800
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
690
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Bash Introduction
62gerente
615
220k
Git: the NoSQL Database
bkeepers
PRO
433
67k
The Pragmatic Product Professional
lauravandoore
37
7.5k
The SEO Collaboration Effect
kristinabergwall1
1
620
Optimizing for Happiness
mojombo
378
71k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
750