はじめに 携わるプロジェクトでElixir/Phoenixを開発している中で、リクエストパラメータのハンドリングがなかなかしっくり来ず、paramsというライブラリを導入したらだいぶ幸せになったので、その知見をお裾分けできればという思いで記事に起こしてみます。 Elixir/Phoenixでのリクエストの受け取り方の基本 既存のリクエストパラメータハンドリングのつらいところ paramsの紹介 と順を追って話していくので、paramsの使い方をすぐに知りたい方は、paramsの紹介からどうぞ!! ※何か認識間違っているところがあれば、バンバンご指摘頂けると嬉しいです!! Elixir/Phoenixでのリクエストの受け取り方の基本 Elixir/PhoenixでRequestパラメータを受け取る際、 Pathパラメータ Queryパラメータ Bodyパラメータ といったパラメータはすべてC
Update 20170906: This article was written for Phoenix 1.2. Is not going to work with 1.3 without some minimal changes, but the ideas should work just the same if you still want to try it. I'll try to set apart some time to update it to Phoenix 1.3, but no promises. Sorry for the inconvenience and confusion. This is a minimal working Phoenix app that shows how to stream videos using the Phoenix Fra
The Road to 2 Million Websocket Connections in Phoenix Posted on November 3rd, 2015 by Gary Rennie If you have been paying attention on Twitter recently, you have likely seen some increasing numbers regarding the number of simultaneous connections the Phoenix web framework can handle. This post documents some of the techniques used to perform the benchmarks. How It Started A couple of weeks ago I
elixir Building and Playing the Go Game with Phoenix LiveView Welcome back to another Elixir Alchemy! This time, we'll discover the power of Phoenix LiveView by building an interactive game. By rendering HTML on the server and communicating between the frontend and backend over web sockets, LiveView helps us build real-time interfaces without writing JavaScript or worrying about updating the state
Phoenix LiveView – Change the URL without refreshing the page It’s now possible to try the pushState support available in Phoenix LiveView (which, remember, is still in beta) Add live_link and live_redirect for push state support What is pushState and why can be useful? With Phoenix LiveView we can easily update parts of the page without having to change the location, refreshing the page or direct
fukuoka.exのpiacereです ご覧いただいて、ありがとうございます ElixirのDBラッパー「Ecto」は、かなり便利で、SQLチックなDSLでDB操作できたり、RailsのActiveRecordと似たようなテーブル操作とマイグレーションができます そんなEctoですが、実際のPJでは、往々にして、別システムで作られたDBにアクセスしたり、移行する要件があり、どこまで相互運用できるのか気になるところですよね? ということで、Ectoでマイグレート外の既存テーブルをいじってみたいと思います 内容が、面白かったり、役に立ったら、「いいね」よろしくお願いします 本コラムの検証環境、事前構築のコマンド 本コラムは、以下環境で検証しています(Windowsで実施していますが、Linuxやmacでも動作する想定です) Windows 10 Elixir 1.8.1、 ※最新版
Phoenix framework (Elixir) with Redis, at Scale. tokyo.ex#9 #tokyoex
まぜるな危険? 白状します。かなり前に帯につられて「プログラミングElixir」という本を買ったです。が、いろいろあって放置してました。時は過ぎて、最近PhoenixのLiveViewが私のツイッタラー界隈で盛り上がっているので面白そうだなと思いElixirの勉強がてら遊んでました。JavaScriptってJavaと何が違うのレベルですけど私 :-) で、JavaScriptといえばWeb Bluetoothがあったなーと思い、Bluetoothは少しだけ分かりますので、つい混ぜてしまいました。一応動いたのでここにメモしますのです。 概要 Web Bluetoothを使ってBLE(Bluetooth Low Energy)の心拍計データをJavaScriptで集めます。 そのデータをPhoenix LiveViewを使ってサーバに送り込むです。 サーバ側のElixirでそれを受けて、値を元
訳者から読者への注 すでにこの記事の内容は古くなっています。この注を書いている時点で LiveView のバージョンは 0.14.7 です。この記事が書かれたときは出たばかりのバージョン 0.0.x でしたので、当時に比較して内容が相当変わっています。あえてこの記事を読む場合は、歴史的な参考書として読んでください。 原文について この記事は Dennis Beatty さんの書いた How to Create a Counter with Phoenix LiveView (Mar 19, 2019) を御本人の許可を得て日本語に翻訳した文書です。 大変簡潔なチュートリアルで、データベースも使ってませんので普段 RDB をお使いでない方でも簡単に LiveView を試せます。この文書だけでもお試しはできますが ご本人が実際にやって見せてる動画 もあるので、疑問に思ったらこれを観ながらやる
私 Rails を 10 年以上使い続けています。 Elixir 勉強中です。プロセスかわいいよ、プロセス。 MacOS sierra 10.12.6 です。 インストール ここに沿う感じで。 $ brew upgrade elixir $ elixir --version Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] Elixir 1.5.1 $ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez $ mix phoenix.new -v Phoenix v1.3.0 $ mi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く