Lets learn the Phoenix Router: a comprehensive reference
Автор: Andrew Stewart
Загружено: 2024-02-12
Просмотров: 4674
Welcome to my deep dive on the router of the Phoenix web framework. This is kind of a read-through together of the documentation. The docs for the Phoenix project are always fantastic, and if you really want to understand the router its the best place to start. I go through pretty much every major concept here, from the macros for basic routing of http verbs to LiveView stuff, to how everything fits together and flows through cowboy/bandit, to the endpoint, the plugs, through to the router, etc.
The router is actually kind of complicated. It's one of the few parts of Phoenix that is extremely dense with macros. So I think I can help you learn it a little bit easier.
Chapters:
00:00 Intro
02:34 Example Project
03:19 The Web Module
03:48 Macros in the Router System
05:16 Inspecting the Phoenix Router
06:06 Helpers and Verified Routes
07:44 Router HTTP Verbs
09:19 Plug
12:27 Pipelines and Scopes
13:39 Authorization and Plugs
15:35 Scopes again
17:33 The Endpoint
18:14 Cowboy and Phoenix
19:29 Back to the Endpoint
21:14 Changing Plugs and Routes in Development only
23:05 Unplug and Dynamic Shenanigans
25:09 LiveView page lifecycle
27:40 Live Navigation
30:54 Live Actions
32:27 live_session
33:57 Authorization in LiveView
37:01 Live Layouts
38:17 live_render (don't use it)
40:04 Writing our own auth code
42:55 Wrapping up
As always please subscribe for more Elixir, Phoenix, LiveView, Typescript, Neovim, and more assorted programming content. And follow me on Twitter at: / src_rip
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: