What is three-tier architecture?

Business objects
Business objects will be maintained in a different project where all object required for database layer, business layer and presentation layer will be created and maintained. But according to me, we need to go for this layer only in case of following two scenario, other wise it better to omit this layer for the sake of not killing the application
1. A set of common object is used across in many classes.
2. When we got to implement logic in the get, set property of objects declared.

Database Layer
Database layer also becomes a different project. Database layer will contain all the methods required to connect to the database using connection string and execute the stored procedure.

Business Layer
Business layer will be a project that acts an intermediate layer between presentation layer and database layer. Like database layer, business layer also should be as generic as possible. All the (possible) logic that we need to do with data before appending it with controls in presentation layer can be implementing in business layer.

Presentation Layer
Final project created will be presentation layer. As we know the UI controls will be placed in this layer. On control related events the methods from business layer can be invoked and operation could be executed.

Utility Layer
Utility layer does not actually belong to 3 tier layer. But we can create a custom exception class inside this utility layer and be used in all the 3 layers to handle the errors that occurring with in the application.

No comments:

Post a Comment