advertisement

Three tier Architecture of ASP_Net

50 %
50 %
advertisement
Information about Three tier Architecture of ASP_Net
Education

Published on January 2, 2009

Author: biswadip

Source: slideshare.net

Description

This slide show would talk about the 3-tier architecture and how is it helpful and about .NET Platform.

I came up with some Networking Stuffs at http://www.youtube.com/bgccnadom. Try them if you like...

THANK YOU FOR YOUR SUPPORT AND LIKES.
advertisement

Three Tier Architecture in ASP.NET [email_address]

Our Discussion What is a 3-Tier concept. What are the various layers. Application layer. Business Logic Layer Data Layer [email_address]

What is a 3-Tier concept.

What are the various layers.

Application layer.

Business Logic Layer

Data Layer

Know How of Tools Tools used: Visual Web Developer 2005 (Free) Visual Studio 2005 (Paid) Databases used: MS SQL Server 2005 MS ACCESS 2003/2007 (with MS-Office package) [email_address]

Tools used:

Visual Web Developer 2005 (Free)

Visual Studio 2005 (Paid)

Databases used:

MS SQL Server 2005

MS ACCESS 2003/2007 (with MS-Office package)

General 3-Tier Structure [email_address]

.NET 3-TIER Structure [email_address]

Three layers Presentation tier: The top most level of the application is the user interface(Web Browser). The main function of the interface is to translate tasks and results to something the user understands. This is also called the Application layer. Logic Tier: This layer coordinates the application, processes commands, makes logical decisions and evaluations, and performs calculations, It also moves and processes data between the two surrounding layers. Data tier: Here information is stored and retrieved from a database management system. The information is then passed back to the logic tier for processing and then eventually back to the user. [email_address]

Presentation tier: The top most level of the application is the user interface(Web Browser). The main function of the interface is to translate tasks and results to something the user understands. This is also called the Application layer.

Logic Tier: This layer coordinates the application, processes commands, makes logical decisions and evaluations, and performs calculations, It also moves and processes data between the two surrounding layers.

Data tier: Here information is stored and retrieved from a database management system. The information is then passed back to the logic tier for processing and then eventually back to the user.

Creating ASP. Net project [email_address]

Source of DB DB used with this is the Default NorthWind Database which can be downloaded from here http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&DisplayLang=en [email_address]

DB used with this is the Default NorthWind Database which can be downloaded from here

http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&DisplayLang=en

Connecting to DB [email_address]

The data access layer has four Methods: GetCategories() GetProducts() GetProductsByCategoryID(categoryID) GetProductByProductID(productID) [email_address]

The data access layer has four Methods:

GetCategories()

GetProducts()

GetProductsByCategoryID(categoryID)

GetProductByProductID(productID)

Typed Dataset and Table Adapter [email_address]

Table Adapters TableAdapters provide communication between your application and a database. More specifically, a TableAdapter connects to a database, executes queries or stored procedures, and either returns a new data table populated with the returned data or fills an existing DataTable with the returned data. TableAdapters are also used to send updated data from your application back to the database. Generic Structure : TableAdapter.Fill TableAdapter.Update TableAdapter.GetData TableAdapter.Insert TableAdapter.ClearBeforeFill [email_address]

TableAdapters provide communication between your application and a database. More specifically, a TableAdapter connects to a database, executes queries or stored procedures, and either returns a new data table populated with the returned data or fills an existing DataTable with the returned data. TableAdapters are also used to send updated data from your application back to the database.

Generic Structure :

TableAdapter.Fill

TableAdapter.Update

TableAdapter.GetData

TableAdapter.Insert

TableAdapter.ClearBeforeFill

Database Name [email_address]

Connection string [email_address]

Query [email_address]

[email_address]

[email_address]

User defined queries [email_address]

[email_address]

