Home > Articles > Programming > Windows Programming

  • Print
  • + Share This

Final Note

When using the technique presented in this article, it's a good idea to separate the business logic in a different class (file) from the presentation logic. For example, we can put this logic in a different class (or in a different file):

class BusinessLogic
{

  public DataSet GetData()
  {

   DataSet ds = new DataSet() ;
   // Creating a new DataSet to hold the XML Data.

   ds.ReadXml("employees.xml") ;
   // Getting the XML Data into the DataSet created.

   return ds;
  }
}

and then instantiate and use it in the file where we have presentation logic, like this:

BusinessLogic BL = new BusinessLogic();
DataSet ds = BL.GetData();

This approach gives us an easy port when we finally convert all CGI code to ASP.NET.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.