java-design-patterns icon indicating copy to clipboard operation
java-design-patterns copied to clipboard

Layer Supertype pattern

Open iluwatar opened this issue 4 years ago • 4 comments

Description:

The Layer Supertype design pattern is used to provide a common base class for all objects in a particular layer. This pattern simplifies code maintenance and enforces consistency across similar objects. By implementing a layer supertype, we can centralize common behaviors and properties, reduce code duplication, and facilitate easier modifications and extensions in the future.

Main elements of the pattern:

  1. Layer Supertype: A common abstract base class or interface that provides shared methods and properties for all classes in the same layer.
  2. Inheritance: Concrete classes inherit from the layer supertype to gain common functionality.
  3. Separation of Concerns: This pattern helps in maintaining a clear separation between different layers of the application, making the code more modular and easier to manage.

References:

Acceptance Criteria:

  1. Create an abstract base class or interface for the chosen layer (e.g., Service Layer, DAO Layer) that includes common properties and methods.
  2. Refactor existing classes in the chosen layer to inherit from the new layer supertype, ensuring they implement or utilize the common functionality.
  3. Update documentation and examples to demonstrate the use and benefits of the Layer Supertype pattern in the project.

iluwatar avatar Jul 07 '20 17:07 iluwatar

@waterman6 please confirm before starting on working with an issue.

ohbus avatar May 22 '21 04:05 ohbus

Is this issue still free? Can I work on it?

ZQH777 avatar Oct 13 '22 14:10 ZQH777

Ok @ZQH777

iluwatar avatar Oct 13 '22 17:10 iluwatar

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 28 '22 12:11 stale[bot]