Hacker News new | ask | show | jobs
by mercer 2581 days ago
> 3. What Rails calls "views" should be though of as simple html templates with loops and simple if/else, but no complex logic.

I rather like how Phoenix makes a clear separation between views and templates. The templates have no logic, but the views can have quite a bit of it as long as it is directly linked to the templates (presentational).

1 comments

When I first looked at Phoenix ~18 months ago, I was a fairly fresh developer and couldn't figure out the separation of Views and Templates (coming from Rails).

I'm just now going through the Programming Phoenix 1.4 book and it's just been one 'aha' moment after the other, with the separation of logic and views being one of the most significant.