Three-tier application model that must be learned in Object-Oriented Design
A three-tier application model refers to a system design in which the entire system is divided into three layers: User Interface Layer (UI Layer), Business Object layer (logic layer), and data layer.
The user object Layer focuses on the implementation of the software interface, the Business Object layer focuses on the user's business rules and logical structure, and the data layer focuses on the implementation of the database.
To better understand the layer-3 Application Model, let's make a metaphor:
User Interface Layer (UI): Like actors on the stage, it attracts the attention of the audience and gives the audience experience.
Logic layer: persons who provide instructions and prompts, including orchestrations, stage managers, directors, etc. These people deal with actors on the stage, but the audience cannot see them. They direct actors and provide materials to them.
Data Layer: it consists of people responsible for setting scenes and materials, including scriptwriter, dancing beauty, and set artist. These people provide drama materials together, and the audience can only see their works.
In e-commerce: the UI is a form, shopping cart, graphics, etc. The business layer is composed of logic such as control pricing, transportation fee, and data layer is composed of inventory lists in the database.
In many cases, system design follows a three-tier application model.