locked
How to create Business Entities and Business Logic Layers RRS feed

  • Question

  • Hello all,

    I would like to view some real life examples or I can better say like to understand how to create Business Logic Layes.
    I have gone throug many tutorials, articles, webcasts, etc.. on the internet to understand them, but all I find is some sample and infact very simple Business Logic Layes with 5-7 colums details and basic operations like
    GetAllEmployee
    GetEmpById
    GetEmpByStatus and so.

    But in real life my application has hundreds of entites and a good amount of them are interconected, means they have referance to each other.

    Can you reffer me some good stretagies to implement Layerd application?
    Bhavin.
    Tuesday, January 12, 2010 4:19 AM

Answers

  • I think this is basically the oldest question in software design. There are 2 aspects you've to understand before you go on implementing: there's the architectural & design aspects and then there's the technological-tools aspect.

    The architectural aspect should handle concerns such as what services you need to support (conceptual software services, not web services), such as how to ensure security or logging in the data access layer. This aspect touches all layers, but you should know what's your plan before you go on implementing the DAL. A good place to start is the Application Architecture Guide (and its knowledge base ), especially Part 3 (layers) chapter 12 (DAL).

    Usually at that point, you'll decide what tool to use to assist in the implementation, and then you've to follow the best practices for that tool. Today we've quite a few tools to really ease the pain of developing a DAL. I would recommend using Nhibernate, but really it's just a preference. Anyway, if you do go with nhibernate, take a look at these sessions which provides a great starting point to creating a good DAL: Summer of NHibernate .

    and look, your question really opens up a whole lot of concerns you've to answer before you can say your design is complete, especially around how to handle quality attributes - that's exactly what the application architecture should define. but if i'm to look only at how to implement the DAL, then those sessions i mentioned should suffice for working with nhibernate.

    Fernando Felman
    Solution Architect
    Unique World
    My blog

    If your question was answered, please don't forget to mark it so.

    • Marked as answer by Bhavin Mistry Saturday, January 16, 2010 3:44 AM
    Tuesday, January 12, 2010 5:34 AM

All replies

  • I think this is basically the oldest question in software design. There are 2 aspects you've to understand before you go on implementing: there's the architectural & design aspects and then there's the technological-tools aspect.

    The architectural aspect should handle concerns such as what services you need to support (conceptual software services, not web services), such as how to ensure security or logging in the data access layer. This aspect touches all layers, but you should know what's your plan before you go on implementing the DAL. A good place to start is the Application Architecture Guide (and its knowledge base ), especially Part 3 (layers) chapter 12 (DAL).

    Usually at that point, you'll decide what tool to use to assist in the implementation, and then you've to follow the best practices for that tool. Today we've quite a few tools to really ease the pain of developing a DAL. I would recommend using Nhibernate, but really it's just a preference. Anyway, if you do go with nhibernate, take a look at these sessions which provides a great starting point to creating a good DAL: Summer of NHibernate .

    and look, your question really opens up a whole lot of concerns you've to answer before you can say your design is complete, especially around how to handle quality attributes - that's exactly what the application architecture should define. but if i'm to look only at how to implement the DAL, then those sessions i mentioned should suffice for working with nhibernate.

    Fernando Felman
    Solution Architect
    Unique World
    My blog

    If your question was answered, please don't forget to mark it so.

    • Marked as answer by Bhavin Mistry Saturday, January 16, 2010 3:44 AM
    Tuesday, January 12, 2010 5:34 AM
  • Are we talking about business logic layer or DAL layer over here.
    Though DAL layer do create business entities, it should not carry any business logic inside it.

    Cheers
    Thompson
    Tuesday, January 12, 2010 6:16 AM