I would say that display logic is a FILTER of what the business logic returns.
Well, it's not what you can _say_, it's what you can _substantiate_ :)
Take a look at this tt:
<h3>Projects</h3>
<ul>
[% FOREACH project IN worklist(me.id) %]
<li> <a href="[% project.url %]">[% project.name %]</a>
[% END %]
</ul>
It is pseudo-English for the business requirement: "For each project in the worklist provide a URL linking to the project name"
That is a business rule, plain and simple, and it has crept it's way out of Perl and into a quote-unquote presentation language.
| [reply] [d/l] |
Well, but you don't have to output all projects on one page. And I consider providing an URL not a "business rule". Business rules don't have much to do with presentation. A business rule says, that (for example), the sum of all debits over all accounts must equal the sum of all credits over all accounts, or that a payment has to be received within (say) 20 days after the invoice has been sent, and that no payments are to be executed on a Sunday, and how to shift/adjust such payments then.
Not all "business requirements" are "business rules".
And in writing, there is no need to use the (non-)word "quote unquote". There are special characters, like '"' and "'", which are commonly used there to convey the identical meaning.
| [reply] |
| [reply] |