Click here to Skip to main content
15,911,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Please explain why we are using business layer while we can write business logic on presentation layer also and what is the actual use of three layer architecture.




Thanks
Posted

Its not really a solution, but a link....

http://en.wikipedia.org/wiki/Multitier_architecture[^]
 
Share this answer
 
If your application contains less business logic, then IMHO, I agree you can put it on your presentation layer. But if you are designing a complex system that contains many business logic, then I guess you need to separate it to a different tier. The purpose of BLL is self explanatory. One main purpose for this is for validating the correctness of your data before inserting it to your database.
 
Share this answer
 
The problem with intertwining UI behaviour with business logic is that you make testing your business logic that much more complicated. If you are developing a one-off small scale system then you may feel that going the extra mile to layer your application just isn't worth the effort, and that's fine.

But, if your application is going to be something complex that takes a while to develop then you really should consider how you are going to test your code, and having tests that can run automatically is a good way to help make your application more robust (providing you apply a rigid development discipline).

The bottom line is, do you consider yourself a professional intent on delivering quality applications to your clients, or do you just write small apps for fun where maintainability and enhancement isn't that important?
 
Share this answer
 
Hello ,

Basically three tire architecture use for Scalability, Performance and availability. the main role of business logic to decouple overhead in presentation layer and formulate in another layer. it provide great code re-usability.

Consider below scenario :

If you have three pages like page1.aspx, page2.aspx and page3.aspx and we need to consume one web services on all three pages for some business workflow need and logic processing method contain 1000 line of code. so its not good practice to implement method on all three pages code behind. so it's just simply implement in business layer commonly access from all three pages.

I hope it will useful to understand BLL.

below terms for more details


VB
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.
 
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