Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
3.29/5 (4 votes)
See more:
Hi ALL,
I have to developed a asp.net C# application with 3-tier architecture. But Before that I want to know that What is the difference between a 3-tier architecture and a design pattern? Is that both are same? Some one told me that both are not same, and in 3-tier architecture we have to use a design pattern. Is it right? If yes then How?

Please Help!!

Thanks
Posted
Updated 31-May-11 21:57pm
v2
Comments
ambarishtv 1-Jun-11 4:02am    
this is the best book for design pattern(GOF)
Design Patterns: Elements of Reusable Object-Oriented Software
Legor 1-Jun-11 5:11am    
well its probably not the best from an architectural view, since it's not explaining architectural patterns like 3 tier. But it's a must have for serious programmers indeed (imo).

In addition to what Abhinav says: it totally depends on your functional requirements.
No design pattern is good by itself.

Three-tiers architecture is not considered a design pattern or architectural pattern, as it's more of application architecture, and design patterns are more technological.
See http://en.wikipedia.org/wiki/Design_pattern_(computer_science)[^] and http://en.wikipedia.org/wiki/Architectural_pattern[^].

—SA
 
Share this answer
 
v2
Comments
Abhinav S 1-Jun-11 4:04am    
[Thumbs up] 5.
Sergey Alexandrovich Kryukov 1-Jun-11 4:05am    
Thank you, Abhinav.
--SA
ambarishtv 1-Jun-11 4:09am    
my 5
Sergey Alexandrovich Kryukov 1-Jun-11 12:50pm    
Thank you.
--SA
In addition to the excellent links already posted:

Architecture is a somewhat nebulous concept, but relates to high level design decisions, and things which become expensive to change later on. The '3 tier' architecture is traditional for web applications and it works well (though one might argue that a modern web app is actually 4 tier: database, business logic, server-side presentation, and client-side presentation i.e. Ajax/Javascript).

Design patterns are essentially ideas that can be re-used in different scenarios. It's normally used for lower level design, on the code or module level – for example MVC (and MVP and MVVM and any other variants), publish-subscribe, enumeration, etc. These sometimes get built into the language or at least the language community; for example the way .Net and Java do collections is essentially the formalisation of the patterns C++ programmers were using for them.

I've not heard the term 'architectural pattern' before but it is a reusable architectural design – so 3-tier, event driven, plugin-based and any other common architecture would qualify.

The important thing about patterns is that they're just names for particular groups of ideas. Don't use a pattern just because it's a pattern, use it if the ideas it encapsulates are appropriate for your project.
 
Share this answer
 
Comments
Uday P.Singh 1-Jun-11 6:25am    
thanks for the reply. Can anyone give me a specific answer of my question that Do we have to use a design pattern in 3-tier architecture??
BobJanova 1-Jun-11 17:56pm    
I think that '3 tier' -is- an architectural design pattern. I'm also sure that you will want to use other lower level design patterns to construct your application – it's basically impossible to write a serious application without using or reinventing some.
Have a look at the 3-tier and design pattern definitions here[^].
MVC is a good design pattern to use in ASP.Net.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 1-Jun-11 3:50am    
That makes sense, my 5, but you should say main words first...
Please see my answer.
--SA
Abhinav S 1-Jun-11 4:03am    
Thank you SA.
ambarishtv 1-Jun-11 3:55am    
good link my5
Abhinav S 1-Jun-11 4:04am    
5? Where? :)
ambarishtv 1-Jun-11 4:07am    
Sorry :)
Not much to add to the explanations so far. Patterns in general are a great way to make use of expert knowledge (that is solution blueprints for often occuring problems). It's definitely worth it to get familiar with at least the main design patterns.

Another good page which explains the basic patterns very well is:
http://sourcemaking.com/[^]

If you're in an ASP.NET environment i would forward you to the MS Application Archhitecture Guide. It epxplains the main architecture types (not only 3- Tier) very well in my opinion. It also includes plenty of links to HowTo's for specific tasks in ASP.NET and many more stuff.

http://msdn.microsoft.com/en-us/library/ff650706.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900