News for hackers. Stuff that matters.
Re:How we got to LiveView by erinan on Wednesday September 22, 2021 @06:00PM (#28622512)
This has most likely to do with the codebase itself rather than with Elixir or Phoenix in your case.

And having to go through a few files to understand how a request is handled is not out of the ordinary in an app, especially if it's grown over the years?

Re:How we got to LiveView by dnautics on Wednesday September 22, 2021 @11:21PM (#28624908)
Tbh Phoenix has a lot of boilerplate and some... Opinions that make the codepath slightly more complicated (often for good reason... that might not apply to all use cases) in the default project.

For example:. What exactly is the distinction between an endpoint and a router?

Re:How we got to LiveView by 0x000000001 on Thursday September 23, 2021 @07:27AM (#28627738)
Endpoint == instance of phoenix webserver. Changing things in the endpoint gives you WAF-like control and you can do some early footwork here and store useful data in conn[:private] for you to use later in the modules called in your router

You can have multiple routers. I just built a thing where foo.com uses one router for the main site and *.foo.com is something else.

Re:How we got to LiveView by dnautics on Thursday September 23, 2021 @09:26AM (#28628774)
Point is, they are just plugs. You can put routes in an endpoint, it'll work just fine. The distinction is just a -often useful- prescriptive opinion by Phoenix. (Plug does not split between endpoints and routers)
Re:How we got to LiveView by 0x000000001 on Thursday September 23, 2021 @10:56AM (#28630070)
very true, but the abstraction is pretty useful
Re:How we got to LiveView by dnautics on Thursday September 23, 2021 @12:13PM (#28631201)
it's useful if your project gets very large. It is a non-negligible cognitive cost when your project is very small and you are new to Elixir and Phoenix