Well, I would say that the view code and the model are generally
separate. Here is a random example:
template:
<span>{{explicit_timestamp}}</span>
backing view code:
class View {
Status status;
View(Status status) {
this.status = status;
}
String explicit_timestamp() {
return new SimpleDateFormat("hh:mm aa MMM dd").format(new
Date(status.createdAt()))
}
}
model:
class Status {
long createdAt();
}
There is no reason for the model to know how the view might want to
format it, just as there is no reason for the template to assume a
formatting either. So, when it comes time to internationalize this or
port it to another language, the only code that needs to change / be
written is in the backing view code.
Sam
On Mon, Jul 23, 2012 at 2:51 PM, Marc Schipperheyn