Results 1 to 4 of 4

Thread: Inheritance, from DAL to BLL, is it fine?

  1. #1

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Arrow Inheritance, from DAL to BLL, is it fine?

    Is it fine for a class in BLL to inherit a class from DAL, wouldn't I be violating some rules or something?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Inheritance, from DAL to BLL, is it fine?

    Business Logic Layer inherits from the Data Access layers, then there is probably something wrong with the design. If something needs to be in BLL and you already have it in DLL, then I would put those members in a base class and inherit from there rather than inheritting it from DAL.

    I can understand that the basic rule in Inheritance to follow is "is-a" rule. According to OOP rule, if a class has some commonality with some other classes, you would extract that part into a base class and have this class and others inherit from it.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Inheritance, from DAL to BLL, is it fine?

    In this thread it used such method...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Inheritance, from DAL to BLL, is it fine?

    I think I am would or is breaking the rule that the 3 layers should totally separate from each other, thanks for the wake-up call, back to the drawing board again...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width