none
3-tier design right way? RRS feed

  • Question

  • Sorry for my English. Am i on right way doing this 3-tier design using SQL Express and Windows Forms:

    BussinesObject
    class BOClient()
    {
         "properties for Bussines object Client - Name, Address, Telephone ..."
    }
    Data Access Layer
    class DALClient(BOClient boClient)
    {
         //methods "Insert, Delete, Update " using LINQ
    }
    Bussines Layer
    class BLClient(BOClient boClient)
    {
         //methods "Insert, Delete, Update "
         //example Insert method
         public Insert(BOClient boClient)
              {
                     DALClient dalClient = new DALClient();
                     dalClient.Insert(boClient);
              }
              ...
    }
    UI Layer
    In UI using Windows Forms i make user input validation
    something like this:

    BOClient boClient = new BOClient();
    BLClient blClient = new BLClient();
    if (txtBoxName.Text != "")
    {
           boClient.Name = txtBoxName.Text.ToString();
           ...
           blClient.Insert(boClient);
    }
    Thank you in advance!
    Friday, September 18, 2009 9:21 AM

Answers

  • hello Hoolio
    This looks perfect...
    Ensure consistent Exception handling, transaction management strategy...
    Consider using MS Enterprise Library 4.1 application block for the same.

    Regards
    Suds..
    p.s - kindly close the thread if it helps.

    • Marked as answer by HoolioVelasko Friday, September 18, 2009 9:40 AM
    Friday, September 18, 2009 9:33 AM
  • Hi,

    Where is the services layer?? How are the calls being made to the business layer are you planning to do IN-Proc calls?? any reason why??
    Also think about having layer level entities or ensure entities are not overloaded with data. I see an BO enitity being used in UI.

    Use proper infrastructure code like exception, logging, Data etc by using EL

    Regards
    Azhar

    Mark as answer if you find the response useful
    • Proposed as answer by Azhar_Amir Sunday, September 20, 2009 5:19 AM
    • Marked as answer by HoolioVelasko Sunday, September 20, 2009 9:25 PM
    Sunday, September 20, 2009 5:17 AM

All replies

  • hello Hoolio
    This looks perfect...
    Ensure consistent Exception handling, transaction management strategy...
    Consider using MS Enterprise Library 4.1 application block for the same.

    Regards
    Suds..
    p.s - kindly close the thread if it helps.

    • Marked as answer by HoolioVelasko Friday, September 18, 2009 9:40 AM
    Friday, September 18, 2009 9:33 AM
  • Thank you very much! I just need to know.
    Friday, September 18, 2009 9:39 AM
  • Hi,

    Where is the services layer?? How are the calls being made to the business layer are you planning to do IN-Proc calls?? any reason why??
    Also think about having layer level entities or ensure entities are not overloaded with data. I see an BO enitity being used in UI.

    Use proper infrastructure code like exception, logging, Data etc by using EL

    Regards
    Azhar

    Mark as answer if you find the response useful
    • Proposed as answer by Azhar_Amir Sunday, September 20, 2009 5:19 AM
    • Marked as answer by HoolioVelasko Sunday, September 20, 2009 9:25 PM
    Sunday, September 20, 2009 5:17 AM
  • Please check the below complete reference.

    Building an N-Tier Application in .NET:

    http://msdn.microsoft.com/en-us/library/ms973279.aspx


    Regards,
    Jai
    Friday, October 2, 2009 11:39 AM