Re: Separate DAC from BO logic? What about physical assembly?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Andrew Faust (afaust_at_aradymeDOTcom)
Date: 07/14/04

  • Next message: Andrew Faust: "Re: Tutorial for Linux, Mono and ASP.Net"
    Date: Wed, 14 Jul 2004 14:21:34 -0600
    
    

    "Mike Hennessy" <mhennessy@brassring.com> wrote in message
    news:uVLVfrZaEHA.3508@TK2MSFTNGP09.phx.gbl...
    > I'm looking for people's opinions and feedback regarding the
    design of the
    > application tier, and how to best logically separate out the
    Data Access
    > from the Business Object's. Per the Microsoft prescriptive
    architecture
    > documents, they recommend creating a completely separate
    logical Data Access
    > Tier of components. Then creating a separate tier of Business
    Objects that
    > consume them.
    >
    > My first question is...what does this actually buy you in the
    real world?

    It allows you to easily change from one database to another,
    without having to rewrite a lot of your business code. For
    example, you may have an application that you want to deploy to a
    small company who just wants to use MySQL as a DB, but then you
    may need to use this same app in a large enterprise that is
    standardized on Oracle. By seperating out the data access
    components, you merely switch which set they are using and
    nothing else.

    > Ok, if you need to in the future totally re-write your Data
    access to a new
    > Database server like Oracle or DB2, I can see separating out
    the code.
    > However, in the scenario where you know you will be writing to
    a single DB
    > server...what else does this approach buy you?

    What happens when the Business Logic changes due to new laws or
    requirements? When you have the data access intermingled all
    throughout your business objects making changes to the business
    logic may screw up your data access code.

    >You'll be running the BO and
    > DAC on the same physical server anyway. Also, adding that new
    tier
    > inherently add's to the complexity of your solution...you now
    pretty much
    > double the amount of classes, with each BO having a
    corresponding DAC
    > component. Is there other pros to this approach? As opposed to
    having a
    > single BO that contains your DAC methods directly?

    Basically, if you are going to be able to write this app once,
    and then never look at it again then it doesn't really matter.
    However, in the real world this rarely ever happens. We find that
    there are bugs, or new features required, etc.. By modularizing
    your application as much as is logically possible, you can make
    changes or fixes in one piece of code, and minimize the negative
    impact it will have on other components.

    Andrew Faust


  • Next message: Andrew Faust: "Re: Tutorial for Linux, Mono and ASP.Net"

    Relevant Pages

    • Re: Philosophical question about separating tiers
      ... If you have a business object layer, ... and you connect to objects on another server, ... I understand that by having the business tier separate from the user tier, ...
      (microsoft.public.dotnet.languages.csharp)
    • Separate DAC from BO logic? What about physical assembly?
      ... they recommend creating a completely separate logical Data Access ... Tier of components. ... DAC on the same physical server anyway. ...
      (microsoft.public.dotnet.general)
    • Re: Philosophical question about separating tiers
      ... Business objects (there's a second edition which targets .net 2.0, ... I understand that by having the business tier separate from the user tier, ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Decouple SQL queries from class in OOP design
      ... >>> It should be separate from the business rules. ... We need to separate them. ... > This mapping allows us to express the situation as two ordered pairs. ...
      (comp.object)
    • Re: Multi Tier applications
      ... Data is stored in a database or the file system. ... Business rules and business logic ... interface, which is somewhat different, but is still an interface that is ... must tell the Data Tier what it needs to do. ...
      (microsoft.public.dotnet.framework)