944,185 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 38841
  • ASP.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Aug 30th, 2005
0

How is 3Tier architecture implemented in ASP.NET

Expand Post »
hi,

What is 3-Tier Architecture and how is it implemented in ASP.NET?

Can anybody please make me clear regarding this doubt..?
Reputation Points: 10
Solved Threads: 0
Light Poster
aripaka is offline Offline
36 posts
since Aug 2005
Aug 30th, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

3-tier refers to separating your code by task. So, you might have all your HTML/CSS/JavaScript (client code) in .aspx pages, then implement all your business logic in ASP.NET "code behind" pages, and all your database i/o as stored procedures in SQL Server.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Aug 31st, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

Hi,
Thanx for the reply.

I read that a 3-tier architecture consists of a webserver, appserver and a database server.I heard that in Java environment Webserver and is Weblogic/ Websphere/Tomcat etc. Appserver is Tuxedo and Business logic is in EJB? I know that in .net IIS or BizTalk is webserver. What appserver is used in .Net and what exactly is business logic in generic sense?

Regards,
Mutyala Rao Aripaka
Reputation Points: 10
Solved Threads: 0
Light Poster
aripaka is offline Offline
36 posts
since Aug 2005
Aug 31st, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

The webserver is IIS, the database server would be SQL Server, and the application server layer is also IIS, though specifically it's an ISAPI DLL which interacts with IIS. Think of it as the "ASP.NET" server.

When I say "business logic", I'm referring to the implementation of the specific goals or reasons behind the application. Why are you writing the application? What is it supposed to do? It's rarely just "gather information from a user and store it in a database". In other words, HOW you gather information, via a specific form, a series of forms, a "wizard", a file upload, etc. isn't a business rule. That's interface design, and it's very important, but it isn't dictated by business logic.

You store that information in a database. The business logic doesn't dictate whether to use inline dynamic queries or stored procedures, or inform you how to layout your tables (usually).

A business rule might be "check to see if the person is already a customer, and if so, show them their purchase history".

When a think 3-tier, I don't think in terms of servers, I think in terms of functionality: all code to write, read, update, and "maintain" the database, goes either in the database, via stored procedures, or a database "class" in my application. All interface work is in external JavaScript and CSS files, with only the bare mininum done via ASP.NET "server objects" and their properties. Business logic is done in ASP.NET code-behind files.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Sep 1st, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

Hi,
Thanx for the message. Now i have got an idea about 3tier architecture. Then what can be in n-tier architecture?
Reputation Points: 10
Solved Threads: 0
Light Poster
aripaka is offline Offline
36 posts
since Aug 2005
Sep 1st, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

Most of the time, n-tier actualy refers to 3-tier. The concept can be extended, though, to describe any system that uses code or server-separation to achieve a process.

I regularly work on projects that require several steps, and those steps are often divided betwee discrete programs and/or servers. One could call that "multi-tier" or "n-tier". For example, a customer presents me with a database. They want that data to generate a personalized print mailing campaign.

These are some of the steps:

1) data conversion (their data may not be organized "properly")

2) address extraction, conversion, sorting

3) PostScript and/or PDF generation
3a) image manipulation
3b) copyfitting
3c) page device commands
3d) postal barcoding

4) Archival

5) Printing

There also may be web-based components, for reporting or order generation. As a software engineering project, each of those steps might be called a "tier", and handled as a separate sub-project. That would be an "n-tier" development project.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Sep 15th, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

Well, must say that the .net people generally don't know what a true 3'tier system is, the java world is more mature to handle that.

A true 3 tier solution is seen as:

3 tiers that are physical separated (not logical) from each other.
Each tier must know as little as possible about the other ties.
Theoretical, it should be possible to remove 1 tier without change the others.

So what is each tier then?

First tier, is the frontend. In a .Net world that means IIS and ASP.net (including the “code behind� as mentioned before). The “code behind� is frontend code hence it manipulates the data, received from the middle tier, to present it as HTML or do validation before sending the data to the middle tier.

Middle tier, is where the business logic is placed. This will typical be where any transactions is started and ended, by manipulation the data from the third tier, mostly called the resource/data layer. This tier have no idea of the total solution is a web application, webservice or different kind of application.

Tired tier (also call data/resource layer) could be a database, message queue, interfaces to external webservice and so on.

In theory each layer know nothing about the others layers, other than call them to send or receive data that fulfill their task. Each layer should talk through a pattern/interface so each layer is in depended of each other.
(I know theory and practice not always is the same, but you should always think this ways)

When all this is said, small web application often merges the first 2 (first tier and middle tier) tires, which actually is ok / under one circumstance: They must be logical separated through a pattern/interface so they later can be separated with rewriting the whole stuff. This is where 99% fails in their architure and they have to hire expensive consultants like me

Rule number one:
ALWAYS DESIGN THE ARCHITURE CORRECT,
FROM THE VERY BEGINNING.
Even if you start with a poc. (proof of concept).

9 out of 10 solutions is started as a poc, and still is even when they are out in production.


Fill free to comment..

Cheers
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ITsenior is offline Offline
2 posts
since Sep 2005
Sep 16th, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

Hi IT Senior,

Thanks for ur reply. That was an out and out thoeretical explanation which is very informative and unveils the underlying concept.
Reputation Points: 10
Solved Threads: 0
Light Poster
aripaka is offline Offline
36 posts
since Aug 2005
Oct 1st, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

ITSenior great response. Below is my thought to possibly provide additional insight.

Java vs. .NET is a common topic. What the Java folks have over the .NET folks is strong experience in OO design patterns where majority of ASP .NET developers have come from VB and ASP where OO was not possible.

If you are curious about design patterns I urge you checkout O'Rielly's "Head First Design Patterns" book, http://www.oreilly.com/catalog/hfdesignpat. This is a must read for all of our new employees as architecture is the sole key for an application, web or windows, to succeed.

3-tier simpy refers to an application which segregates its presentation, business, and data into layers.

Presentation is your ASP .NET pages and controls

Business layer is a little more complicated as it can span application and machine domains. For a web developer our responsibility would be to ensure all business specific functionality and objects are split out into classes and assemblies. If needed we are also responible for providing communication to middleware software such as BizTalk, webMethods, SAP XI, ect.

Data is your databases; Oracle, DB2, SQL Server, MySql, ect.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
akadez is offline Offline
8 posts
since Sep 2005
Nov 9th, 2005
0

Re: How is 3Tier architecture implemented in ASP.NET

Hi,

In ASP.Net perspective 3 tier architecture is to seperate the business logic from the presentation logic. 3 tier architecture consists of
Quote ...
1.Presentation Tier
2.Business Logic Tier
3.Data Access Tier
Basically, ASP.Net itself is designed in 3 tier architecture called Modal-View-Controller also known as MVC architecture.
In ASP.Net the presentation is devided from the business using the code behind files.
Quote ...
View - .aspx file (Front End/GUI)
Modal - Class Library (Business Logic)
Controller - .cs code behind file (Methods defined in page
which gets activated by application user action)
Please look into the attached file
Thanks,
Kedar
Attached Thumbnails
Click image for larger version

Name:	untitled.bmp
Views:	506
Size:	343.8 KB
ID:	1526  
Reputation Points: 10
Solved Threads: 1
Light Poster
kedar_challa is offline Offline
47 posts
since Nov 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in ASP.NET Forum Timeline: Implement Workflow
Next Thread in ASP.NET Forum Timeline: Call Function





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC