in reply to Display logic is driven by business rules IMHO

Since you were quoting me, I will bite.

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. In the broad sense, yes, display logic is a part of business logic. But so is where you park and what entrance the employees are allowed to use.

In the context written, the distinction is made because it separates concerns. If Joe needs to fiddle a frobnotz and have the results displayed as a table, but Jane needs to fiddle the same frobnotz and have it displayed as a graph, why should the anything but the display side of things care. The frobnotz needs to be fiddled the same way. I would have my CGI connecting script (mod_perl handler, etc) fiddle the frobnotz and hand the results off to the right display module.

I better get back to work now, before my $workplace blocks access due to use of euphemisms.

--MidLifeXis

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

Replies are listed 'Best First'.
Re^2: Display logic is driven by business rules IMHO
by metaperl (Curate) on Jan 07, 2009 at 18:01 UTC
    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.

      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.