3 ms·
Whether to show a logout link or a login form is presentation logic, not business logic. I've spent decades telling people that trying to keep logic out of tem
by brlewis 10y ago
Whether to show a logout link or a login form is presentation logic, not business logic.
I've spent decades telling people that trying to keep logic out of templates is a waste of time. A useful templating language has variables, conditionals, and even functions. There's no reason not to use a real programming language.
There's no good automated way to enforce MVC. How is an automated tool going to know whether "show this number to two decimal places" is a model thing (inherent precision of the data) or a view thing (presentation choice)?
- talmand 10y ago>> Whether to show a logout link or a login form is presentation logic, not business logic. I would prefer keeping presentation logic, or any logic for that matter, out of the HTML.