400_the_cat
400_the_cat

Reputation: 883

ASP.NET: I'm new to n-tier architecture. Can someone give me a high level overview?

can you please describe what an n-tier architecture is. what is a data access layer? what type of code would typically go into this data access layer class? i have basically the same question for the business access layer. what type of code typically goes there? finally, can you also explain, in high level, how these layers interact with each other? thanks.

Upvotes: 1

Views: 639

Answers (4)

SteveCav
SteveCav

Reputation: 6719

If you're like me, you learn by playing with code rather than reading articles. Here's a little example tutorial.

Oh, and also read up on the difference between a Tier and a Layer. It's a pet hate for some StackOverflowers :)

Upvotes: -1

Rex M
Rex M

Reputation: 144112

I've been mulling this around in my head for a few years, so I'll just throw it out and see what happens:

N-tier is crap.

When developers first learn about it, they twist their code into all sorts of hideous contortions to make it fit "n-tier". Then (if they are not incompetent) they grow up and just sort of give up on that approach. Then (if they are reasonably competent) they realize that all the other real sorts of architecture, which you have to learn over time and which can't be distilled into this ridiculous one-size-fits-all 3-bucket magic, do frequently (sort of) map to the 3 tiers. But they aren't built on the 3 tiers - you don't start with 3 magic buckets and everything falls neatly into them. 3 tiers simply tend to emerge from a proper design. Starting with 3 tiers is backwards.

So my advice - which may be wrong, I'm just testing this idea out - is don't try to understand 3-tier until you understand all the other, more basic patterns and practices, and you've built some solid software using them. Feedback welcome.

Upvotes: 0

Frank Tzanabetis
Frank Tzanabetis

Reputation: 2836

Google is your friend, as is wikipedia as STW pointed out. You might wanna check out this though - http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx as it gives a practical example.

Upvotes: 1

STW
STW

Reputation: 46366

http://en.wikipedia.org/wiki/N-tier

Microsoft Patterns & Practices site is a good resource for this type of stuff. They've published a book ($$$ for print, free-as-in-beer ebook), the Microsoft Application Architecture Guide v2, which has a solid overview and walkthrough of N-Tier: Application Architecture Guide: Design Fundamentals

Upvotes: 5

Related Questions