iluwatar / iluwatar/java-design-patterns

Vertical slice architecture

Open
#2,373 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

epic: pattern info: help wanted type: feature
Dominant language
Java
Stars
94.7k
Forks
27.4k
Avg merge
3d 4h
Merged PRs (30d)
10

Description

Description:
The Vertical Slice Architecture (VSA) design pattern focuses on organizing code by features rather than layers, promoting a more modular, maintainable, and scalable architecture. This approach ensures that each vertical slice contains all necessary components, such as data access, business logic, and user interface, which are isolated from other slices.

Main elements of the Vertical Slice Architecture include:

  • Feature-based Structure: Each feature is a self-contained module with its own domain logic, data access, and user interface.
  • Single Responsibility: Each slice is responsible for one specific functionality or feature, reducing dependencies between different parts of the application.
  • Encapsulation: Each slice encapsulates its logic, making the application more modular and easier to test.
  • CQRS (Command Query Responsibility Segregation): Often used in conjunction with VSA to separate read and write operations, enhancing performance and scalability.

References:

Acceptance Criteria:

  1. Implement a new feature using the Vertical Slice Architecture pattern, ensuring it includes all necessary components (domain logic, data access, user interface) within the slice.
  2. Ensure the feature follows the single responsibility principle, isolating its functionality from other parts of the application.
  3. Provide documentation and examples within the codebase to illustrate how the Vertical Slice Architecture is implemented and how it benefits the overall project structure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, entry point, or concrete feature is named. Start by surveying the existing Java design-pattern examples and project structure, then determine where a vertical slice could fit and how its documentation and example would be verified. The issue is stale and requires design decisions before implementation can begin.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.