in reply to Re^3: Display logic is driven by business rules IMHO
in thread Display logic is driven by business rules IMHO

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.

  • Comment on tt splits your business logic between Perl and its 'presentation language'
  • Download Code

Replies are listed 'Best First'.
Re: tt splits your business logic between Perl and its 'presentation language'
by Corion (Patriarch) on Jan 08, 2009 at 14:43 UTC

    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.

Re: tt splits your business logic between Perl and its 'presentation language'
by metaperl (Curate) on Jan 08, 2009 at 14:49 UTC
    Wait a minute. I'm wrong ... per that article there is a separation between business logic and something they call 'product logic' --- which is what I assume includes 'display logic' ....

    I (naively) was thinking that business logic was anything that the business department would have a say in deciding how it came out in the product.

    My bad. Thanks for the convo jeffa.