Re: Application logic and Business logic

From: H. S. Lahman (h.lahman_at_verizon.net)
Date: 02/25/05

  • Next message: frebe: "Re: OO programming - illumination?"
    Date: Fri, 25 Feb 2005 19:05:15 GMT
    
    

    Responding to Singh...

    > I just read something in EJB design pattern book which baffled me. While
    > describing the "Data Transfer Object" pattern, the author said that
    > application logic and business logic should be kept separate from each other
    > i,e should be decoupled. I was wondering if anybody can make out what he
    > means. Whats the difference between application logic and business logic?

    I can't speak for the EJB context, but to me business logic refers to
    rules and policies of the problem domain that are abstracted for the
    subject matter solution. Thus for accounting software the rules of
    double entry bookkeeping and standard accounting practices would be
    abstracted in the business logic.

    In contrast, application logic would be the rules and policies that
    represent various aspects of the computing space. They are dictated by
    things like the technologies used or computational models. Thus an
    event queue implements the rules and policies of asynchronous message
    passing in a distributed context and an RDB represents a particular
    suite of rules and policies for persistence. IOW, application logic
    refers to the way the business solution is implemented in a particular
    computing environment.

    Another way to think about this is in terms of functional vs.
    nonfunctional requirements. The functional requirements describe What
    the software should do and they are defined in terms of the business
    domain's rules and policies. Nonfunctional requirements relate to How
    the software executes (performance, size, security, etc.). Typically
    application logic exists to resolve nonfunctional requirements within
    the context of a particular computing environment.

    Obviously the functional vs. nonfunctional views cannot be completely
    separated in detail. However, one can go a long way towards separation
    with modern techniques for modularization. For example, that's why RAD
    environments tend to employ a layered model where persistence and
    display are isolated in layers and exotic interface infrastructures are
    used to decouple them across layer boundaries.

    [One can also make a <very tenuous> analogy to OOA/D. In an OOA model
    one only has objects abstracted from the business space and they only
    encapsulate business rules and policies. However, in an OOD model one
    adds a bunch of other objects (e.g., caches, queues, collections
    classes, etc.) that address particular nonfunctional requirements and
    implementation technologies. Since objects encapsulate behaviors and
    have decoupling interfaces, the separation of OOA and OOD objects can be
    viewed as separating business and application logic.]

    *************
    There is nothing wrong with me that could
    not be cured by a capful of Drano.

    H. S. Lahman
    hsl@pathfindermda.com
    Pathfinder Solutions -- Put MDA to Work
    http://www.pathfindermda.com
    blog (under constr): http://pathfinderpeople.blogs.com/hslahman
    (888)-OOA-PATH


  • Next message: frebe: "Re: OO programming - illumination?"

    Relevant Pages

    • Re: [OT] Is OO incompatible with the three tier architecture
      ... Another widely touted programming technique is object oriented ... > tendency would be to let business logic creep into the data access code. ... get into your data layer, but, IMO more importantly, into your presentation ... mean that it's impossible to achieve the separation. ...
      (comp.lang.php)
    • Re: Data driven people arguments
      ... The RDM provides a /generic/ way to store and access data that is independent of particular problem contexts (i.e., particular business rules). ... capture business rules and policies. ...
      (comp.object)
    • RE: How to design Security Policies
      ... There are many sites that have such policies, ... with classification & labeling suitable for your business sector. ... A good reference book to have for outlining roles and responsibilities ... We are in process of designing the security policies for entire ...
      (Security-Basics)
    • Re: Credit Card required photo ID as post office - thrown out by cops
      ... Policies are policies. ... business that violates another business's policies is that the violated ... The USPS went for YEARS without accepting credit cards. ... and the electronic screens that laughably ask for a "signature" ...
      (misc.consumers)
    • Re: Sheer brilliance...
      ... business. ... create its policies. ... your implication unless you mean to highlight how LA has been severely ...
      (rec.music.makers.guitar.acoustic)