iluwatar / iluwatar/java-design-patterns
Vertical slice architecture
Nobody has claimed this yet.
- 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:
- Jimmy Bogard on Vertical Slice Architecture
- Gary Woodfine on Implementing Vertical Slice Architecture
Acceptance Criteria:
- 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.
- Ensure the feature follows the single responsibility principle, isolating its functionality from other parts of the application.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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