Save 37% off PRO during our Black Friday Sale! »

Introduction to Plug

D4715d085532a801bb2040ce5d9d55ec?s=47 junsumida
August 31, 2016

Introduction to Plug

Elixir Plug入門: tokyo.ex #5 LT

[[References]]

[Programming Phoenix]
https://www.amazon.co.jp/dp/B01KFCXP04

[phoenixframeworkの足回り]
https://speakerdeck.com/hidetakakojo/tokyo-dot-ex-number-1-phoenixframeworkfalsezu-hui-ri

D4715d085532a801bb2040ce5d9d55ec?s=128

junsumida

August 31, 2016
Tweet

Transcript

  1. 1 JUN SUMIDA INTRODUCTION TO PLUG Tokyo.ex #5 2016/08/31

  2. 2 Introduction @junsumida Jun Sumida XFLAG™ STUDIO mixi, inc. developing

    internal platform servers in Elixir
  3. Plugͬͯͳʹ? 3 What is Plug?

  4. 4 What is Plug? Elixirʹ͓͚Δ RubyͰ͍͏Rackͱ͔
 PerlͰ͍͏PSGIͱ͔ PythonͰ͍͏WSGIతͳ΋ͷ

  5. 7 What is Plug? defmodule MyPlug do import Plug.Conn def

    init(options) do # initialize options options end def call(conn, _opts) do conn |> put_resp_content_type("text/plain") |> send_resp(200, "Hello world") end end
  6. 5 What is Plug? request/connection Cowboy Plug Phoenix Plug Cowboy

    Phoenixʹ͓͚ΔॲཧͷྲྀΕ
  7. Plugͷಛ௃ 6 • (Rackతͳ)webαʔόʔؒͷΞμϓλʔ • Cowboyʹ͔͠ରԠͯ͠ͳ͍ (2016/8ݱࡏ) • Req/Resp͡Όͳͯ͘ɺconnectionΛ࣋ͭ •

    connection͸immutable What is Plug?
  8. PlugͬͯԿ͕Ͱ͖Δͷ 6 • CSRF Protection, ΤϥʔϋϯυϦϯάɺ҉߸ Խɺηογϣϯ؅ཧ, ੩తϑΝΠϧ഑৴ • ͪͳΈʹɺPhoenixͷEndpoint,

    Router, Controller͸plugͰͰ͖͍ͯ·͢ What is Plug? => ͍Ζ͍ΖͰ͖·͢
  9. 5 What is Plug? request/connection Cowboy Plug ࣮࣭ Plug Plug

    Cowboy Phoenixʹ͓͚ΔॲཧͷྲྀΕ
  10. 8 What is Plug? ΋ͬͱPhoenixͷPlugʹ͍ͭͯ ৄ͘͠஌Γ͍ͨํ͸….

  11. 10 What is Plug? tokyo.ex #1 - phoenixframeworkͷ଍ճΓ https://speakerdeck.com/hidetakakojo/tokyo- dot-ex-number-1-phoenixframeworkfalsezu-

    hui-ri
  12. References 11 • https://github.com/vikram7/plug-example • https://github.com/elixir-lang/plug • https://speakerdeck.com/hidetakakojo/tokyo- dot-ex-number-1-phoenixframeworkfalsezu- hui-ri

    • Programming Phoenix - Chris McCord What is Plug?
  13. 12 THANK YOU FOR LISTENING

  14. 13 AND

  15. 14 WE ARE HIRING!