3 Tiered Architecture

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Ross
    New Member
    • Jan 2007
    • 119

    3 Tiered Architecture

    I am trying to get a better understanding of the three tiered architecture and would like some help clarifying the interaction between classes and structure.

    The Presentation layer - is easy it is simply the front end (pages, winforms, etc...)

    The Business Logic Layer - This contains the domain objects i.e Car() which will hold all the properties of a particular car. One object will be created per car.
    But would you have functions in here to save, edit or delete the car?

    The Data Access Layer - This would presumably contain a class (i.e. SQLProcedureFac tory) that would have functions like ExecuteQuery(), ExecuteProcedur e() & ExecuteNonQuery .
    Would you also include in this layer a DA class for each business object i.e. DaCar which has functions like SaveCar(), EditCar, GetCarByID, etc...?
    Or would the business object use the SQLProcedureFac tory themselves?


    I would like know if a page wants to get a car by id what methods are called in which classes in what order? The same for if page wants to edit a car's data?

    Thanks for any help you can give me.
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    In theoretically terminology
    the data layer gets and sets data. so if the business layer is going to do that job for you, then you are mixing it up.
    the business layer will control which user can do what at which place.
    the business layer will check the data for consistency and any calculation before sending the data to the data layer to be saved.

    Comment

    • Bob Ross
      New Member
      • Jan 2007
      • 119

      #3
      Thanks, but... you haven't answered my questions at all. I know theoretically what it should do; I think the name gives it away.

      Lets say for an example you had a page called EditEmployee.as px. What classes would you build to allow you to edit an entry in the employees table and what would call what to both fetch and user the Employee table?

      Comment

      Working...