<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AboutBLL.aspx.cs" Inherits="MyTunes.BLLObjectBinding.AboutBLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:Label ID="lblHeader" runat="server" Font-Bold="True" 
            Text="Advantages and Disadvantages of the Business Logic Layer"></asp:Label>
    </p>
    <h3>Advantage #1: Code Separation</h3>
    <p>
        A large project is much easier to mantain when it is well architected using clearly defined layers.  A business logic layer is often defined 
        as a shared library project so it can be used by different web sites and applications.  A recent trend is to move the business logic layer to a set of web services, often called an enterprise service bus (ESB).
    </p>
    <h3>Advantage #2: Data Validation and Restriction</h3>
    <p>
        The business logic layer can check and restrict how the data is being 
        manipulated. For example, you may have a requirement to write to a security 
        audit log for every record update. Perhaps you need to just flag records instead 
        of actually deleting them. You could do that in this layer, but remember basic 
        data and referential integrity checks should still be defined in the database 
        whenever possible.
    </p>
    <h3>Disadvantage #1: More Code</h3>
    <p>
        While the business logic layer provides several benefits, it does require designing, testing and maintaining more code.  You will have to analyze the cost/benefit tradeoff and decide for yourself if it is worth doing for your projects.
    </p>
    <h3>Disadvantage #2: Possible Performance Impacts</h3>
    <p>
        Done correctly, the business logic layer simplifies and standardizes data access without adding a lot of overhead.  Poor performance at the logic layer can kill a project.  Even worse is when data gets corrupted at this layer due to coding mistakes.  A common trend is to using comprenhensive automated unit testing against this layer to ensure changes and enhancements don't "break the build".  In addition, just like with Database binding, paging and soring will reload all the data every time, so extra steps will be needed to optimize performance.
    </p>
</asp:Content>
