A typical object-oriented architecture includes layers of code that represent the concerns. It's normal and certainly best practice to group all classes and components responsible for persistence into a separate persistence layer in a layered system architecture.
Layered Architecture: defines interfaces between code that implements the various concerns, allowing changes to be made to the way one concern is implemented without significant disruption to code in the other layers. The rules are as follows,
. layers communicate from top to bottom. A layer is dependent only on the layer directly below it.
. each layer is unaware of any other layers except for the layer just below it.
Presentation layer: the user interface logic is topmost. Code responsible for the presentation and control of page and screen navigation is in the presentation layer.
Business layer: is responsible for implementing any business rules or system requirements that would be understood by users as part of the problem domain.In some systems, this layer has its own internal representation of business domain entities, and in others it reuses the model defined by the persistence layer.
. persistence layer: the persistence layer is a group of classes and components responsible for storing data to, and retrieving it from, one or more data stores. this layer necessarily includes a model of the business domain entities.
.Helper and utility classes : every application has a set of infrastructual elements don't form a layer, because they don't obey the rules for the interlayer dependency in a layered architecture.