Samples The DataTables returned by the TableAdapter can be bound to ASP.NET data Web controls, such as the GridView, DetailsView, DropDownList, CheckBoxList, and several others. Sample Code:>> AllProducts.aspx.cs using NorthwindTableAdapters; public partial class AllProducts : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e)

  • { ProductsTableAdapter productsAdapter = new ProductsTableAdapter(); GridView1.DataSource = productsAdapter.GetProducts();
  • GridView1.DataBind();
  • } } [email_address]

    The DataTables returned by the TableAdapter can be bound to ASP.NET data Web controls, such as the

    GridView,

    DetailsView,

    DropDownList,

    CheckBoxList, and several others.

    Sample Code:>> AllProducts.aspx.cs

    using NorthwindTableAdapters;

    public partial class AllProducts : System.Web.UI.Page

    {protected void Page_Load(object sender, EventArgs e)
  • { ProductsTableAdapter productsAdapter = new ProductsTableAdapter(); GridView1.DataSource = productsAdapter.GetProducts();
  • GridView1.DataBind();
  • } }

    Adding parameterized methods [email_address]

    Insert,Update and Delete SAMPLE CODE:>> ProductsTableAdapter productsAdapter = new ProductsTableAdapter(); // Delete the product with condition productsAdapter.Delete(…); // Update a record with condition productsAdapter.Update(…); // Add a new product productsAdapter.Insert(…); [email_address]

    SAMPLE CODE:>>

    ProductsTableAdapter productsAdapter = new ProductsTableAdapter();

    // Delete the product with condition

    productsAdapter.Delete(…);

    // Update a record with condition

    productsAdapter.Update(…);

    // Add a new product

    productsAdapter.Insert(…);

    References http://msdn.microsoft.com/ http://aspnet.4guysfromrolla.com http://www.asp.net For my latest updates: http://www.cognobytes.com/biswadipgoswami/Default.aspx [email_address]

    http://msdn.microsoft.com/

    http://aspnet.4guysfromrolla.com

    http://www.asp.net

    For my latest updates:

    http://www.cognobytes.com/biswadipgoswami/Default.aspx

Add a comment

Related presentations

Related pages

Three Tier Architecture in ASP.NET - Bean Software Services

Explains how to organize project into recommended three tier architecture.
Read more

Create and Implement 3-Tier Architecture in ASP.Net

Now we are done. Add all layers to our project. You can see the three tiers in the image given below. Basically a 3-Tier architecture contains the ...
Read more

3 tier architecture in asp.net - a complete article ...

3 tier architecture in asp.net ... in this article we are going to look into almost all aspects of designing a 3 tier architecture website in ASP.NET.
Read more

3 tier architecture example in asp.net with C# - ASP.NET ...

realy a nice tutorial i ever seen about three tier architecture ... 3 tiers Architecture in whole asp.net ... 3 tier architecture example in asp.net ...
Read more

Three Tier Architecture In ASP.NET - C# Corner

In this article you will learn about the three tier Architecture in ASP.NET.
Read more

3-Tier Architecture in ASP.NET with C# - DotNetFunda.com

3-Tier Architecture in ASP.NET with C# 3-Tier architecture is a very well know buzz word in the ... Lets create a form that will have three textboxes ...
Read more

ASP.Net 3-Tier architecture - CodeProject

Three Tier Architecture in ASP.NET A CP article on the background, advantages and usage of 3-tier architectures in C#. 3-tier architecture in ...
Read more

Using a Three-Tier Architecture Model (COM+)

The three-tier architecture model, ... During an application's life cycle, the three-tier approach provides benefits such as reusability, ...
Read more

Understand 3- Tier Architecture in C# - CodeProject

Design and Architecture; ASP.NET; ... I'm using three tier architecture in a ... This has nothing to do with the title "Understand 3- Tier Architecture ...
Read more

Asp.net Architecture with c# and 3tier Architecture in asp.net

how to create Asp.net Architecture with c# and 3tier Architecture in asp.net in MVC ... Create Three Tier Architecture Windows ...
Read more