Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what is the use of different architectures used in .net instead of directly connect to the database?
Posted

1. Managing data is independent from the physical storage
2. Migration to new graphical environments is faster
3. It is possible to make changes on the presentation level without affecting the other two (business or data access layer)
4. As each tier is independent it is possible to use different sets of developers
5. Since the client doesn’t have direct access to the database business logic is more secure
6. When one tier fails there is no data loss, because you are always secure by accessing the other tier.

Scalability: Each tier can scale horizontally. For example, you can load-balance the Presentation tier among three servers to satisfy more Web requests without adding servers to the Application and Data tiers.

Performance: Because the Presentation tier can cache requests, network utilization is minimized, and the load is reduced on the Application and Data tiers. If needed, you can load-balance any tier.

Availability: If the Application tier server is down and caching is sufficient, the Presentation tier can process Web requests using the cache.

References: one[^] & two[^]

-KR
 
Share this answer
 
Comments
User-11630313 14-Nov-15 6:17am    
thank you...@KrunalRohit
Because it separates concerns, and makes it easier to plan, implement, and manage large tasks.

When you deal with a small job, it doesn't seem important to "modularize" things, but the larger the project gets, the more necessary it is. If you just access the DB directly throughout your code, it's a massive job to (say) change the database to split a table in two, or change from MySql to MsSql say. If you work in a structured manner (which architectures force you to do in a lesser or greater way) then the changes become limited to a smaller "set" of methods and are easier to manage and test. If you separate the "tiers" into separate assemblies, then it's possible to replace a whole assembly and for the other layers to not even notice!

Think about it: why don't you keep all your files in a single folder? Why organise them in a hierarchical manner? It's the same thing: for a small number of files, it's easy to find what you want. But when you start to get to a significant number, having them organised into "layered" folders - projects, correspondence, manuals, videos, and music perhaps - and having those also organised, so "projects" has five folders, each with a separate "job" in, or your MP3 collection organised by band, then album, then each song makes it a lot easier to work with.
 
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