Vertical slicing is a valuable Agile software development technique that can accelerate value delivery.
By incrementally building thin vertical slices of a product that integrate across application layers, teams can rapidly deliver working software for stakeholder feedback.
For Agile teams seeking to optimize value streams and leverage continuous delivery, vertical slicing is a vital technique.
In this article, we’ll cover vertical slicing in Agile in-depth including its key concepts, implementation best practices, advantages, and challenges.
We’ll also provide insights on maximizing its effectiveness to deliver higher quality products faster focusing on high-priority user stories and continually integrating them into a minimum viable product.
What is Vertical Slicing in Agile?
Vertical slicing is an Agile software development technique for dividing work into manageable pieces, where each slice represents a cross-section of the product that delivers value from the perspective of the end user.
Instead of completing entire layers horizontally before moving to the next layer, vertical slicing prioritizes delivering end-to-end product functionality incrementally.
For example, a vertical slice could allow a basic user registration and login flow before expanding to more complex platform features.
Here’s a more detailed breakdown:
- End-to-End Functionality: The key idea of vertical slicing is to deliver a piece of software that works end-to-end, but with a limited set of functionality. This contrasts with a “horizontal slice” where you would build out one layer of the system (like the database) in its entirety before moving on to the next layer.
- User Value: Each slice should deliver value to the end user. This helps ensure the development team is always working on the most valuable features first.
- Size: Slices should be small enough that they can be completed in a single iteration (typically 1-2 weeks in Agile methodologies). If a slice is too large to complete in a single iteration, it should be broken down further.
- Independent: Ideally, each slice should be independent of others, in the sense that it can be developed, tested, and deployed without having to wait for other slices. This is not always possible, but it’s a good goal to strive for.
Vertical Slicing Architecture
Imagine your product as a cake. A vertical slice would be like cutting a piece from top to bottom, rather than just skimming a layer off the top.
Each slice has a bit of all the layers from the user interface at the top, through the business logic in the middle, down to the database at the bottom.
With vertical slicing, each Product Increment delivered provides a thin vertical slice that spans the UI, business logic, data access, and persistence layers needed to enable specific user interactions and value.
Key Principles of Vertical Slicing in Agile
Here are the key principles of vertical slicing in Agile:
- Structuring Sprints around end-to-end vertical slices rather than components
- Maintaining a focus on the highest business value user stories
- Building thin slices with just enough code to implement essential features
- Validating each slice through continuous integration and testing
Vertical Slicing Agile Example
Here’s a simple example to illustrate the concept. Let’s say you’re building an e-commerce website. A vertical slice might be the ability for a user to view a product.
This would include everything from the user interface (the product page), to the business logic (retrieving product details), to the database (storing product information).
Another slice might be the ability to add a product to the shopping cart. Each of these slices delivers value to the user (they can view a product, or add a product to their cart), and together they start to form the complete product.
Implementing Vertical Slicing in Agile
The key to gaining the benefits of vertical slicing is effective implementation within an Agile development process.
Here are some best practices for structuring user stories, Sprints, and workflows to enable incremental vertical slice delivery:
- Prioritize user stories that will enable thin vertical slices of critical product functionality. Avoid packing too many features into each slice and focus on just enough scope to provide value.
- When planning Sprints, structure the increment around delivering a complete thin slice. All necessary components to build, test, and release the slice should be included.
- Ensure each slice meets the defined Definition of Done criteria before moving to the next. This includes appropriate unit, integration, and user acceptance testing.
- Leverage continuous integration and automation to frequently build/test slices. This catches issues early and reduces risk.
- Manage dependencies between slices using Scrum of Scrums techniques if working across teams. Coordinate on interfaces and data.
- With larger teams, break vertical slices into thin “strands” owned by sub-teams. Reintegrate for a demoable product increment.
- For complex systems, implement architectural spikes or enablers ahead of time to support slice development.
- Use pair programming and test-driven development (TDD) to drive quality within each vertical slice.
- Gather user feedback on each slice to validate capabilities before moving forward, and adapt the backlog based on findings.
- Refactor common components needed across slices into libraries for reuse. Avoid duplicating code.
- Automate and extend tests over time to cover core platform capabilities and integration points.
- Monitor slice scope creep and complexity. Split stories if slices become too large.
Enterprise Agile scaling with vertical slicing requires additional coordination which entails:
- Plan slices across multiple scrum teams to manage dependencies.
- Architect modular services so slices can be built independently then integrated.
- Establish coding standards and manage dependencies through artifact repository.
- Schedule frequent Scrum of Scrums to Demo slices and coordinate.
Advantages of Vertical Slicing
Adopting a vertical slicing approach provides several key advantages for Agile teams and products including:
- Accelerates Time-to-Market: Thin vertical slices enable earlier delivery of incremental working software vs. traditional waterfall development. Rather than waiting months for all layers to be built, critical user functionality is live in weeks.
- Focuses on Business Value: Slices are defined around high-value user stories. This keeps teams focused on capabilities that directly deliver ROI and customer benefit.
- Provides Earlier Feedback: With thin slices released frequently, user feedback is gathered early and often. This allows for course correction and risk reduction.
- Reduces Integration Risk: With each slice integrating through all layers, integration issues surface incrementally rather than at the end and there are no big-bang releases.
- Enables Continuous Delivery: Small frequent slices can be automated for continuous build, test, and deployment which speeds up release cycles.
- Drives Innovation: More frequent experimentation and learning cycles allow for greater innovation, creativity, and motivation.
- Increases Responsiveness: Shorter iterations and access to feedback data allow teams to respond quickly to changing customer needs and new opportunities.
- Improves Quality: Continuous testing and incremental development lead to a higher quality compared to deferred quality practices.
- Provides Options: Multiple releases offer the product team options vs. having a single big-bang launch. The minimum viable product can be extended.
- Empowers Teams: Vertical slicing and end-to-end ownership lead to greater team autonomy, accountability, and pride in their work.
Vertical Slicing Challenges and Mitigation Strategies
While vertical slicing offers significant advantages, it also poses some challenges that must be mitigated. These include:
- Avoiding Overly Thin Slices: Slices need sufficient functionality to provide value. Over-slicing wastes effort on managing/testing too many increments.
- Managing Dependencies: Slices may require foundational components to be built first or require coordination across teams.
- Integrating Diverse Systems: Connecting slices across legacy systems, databases, and APIs can add complexity.
- Refactoring Monoliths: Breaking down large legacy codebases into vertical slices requires time and architectural planning.
- Preventing Scope Creep: Strict prioritization and scope control are needed to prevent overly large slices and diluted focus.
- Coordinating Teams: If multiple teams work on slices, strong communication and leadership are key.
- Testing Completeness: Testing increments for functionality, security, integration, etc. is resource-intensive. Automation helps.
- Sustaining Cadence: Prioritization and planning must be ongoing to sustain rapid slice delivery over the product lifetime.
Here are some mitigation strategies:
- Carefully map dependencies between slices during Sprint Planning and build enabler components first if needed.
- Leverage continuous integration and delivery pipelines to ease system integration.
- Implement robust DevOps practices and infrastructure automation to streamline slice delivery.
- Use Scrum of Scrums to coordinate complex slices spanning teams and systems.
- Enforce standards for loosely coupled architecture and establish API contracts early.
- Introduce test automation early and expand coverage over time to handle regression testing.
- Assign an integration architect to oversee end-to-end slice integration and dependencies.
How Vertical Slicing Complements Agile Methodologies
Vertical slicing complements Agile frameworks like Scrum, Kanban, and Extreme Programming (XP) by enabling fast, iterative delivery of integrated increments that directly enable stakeholder value.
It can be implemented by structuring user stories and sprints around priority features that cut vertically through the architecture. The incremental slices then integrate into a minimum viable product (MVP) ready for stakeholder feedback.
Vertical slicing complements popular Agile frameworks like Scrum, Kanban, and XP in the following ways:
- In Scrum, vertical slices can be mapped to Sprint Backlog items and user stories to deliver end-to-end increments each Sprint.
- Kanban’s focus on work-in-progress limits ensures vertical slices move smoothly across the delivery pipeline without bottlenecks.
- XP’s engineering practices like continuous integration, testing, and pair programming enhance vertical slice quality.
- Vertical slices align with the Scrum value of delivering working software every Sprint.
- Frequent vertical slice delivery provides fast feedback in keeping with Agile principles.
- Integrating slices vertically facilitates the continuous flow emphasized in Kanban.
- Rapid iterations enabled by slicing fit with XP’s focus on rapid development cycles.
- Vertical slicing improves visibility which aids in Scrum Sprint Planning and Kanban workflow management.
- Thin vertical slice scope avoids overburdening an iteration, avoiding situations that reduce XP’s engineering agility.
Vertical Slicing vs Horizontal Slicing Agile
Vertical slicing and horizontal slicing represent two different approaches to incremental delivery in Agile software development.
Let’s compare them head-to-head to highlight their distinctions.
1. Release Cadence
With vertical slicing, incremental releases can be delivered within weeks based on sprint cycles because each slice produces an integrated product increment ready for release which supports continuous delivery.
In contrast, horizontal slicing does not generate releasable increments until entire application layers are built, which may take months depending on scope.
2. Feedback Loops
The fast iteration cycles of vertical slicing accelerate user feedback by delivering working software frequently for validation. Issues can be caught early.
Horizontal slicing defers user feedback until after significant work has been completed within each application layer. Integration issues may surface late.
3. Value Delivery
Vertical slicing prioritizes the highest business value user stories for inclusion in early slices, optimizing for early value delivery.
Horizontal slicing works through layers sequentially and may implement lower-priority features or infrastructural components first before getting to critical user functionality.
4. Quality
Vertical slices incorporate automated testing and other quality practices to catch defects rapidly as small increments are integrated.
Quality is built-in through the process. With horizontal slicing, bugs may accumulate within layers and most testing is deferred to the end when layers are combined.
5. Coordination
Vertical slicing requires coordination across functional teams to deliver integrated slices spanning architecture, dev, QA, ops, etc.
Horizontal slicing allows these teams to work independently on layers before eventual integration.
6. Architecture
Monolithic architectures with tight-layer coupling fit a horizontal approach. Loosely coupled services and components enable vertical slicing by isolating dependencies. Refactoring may be needed to vertically slice monoliths.
Conclusion
For Agile teams seeking to deliver value faster through working software, there are a lot of benefits from implementing vertical slicing.
Incrementally building thin vertical slices that integrate across the full technology stack enables teams to achieve rapid iteration cycles, early feedback, and continuous delivery of increments that directly enable stakeholder priorities.
Although it requires skill to implement well, this article provides a framework of best practices and mitigation strategies for maximizing the effectiveness of vertical slicing.
For any organization striving to increase its Agile maturity, leveraging vertical slicing techniques should be strongly considered as a way to deliver higher-quality products in less time.
FAQS
Why Vertical Slicing of User Stories?
Vertical slicing aligns development efforts to deliver thin vertical slices of user story functionality across the full stack.
This enables iterative development, continuous user feedback, incremental delivery of working software, and agility to adjust based on empirical data.
What is the Difference Between Vertical Slice and Demo?
A vertical slice delivers a thin end-to-end slice of real production code across the full stack that provides actual working functionality while a demo creates simulated functionality purely for demonstration purposes, usually only across a single layer like the UI, without integrating real components from other layers like the database.
The purpose of a vertical slice is to incrementally build out the actual system, while a demo aims to showcase an idea.
What is the Difference Between Prototype and Vertical Slice?
A prototype rapidly creates an experimental implementation to validate concepts, usually involving shortcuts like hard-coded data.
A vertical slice on the other hand delivers production-quality code in a thin end-to-end, full-stack increment that provides actual working functionality.
Prototypes are disposable while vertical slices build up the real system incrementally. Prototypes answer questions while vertical slices deliver working software aligned to requirements.