ASP.NET
  Home arrow ASP.NET arrow Developing ASP.NET 2.0 Applications with t...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Developing ASP.NET 2.0 Applications with the Microsoft Data Access Application Block
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 18
    2006-10-02

    Table of Contents:
  • Developing ASP.NET 2.0 Applications with the Microsoft Data Access Application Block
  • What are Microsoft Enterprise Application Blocks?
  • Developing an ASP.NET application using the Data Access Application Block: adding references
  • Configuring a connection string
  • Developing the code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Developing ASP.NET 2.0 Applications with the Microsoft Data Access Application Block


    (Page 1 of 5 )

    This is the first article in a series focusing on developing applications using ASP.NET 2.0 and the Data Access Application Block available in the Microsoft Enterprise Application Block Library for .NET 2.0. In this article, I introduce you to the concept of application blocks and develop a simple application using a data access application block with ASP.NET 2.0
    A downloadable file for this article is available here.

    The entire source code for this article is available in the form of a downloadable zip file. The solution was developed using Microsoft Visual Studio 2005 Professional Edition on Microsoft Windows Server 2003 Enterprise Edition together with Microsoft SQL Server 2005 Developer Edition and Microsoft Enterprise Library for .NET Framework 2.0 (January 2006 version). I didn’t really test the solution with any other/previous editions. If you have any problems in executing the solution, please post in the discussion area.

    What exactly are application blocks?

    A simple definition for an application block would be "a collection of reusable, configurable and extensible units of code for application development."  Let us go through a detailed explanation of the above.

    Any developer who works with ADO.NET would certainly define his own data access layer (DAL). This DAL would generally work with one or more .NET data providers and provide the necessary interfaces to deal with the data existing in databases. The most commonly used interfacing within DAL would be as follows:

    • Execute a SQL command.
    • Return a data table/data set based on the SELECT statement given.
    • Update datasets.
    • Execute stored procedures.
    • Return a row/value based on the select statement given.
    • Logging.

    If you ever develop something like the above, you have already started developing your own "application block!"  Before developing an application block, you really need to design it carefully with lots of analysis. You can call your DAL library as a full-fledged application block, if you make it configurable, reusable and extensible. 

    Once an application block is developed, you can use it for any number of applications regardless of any domain or the type of application. You can even develop your own application blocks concentrating on only web development,  smart client development, etc. It all depends on the analysis of its reusability among several applications.

    You can develop these types of application blocks together with .NET enterprise services to make them more robust.  .NET enterprise services include COM+, remoting, web services, MSMQ (Message Queuing), WMI, Windows services, and so on.

    If you are new to developing simple data access layers/helpers, you can refer to my series “Developing a Data Access Layer for Sybase using ADO.NET.” If you are interested in developing data access helpers using COM+, the following contributions of mine may help you:

    http://www.aspfree.com/c/a/MS-SQL-Server/Developing-Your-Own-SQL-Server-
    Based-Data-Access-Helper-using-COM-and-VBNET/

    http://www.aspfree.com/c/a/MS-SQL-Server/Completing-Your-Own-SQL-Server-
    Based-Data-Access-Helper-using-COM-and-VBNET/

    http://www.aspfree.com/c/a/MS-SQL-Server/A-Wrapper-Class-for-the-SQL-Server-
    Based-Data-Access-Helper/

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys. This is my new series on working with Microsoft Enterprise Library 2.0...
       · hi,Thanks for the article, it helped me a lot.I am using Enterprise Library...
       · Hai,You should never have any problem to get connected to SQL Server 2000 using...
     

    ASP.NET ARTICLES

    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...
    - Completing an ASP.NET AJAX Server-Centric Ba...
    - Information Management for an ASP.NET AJAX S...
    - Comment and Order Management for an ASP.NET ...
    - Back-end Management Tasks for an ASP.NET AJA...
    - User Information Management for an ASP.NET A...
    - Adding Comments and Search to an ASP.NET AJA...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway