question for God(the messageboard poster) or any .

Results 1 to 2 of 2

Thread: question for God(the messageboard poster) or any .

  1. #1
    Join Date
    Dec 1969

    Default question for God(the messageboard poster) or any .

    Scenario: 3 tier web application(Presentation, Business Logic, Data Access) using .NET.<BR>We are binding a dropdown server conrol. When we bind it, we are accessing the data layer and not the business tier from the presentation layer or the code behind.<BR><BR>&#039;Current Code in the code behind to bind the control.<BR> Dim dataCategory As New dataCategory()<BR> Category.DataSource = dataCategory.GetCategories()<BR> Category.DataBind()<BR><BR><BR>&#039;Business Tier<BR> No Code<BR><BR>&#039;Data tier code<BR>Public Function GetCategories()<BR> Dim myDataSet As New DataSet("Categories")<BR> Dim mySqlStmt = "cm_Categories"<BR> Dim myDataAdapter = New SqlClient.SqlDataAdapter(mySqlStmt, ConfigurationSettings.AppSettings("oConn"))<BR>myD ataAdapter.Fill(myDataSet, "Categories")<BR>Return myDataSet<BR>End Function<BR><BR>Is this the right way to do this or should I be accessing the business layer only from the presentation layer? Suggestions?<BR><BR>Thanx. <BR>

  2. #2

    Default RE: question for God(the messageboard poster) or a

    If you want complete separation of your tiers, you should only call the biz layer.<BR><BR>In this case, your biz method would simply call the data method and nothing else. If it is only used once, the biz method often gets left out...<BR>At some point, you might need to do additional processing of the data; a new buisness rule like a default item. This would go in the biz method and apply everywhere.<BR><BR>

Posting Permissions

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