Introduction to Vertical Slicing and Horizontal Slicing
Agile is all about delivering value incrementally and iteratively. Gone are those days where teams develop and deliver features once in 3-6 months. Teams in these modern days, plan just enough, develop small increments and continuously deliver small features which can be used by the users. But one of the major problems the teams face today is when the requirement is too big to deliver in an iteration. We have seen a lot of teams breaking a story based on the skillset of components involved like, Design story, frontend story, backend story and then QA story with the intention of completing some part of the story. But is this the right approach? While completion of some part of the story is a good intention, what can be demoed to the product team at the end of the iteration? Are the answers:
- Screens and UI? Can the users use it?
- Backend APIs? What feedback can we get on that?
- Can we demo the story without testing? Because the QA story is to be picked up in the next sprint?
Well, it does not add value to anyone if these are your increments. This is a glorified waterfall approach trying to fit in agile frameworks. Slicing a requirement in agile environments needs to be done to cater to incremental delivery rather than justification of efforts. And this blog is all about that. This blog aims at exploring:
- What is slicing of user stories?
- How can slicing of user stories help teams?
- What is Agile vertical slicing and horizontal slicing?
- Some practical user story slicing techniques and tools
What is slicing In User Stories?
Agile story slicing in simple words is nothing but the art of breaking a big work item (Epics / user stories) into smaller, manageable and deliverable pieces. The idea is to break a big user story into smaller pieces to fit into one iteration that delivers a part of the value.
When the requirements are too big and the teams are unable to deliver that is say one iteration, teams use slicing techniques with the goal to create stories that are small enough that can be estimated, developed, tested and delivered incrementally while still providing value to the end user or the customer.
For Example: Imagine a team trying to deliver account management in an instagram application which is too big, the intention of slicing is to break that big story into multiple smaller chunks like say:
- Story to recover password
- Story to update profile pic
- Story to update personal information
The golden question is, “If the entire account management takes more than a sprint’s time to deliver, can 1-2 of the above smaller stories can be delivered in the current sprint and still be used by the user?”.
Evolution of slicing techniques in agile methodologies
With traditional/waterfall approaches the teams developed a product by developing database first and then developing the backend followed by frontend and then integration along with testing. This is a typical horizontal slicing technique going by the skillset or the components involved in a requirement and often led to integration issues and delayed feedback.
But as teams and organizations adapted to agile ways of working they shifted their focus to deliver customer value early and often, the teams began to use vertical slicing techniques. The evolution is still not uniform. Different industries, team structures and project types have various mix of slicing approaches. The idea is to understand the system and slice the requirements such that there is value delivery after every iteration.
Over the course, slicing has not just become a technique, but a mindset that values user feedback, incremental progress and not just effort utilization.
The impact of slicing on project success
When the stories are sliced in the correct way, you can release them at the end of every iteration. Or at least demo it to the product team to get feedback. Bad slicing leads to delayed value delivery, delayed feedback cycle etc.
When teams slice the stories with the intention of value delivery at the every sprint they can:
- Deliver working features faster
- Reduce integration concerns
- Get user feedback early
- Adapt to changes efficiently
- Reduce waste or rework
- Brings in the sense of accomplishment after every sprint
Example User Story for Reference in the Blog:
Story: As a user, i want to login using email and password, so that i can buy a product
Acceptance Criteria:
- Login must happen for valid credentials
- Error must be thrown for invalid credentials
- Password must be validated for special characters and count
- Email ID format validation must happen
- 500 users must be able to login at the same time without breaking the system
- Login must happen within 3 seconds
Understanding Horizontal Slicing
Definition and core principles of horizontal slicing
The core principle behind horizontal slicing is breaking down user stories based on the components involved or skill set of the people. Imagine slicing a sandwich by separating the bun, lettuce, tomato and the patty into layers and working on each component individually before combining them. It is when teams focus on their expertise and work on them in parallel. When a big story is horizontally sliced, smaller stories may include:
- Story for database changes
- Story for API and backend development
- Story for UI
- Integration story
- Testing story
When horizontal slicing in agile makes sense?
While horizontal slicing in agile is not ideal for most scrum teams, it makes sense:
- In the initial infrastructure setup
- For research spikes or groundwork
- In common shared teams like database teams, security teams, UI/UX teams etc
Horizontal slicing of user stories: implementation strategies
Implementing horizontal slicing requires careful consideration of other dependent teams and coordination between them. If you were to horizontally slice a story:
- There are clear definitions – Define strict API and contracts. This allows teams to work in parallel assuming the integration will be smoother
- Mocking and Stubs – Frontend teams might use mock sample data or stubbed APIs to continue their work. This ensures team’s productivity but does not provide end to end functionality
- Phased Layer delivery – Instead of delivering the entire database, deliver the first version with the core aspects and then move to the next layer
Benefits of Horizontal Slicing
Even though horizontal slicing in agile is not recommended, it gives benefits in certain context mainly in traditional, large scale specialised environments:
- Expertise in technology – Teams can become highly efficient in specific layer of technology like database, backend etc which leads to deep technical expertise.
- Optimised resource utilization – In theory, you can fully utilize a team of backend experts on all backend work before moving them to other projects
- Predictable domain/component development – For domain teams or isolated teams, delivery with horizontal slicing can prove to be more predictable
Understanding Vertical Slicing
What is vertical slicing in agile?
Vertical slicing in agile is an approach of breaking down big work focussing on delivering a small end to end piece of functionality that provides value to the user. The idea is that this small piece of work may be a part of the big story but is fully functional from the user’s perspective. They can perform an action, systems can respond and a transaction can be complete. Imagine creating small versions of the burger with all layers of lettuce, patty, tomato which gives a taste of how the actual big burger is. For the Example Story mentioned above, smaller stories sliced would be:
- As a user, i must be able to login with email and valid password so that i can buy a product
- As a system, I must validate the email and password format, so that i can allow login to happen
The thin vertical slice agile approach explained
The “thin vertical slice” is a core concept of agile story slicing. It focusses on making each slice as small as possible but still ensuring delivering value. The goal is to minimize the amount of work in progress and maximise the frequency of feedback. The basic mindset behind thin vertical slices is to find the absolute smallest increment that provides value. Instead of building the whole authentication, thin slices could be, Login with email and password, forget password, create account and social media login. Teams when they slice vertically will have to ensure:
- Each slice cuts across all architectural layers from UI, backend to external integrations
- Each slice should deliver value. That is the user must be able to do something with it
- Each slice should be independently testable
- Each slice should be independently releasable
- Each slice should fit within a sprint
Benefits of agile vertical slicing
The main benefit of agile vertical slicing is that it directly aligns and promotes agile principles.
- Early and continuous value delivery – Teams can deliver working software frequently getting features into user’s hands
- Faster Feedback loop – User and stakeholders can provide feedback on real working functionality early in the process without having to wait till the end
- Reduces risk – By delivering small and testable chunks, integration issues and technical challenges can be caught much earlier
- Easier Testing – Each slice is independently tested making testing process more efficient and reduces the blast radius
- Predictable process – It is easy to estimate small work and does not take much time also easier to track progress when working with small and consistent chunks
Implementing vertical slices in different project types
Vertical slicing is not only for software development or projects. It can be applied across project types. The key is to always look for the smallest complete flow that delivers value or addresses a specific problem of a user. Let’s see where can vertical slicing in agile be implemented:
- New product development – Best fit for agile vertical slicing. Allows for rapid iteration and market validation early
- Feature Enhancements – Instead of changing an entire module, deliver a small slice of the feature and increment it over time
- Refactoring – Even refactoring can be sliced vertically. Example: As a developer, i want to refactor the payment logic so that it uses the new library without changing the user facing functionality
- Maintenance and bug fixes – A bug itself is a vertical slice. It goes through the full cycle to fix a specific issue
Comparing Vertical Slicing and Horizontal Slicing
Agile Vertical slicing and horizontal slicing in agile are two different approaches in breaking down a work item with significant difference in output. Below is a table to compare them both,
Aspect | Horizontal Slicing | Vertical Slicing |
Focus | Architectural layers (Backend, Frontend, UI, QA) | End to end user functionality / value |
Team Structure | Specialised silo teams | Crossfunctional teams |
Value Delivery | Big Bang at the end of the feature completion | Incremental and continuous |
Risk | High integration risk and late realisation of issues | Lower risk and issues identified early |
Feedback | Late and at the end of the feature delivery | Early and continuous on working software |
Testing | High volume testing and a phase of the delivery | Easier and continuous testing of small volume work |
Visibility of progress | Low, hard to see the working software till the end | High and working software progress after every sprint |
Ideal for | Component development in specific silo environments | Delivering value continuously |
Practical User Story Slicing Techniques
Effective story slicing techniques in scrum
In Scrum, the idea is to get stories “Done” within a sprint so that at the end of the sprint there is some value delivered to the customer or at least a demo given to the product team. Below are a few techniques to split a user story:
- Happy path first – Do not try to build every edge case, error handling or validation in the first slice. Split validations and error handling into smaller separate stories
- Split based on CRUD operations – If you have create, read, update and delete functionality, split them into 4 smaller user stories
- Split based on business rules – If a story has multiple business rules, consider delivering one rule at a time and later increment more business rules
- Roles and Permissions – Instead of building all roles and permission upfront, start with the most basic user role and build the others incrementally
- Data Types – If your user story involves multiple data types, split them based on them to continuously deliver
- Use Spikes and Slice – If a user story is truly massive and complex, a short timeboxed spike (Research) can help understand unknowns enabling for better slicing later
Please refer to our blog on techniques to split user stories for more details and examples.
Horizontal slicing of user stories: step-by-step guide
While horizontal slicing in agile is not recommended generally for user facing features, if at all you have to, here is a step by step guide to split a work item.
- Identify the architectural layers – Define the distinct layers involved like database, API, UI, Testing, Business logic
- Break down the layer – For a feature list all the tasks required for each layer. For example: Creating logging tables, implement login API, integration of UI with the API, testing etc
- Create stories for each layer – Create and assign stories to specialised individuals appropriately
- Sequential execution – Teams work on their specific layer stories often with dependencies between stories from other layers
- Integrate at the end – Once all the layers are complete, integrate then and testing is done to close the feature
Vertical slicing user stories: best practices
Below are a few points which you need to consider before vertical slicing of user stories.
- Start with the smallest viable chunk – Bare minimum things to deliver that can provide value should be the starting point
- Clearly define Done – For each slice ensure everyone is on the same page with respect to what Done means like story should be tested, bugs have to be fixed etc
- Involve the entire cross functional team – Slicing is a team effort, POs, SMs, Developers and QAs should work together
- Follow INVEST – INVEST framework of user story writing ensures the story is small, has value, can be testable, can be estimated and delivered within a sprint
- Iterate and refine – Slicing is not a one time event, as you learn more techniques it becomes a habit and can become better at it
Creating achievable thin vertical slice agile stories
- Start with a large user story / Epic – Pick up a good requirement for example “As a customer i want to manage my order”
- Identify the core flow – What is the most essential action a user needs to take like “As a customer i want to view the status of my order”
- Break down by steps – For example: View order, View order details, Cancel an order, Track shipment, Contact support
- Determine the minimum viable piece – What is the core functionality required to start with? Example: as a customer i want see the order is “pending”, “Shipped” or “Delivered” as basic functionality
- Define the tasks needed – For example: need order table with status field (Database), API to fetch the order status, Simple UI to display the status
- Repeat – Once the first slice is done, move to the next piece of work “As a customer, i want to click an order to see the detailed items”
Team Collaboration in Different Slicing Approaches
As mentioned above, both the user story slicing techniques have different outputs. Similarly the collaboration part also differs for both. Let’s understand this in detail.
Cross-functional requirements for vertical slicing
Agile Vertical slicing requires cross functional teams. For a single vertical slice to be completed, frontend developers, backend developers, database developers, QA, UI/UX designers need to collaborate continuously. Everyone in the team needs to be on the same page in terms of understanding the user story and the value it delivers.
Specialized teams in horizontal approaches
Whereas in horizontal approaches, teams are typically specialised by architectural layers. And not much collaboration is needed to understand the story but focus on their scope of work.
- Database team – Focuses only on database design and implementation
- Backend team – Builds APIS and business logic
- Frontend team – Mainly works on building user interfaces and user facing functionally
Communication strategies for each method
- Vertical Slicing:
- Requires frequent and direct conversations, whiteboards, pair programming and daily standups
- All communication revolves around getting the current user story to Done
- Constant communication with the product owner and stakeholders
- Horizontal Slicing:
- More focus on documentation, handoffs, formal review process
- Communication often revolves around technical details within specific layer
- Feedback from integration or end user come much later almost at the end
Overcoming siloed development challenges
If your team is transitioning from horizontal slicing to vertical approach, here are a few tips to overcome silos:
- Have the full team in one space to keep the communication efficient
- Build T-Shape mindset within the developers to understand the different parts of the tech stack
- Ensure the team is measured on delivering working software not just on completing their specific tasks
- Rotate team members through different layers to gain more knowledge on different tech stacks
- Bring in collective responsibility for the entire story not just their specific part
Implementing Slicing Techniques in Scrum
One of the main reasons teams go with slicing of requirements is to ensure there is agility. Slicing techniques promote a high level of agile principles in the teams.
Sprint planning with different slicing approaches
- Vertical Slicing in Sprint planning:
- The PO presents the prioritised, vertically sliced stories
- The entire team estimates the efforts for the entire slice not just their layer
- Team then commits for a set of sliced stories and plan their sprint
- Tasks are created for each part of the slice and the sprint starts
- Horizontal Slicing in Sprint planning:
- Teams might plan to complete a certain number of tasks like database, APIs, UI screens
- Dependencies between these tasks are noted to track them
- Teams do not commit for the value delivery rather just completion of tasks
The role of the Scrum Master in story slicing
Scrum master plays a very critical role in educating, enabling and empowering team members in effective slicing. Let’s see how,
- A SM guides the team and the PI in breaking down stories as a facilitator
- Teaches the team members on various techniques to slice vertically and why is it important as a coach
- Identifies and removes barriers that prevent the teams from slicing as a dependency remover
- Protects the team from external pressures that might push the team towards horizontal slicing as a protector
Agile ceremonies that support effective slicing
- Backlog Refinement (Sprint Grooming) – This is the core ceremony where the team with the product owner spends dedicated time to refine the work items including breaking down large items, creating spikes and ensuring the story is ready for development
- Sprint Planning – The sliced stories are presented and then the team commits to what they can deliver end to end
- Daily Scrum – Teams discuss the progress on stories and not just individual tasks with questions like “What did we achieve in this story yesterday?”
- Sprint review – The team members gives demo of the sliced stories to get immediate feedback
- Sprint Retrospective – The team reflects on how well they sliced the stories and where they need to improve
Measuring success with different slicing methods
Both the user stories slicing techniques provide different outputs. So the way we look at metrics for these techniques are slightly different. Let’s see the metrics which are generally captured for teams using these approaches.
- Vertical Slicing:
- Velocity – A measure of delivered value every sprint
- Cycle time/lead time – How long does it take for a story to go from “To Do” to “Done”
- Customer satisfaction – Direct feedback on delivered features
- Reduced bugs/rework – Smaller chunks tend to have lesser bugs
- Horizontal Slicing:
- Number of tasks completed by individual team members
- Integration issue count
- TIme spent on planned tasks – Planned vs actual effort
Tools and Technologies Supporting Slicing Approaches
There are a lot of tools in the market that support vertical slicing by helping teams to define, track and manage stories in their backlog. Let’s see a list of tools and their purpose in the real world.
Software solutions for managing vertical slices
- Jira, Azure DevOps, Trello, Asana – These tools help teams to create user stories, break them into smaller pieces, assign them to members, tracking and reporting. Basically to manage the backlog and ceremonies.
- Mural, Miro, mindmaps Whiteboards – These tools help teams in visual breakdown of large stories and epics into smaller pieces. Basically to collaborate and brainstorm
Tools that facilitate horizontal development
Teams can still use the above mentioned tools for their project management and reporting however, let’s look at some tools that are more about managing complex, interconnected components and layers.
- DBMS – Tools for designing, managing and versioning databases
- Postman, Swagger/Open API – API management tools crucial for defining and testing interface between the frontend and backend
- IDEs – These tools provide features for working within their specific layer. Example frontend frameworks with their own building tools
Integration and testing frameworks for both approaches
Agile and DevOps come hand in hand. Both are crucial for the teams to ensure continuous delivery and reduction of manual effort. Both the slicing techniques need a strong integration and testing framework to help teams deliver value.
- Continuous integration/Continuous Delivery pipelines like Jenkins, Gitlab, Github Actions help teams automate their build, test and deployment processes
- Automated testing frameworks like Slenium, JUnit/Nunit?Pytest enable teams to test and ensure good quality by reducing manual work
- Containerization (Docker) and Orchestration (Kubernetes) facilitates the deployment and management of microservices which align very well with vertical slicing
Conclusion
When it comes to being agile, what matters is delivering value continuously to get feedback quickly. And when the requirements are too big to deliver, it is always better to break it than waiting for it to complete. Slicing is more than just a technique, it is a mindset. The choice between agile vertical slicing and horizontal slicing in agile is not about finding the right approach. It is choosing what best fits in your context. In all our successful agile transformation it companies, what we constantly notice is that most successful teams understand both the techniques and can change their approach based on the need.
Vertical slicing is best when you need fast feedback and have crossfunctional teams. It promotes collaboration, reduces integration risk and provides multiple opportunities for feedback. Horizontal slicing works when you have specialised teams and complex technical challenges. It allows teams to use deep expertise and can enable parallel development. It becomes important to understand both the techniques and choose which suits you. The idea is to start somewhere and then refine your techniques rather than just waiting to perfect a technique and then pivoting. With this, our blog on “What is vertical slicing and horizontal slicing” comes to an end. We sincerely hope it has helped our readers to gain insights. Please write to us at consult@benzne.com for any suggestions or feedback or to avail Benzne agile consulting and training services.
Frequently Asked Questions on Vertical Slicing and Horizontal Slicing
1. What mindset shift is required for teams moving from horizontal to vertical slicing?
Moving away from horizontal to vertical slicing requires a huge mindset shift. The main one being “My work”, “My task” mindset to a more collective team level ownership of “Our story”. It requires individuals and teams to move towards delivering value collectively. This requires a lot of collaboration. Developers, QAs and designers must remove their boundaries and pair with other skillset people to move a story to Done.
2. Can horizontal and vertical slicing be used together?
Yes, both horizontal and vertical slicing of user stories can be used together. But the primary focus should always be on vertical slicing for user facing stories. Let’s see how both can be used in a team.
- Vertical slicing can be used to deliver user centric features
- Horizontal slicing can be used for foundational work like new database setup, spikes and enablers
- Some teams use horizontal slicing in sprint 0 for activities like environment setups, core infrastructure or even technology changes
- Some teams use horizontal slicing when the technical debts become more and more and also for refactoring of code
3. How do slicing strategies affect dependencies and integration?
Both vertical and horizontal slicing in agile have impact dependencies and integration differently. Horizontal slicing creates strong dependencies between teams and layers as one layer must be complete before the next can begin. Vertical slicing aims to minimize these dependencies by making each slice self contained, end to end unit of value. While vertical slices have internal dependencies it reduces external dependencies.