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

In the context it was written, business logic is the rules that govern how the data items are processed, display logic is how the user sees them.
I see an area of application display that is not covered. What about conditional display? That is not _how_ the user seems them. It is what the user sees and a business rule made the choice.
In the context written, the distinction is made because it separates concerns.
I'm with you, but I would say it clarifies concerns. It makes it clear what sort of business logic is being executed, in this case the business rules guiding display.

I'm asserting that display logic ISA business LOGIC while you seem to be saying that business logic DISPATCHES-TO display logic.

  • Comment on Re^2: Display logic is driven by business rules IMHO

Replies are listed 'Best First'.
Re^3: Display logic is driven by business rules IMHO
by jeffa (Bishop) on Jan 07, 2009 at 20:05 UTC

    I would say that display logic is a FILTER of what the business logic returns.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
      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.

        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.

        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.