Hacker News new | ask | show | jobs
by hippich 4190 days ago
this is idea behind handlebars templating - ideally, no logic whatsoever and you just supply object with data to render. But in reality it gets more complicated than that and sometimes you need to debug templates too. Unfortunately, debugging angular templates is pretty much hell (mostly because of all the "magic").
1 comments

The way Square's library Mortar handles it in Android is that you essentially have a Model-View Model-View-Presenter sort of situation, where your View Model is JUST your data, your View is JUST the view logic, and the Presenter takes care of knowing how to inflate/deflate the view. It's pretty clean if your design is clean but can get hairy easily if it isn't; that's a feature not a bug for me.