Re:Elixir RAM and the Template of Doom
by chrismccord on Tuesday April 26, 2016 @07:24PM
(#11576587)
Our view system has been like this from day one, so not growing pains, but it's possible our documentation wasn't as comprehensive early on.
> having templates that precompile to render functions is pretty magical, tbh. would personally love it if the view documentation reflected this on some level.
You mean like in our nicely formatted ExDocs? :) The docs walk you through similar examples as I've posted here, but go more in depth. https://hexdocs.pm/phoenix/Phoenix.View.html
bad choice of words, I meant more of us growing to understand the framework. and since you've had to answer these sorts of questions before I def feel a little less crazy: http://www.jeramysingleton.com/phoenix-templates-are-just-fu...
and thanks for keeping up work on the docs!
I seem to remember earlier documentation using a lot of render calls directly in the controller, and add to that the fact that view functions were available to both controller modules and templates without any explicit inclusions muddied the waters a bit. your explanation makes total sense though and the documentation is now clearer than I remember so chalk it up to growing pains? haha.
and having templates that precompile to render functions is pretty magical, tbh. would personally love it if the view documentation reflected this on some level.