locked
Wrapping of Code in classes RRS feed

  • Question

  • User1983249378 posted

    hello everyone , i have been using .net since last 2 years , and still confused about should we wrap our code in classes , or write simple code , i mean what's the benefit of writing DAL and BLL abstract classes , it only consumes time . May b the question looks silly but i want to clear my concepts about classes architecture .

    When we must implement DAL and BLL and when we can avoid it ? 

    Wednesday, November 24, 2010 11:58 PM

Answers

  • User-821857111 posted

    The purpose of separating code into layers is to allow multiple people to work on the same project, or to remove dependencies so that layers can be changed or tested easily. It also allows for greater re-use. For example, if you want to use logging, you would create a separate project and deploy it as a service. Then you can re-use that service in other projects.

    If your applications are always small, and will never grow, you don't need to separate your code.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 25, 2010 1:48 AM

All replies

  • User-821857111 posted

    The purpose of separating code into layers is to allow multiple people to work on the same project, or to remove dependencies so that layers can be changed or tested easily. It also allows for greater re-use. For example, if you want to use logging, you would create a separate project and deploy it as a service. Then you can re-use that service in other projects.

    If your applications are always small, and will never grow, you don't need to separate your code.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 25, 2010 1:48 AM
  • User1983249378 posted

    Thank you mike for your reply . kindly tell me one more thing  , what is the impact of wrapping of code on performance (processing time ) .

    Thank alot for clearing my confusion.

    Regards Umair Aslam Bhatti

    Thursday, November 25, 2010 1:58 AM
  • User-821857111 posted

    Negligible. All large applications are built like this. The .NET framework is built like this - thousands and thousands of classes that wrap code.


    Thursday, November 25, 2010 2:14 AM