Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
what is meant business object in 3-tier architecture and what the use?
Posted

Business Object Layer consists of objects that represent business entities which always should be 100% independent of database used for data persistence.

  • Provides manager classes accessible from Presentation layer.

  • HttpHandlers.

  • My own Page base class.

  • More things go here..


The business layer is vital; in that, it validates the input conditions before calling a method from the data layer.
This ensures the data input is correct before proceeding, and can often ensure that the outputs are correct as well.
This validation of input is called business rules, meaning the rules that the business layer uses to make “judgments” about the data.

However, business rules don’t only apply to data validation; these rules apply to any calculations or any other action that takes place in the business layer. Normally, it’s best to put as much logic as possible in the business layer, which makes this logic reusable across applications.

One of the best reasons for reusing logic is that applications that start off small usually grow in functionality.
For instance, a company begins to develop a web site, and as they realize their business needs, they later decide to add a smart client application and windows service to supplement the web site. The business layer helps move logic to a central layer for “maximum reusability.”
Ref.: Introduction to 3-Tier Architecture[^]
 
Share this answer
 
v2
Comments
Pankaj Nikam 25-Jun-12 10:06am    
+5 for such awesome answer. Clear and precise.
Rahul Rajat Singh 25-Jun-12 11:11am    
good answer. +5
Prasad_Kulkarni 25-Jun-12 23:52pm    
Thank you Rahul!
Prasad_Kulkarni 25-Jun-12 23:52pm    
Thank you Pankaj!
Most business application has 3 essential components.

1. Some data Store that will contain the business specific data.
2. Some business logic that will govern how to enter, retrieve and interpret the data in the data store.
3. A meaningful display of this information to the user.

so I can say we need three things -

1. Data Store
2. Data Access
3. Business Rules/Logic + Validations
4. Web pages to present it to user.

The store could be any database. rest three have to be implmented in order to have our application working.

Now we can put all this code into one big project and get the things to work, but that would lead to some problems.

1. High degree of coupling between modules with separate and dedicated functionality.
2. A small change would need the change in complete application and even recompiling in some cases.

So why not we design the system in such a way that all the modules in independent of each other. independent in terms of extensiblity i.e. change in one area will not need change in any other area. Secondly resusability i.e. if we design the modules independetly then each module can then be resued independently and finally the best part if i need to replace or enhance one area I dont have to redo the complete application. i will change only the required tier.

Now coming on how to do it, its simple. identify what falls in which category and have each tier implemented as a separate solution.

Here are two toy projects that will give you a very good idea on how things are done in n-tier architecture.

YaBlogEngine - A Tiny Blog Engine written in ASP.NET/C#[^]

YaMessaging - A simple e-mail like messaging application[^]

P.S. I hope this was helpful and informative for you. please let me know if you have any confusion and or question.
 
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