Unlocking the Power of Vertical Slicing

July 6th, 2023

Discover the art of vertical slicing, the secret behind efficient Agile development. In this thought-provoking article, Radoslav Radoychev – Senior FE Team Lead at FFW – with his extensive experience, reveals the secrets of vertical slicing. 

Recently certified as a Professional Scrum Master (PSM), Radoslav takes you on an enlightening exploration of vertical slicing, a technique that revolutionizes Agile development. Drawing from his hands-on experience, he shares valuable insights, practical tips, and real-world examples on how to break down user stories into smaller, independent slices of functionality.

Vertical slicing involves breaking down a user story into smaller, independent pieces of functionality that can be developed and delivered incrementally. We will not go into high detail on the pros and cons of vertical slicing and what are all the ways to do that, as there are many sophisticated materials on this topic written by Agile professionals, however here we will outline a few points which to follow properly and determine how a story can be sliced.

Here are some possible ways to achieve perfect vertical slicing:

  1. Identify User Roles and Actions: Start by understanding the user roles and actions associated with the user story. Clearly define who will be using the feature and what specific actions they need to perform.
  2. Define Acceptance Criteria: Work closely with the product owner and the development team to define clear acceptance criteria for the user story. These criteria should outline the specific conditions that need to be met for the story to be considered complete.
  3. Identify Essential Functionality: Identify the core or essential functionality required to fulfill the user story. This functionality should be the minimum viable product (MVP) that provides value to the end user.
  4. Break Down by Workflow Steps: Analyze the user story and break it down into individual workflow steps or tasks. Each step should represent a logical progression towards achieving the overall objective of the story.
  5. Prioritize Functionality: Prioritize the functionality based on value and dependencies. Focus on delivering the most valuable and independent pieces of functionality first. This approach allows for early feedback and value realization.
  6. Consider Technical Dependencies: Analyze any technical dependencies associated with the user story. If certain functionality relies on other components or systems, ensure that those dependencies are accounted for and addressed during the slicing process.
  7. Split by User Interface (UI) Layers: If the user story involves a graphical user interface (UI), consider splitting it based on UI layers. This could involve separating the presentation layer, business logic layer, and data access layer into separate user stories.
  8. Slice Across the Stack: Instead of splitting based on UI layers, consider slicing the user story across the entire technology stack. This approach ensures that each layer of the system is represented in the sliced stories, allowing for a fully functional increment at each stage.
  9. Apply the INVEST Principles: Utilize the INVEST principles (Independent, Negotiable, Valuable, Estimable, Small, and Testable) to ensure that the sliced stories are well-formed and meet the characteristics of good user stories.
  10. Collaborate and Iterate: Involve the development team, product owner, and other stakeholders in the slicing process. Encourage collaboration and iterate on the slicing approach as needed to achieve the desired level of granularity.

 

Remember, the goal of vertical slicing is to deliver incremental value to the end users while minimizing dependencies and risks. By following these steps and applying Agile principles, you can effectively split a backlog story into well-defined, manageable pieces that can be delivered iteratively.

 

Let's consider an example user story and explore how it can be professionally sliced into smaller, vertically-sliced stories.

 

Example User Story:

A user wants to be able to search for products on an e-commerce website using various filters, such as price range, category, and brand, so that one can quickly find the items they are interested in.

Possible Vertical Slicing:

 

Slice by Basic Search Functionality:

  • Story: A user wants to be able to search for products by entering keywords in a search bar and viewing the search results.
  • Explanation: This story focuses on the core search functionality, allowing users to enter search terms and see relevant results. It does not include filters or advanced search options.

Slice by Price Range Filter:

  • Story: A user wants to be able to filter search results by price range to narrow down their options.
  • Explanation: This story introduces the ability to filter search results based on a specified price range. Users can set a minimum and maximum price and see products within that range.

Slice by Category Filter:

  • Story: A user wants to be able to filter search results by category to find products in specific categories.
  • Explanation: This story adds the ability to filter search results by selecting one or more categories. Users can choose a category or multiple categories to narrow down their search.

Slice by Brand Filter:

  • Story: A user wants to be able to filter search results by brand to find products from my preferred brands.
  • Explanation: This story allows users to filter search results by selecting specific brands. Users can choose one or more brands, and the search results will only display products from those brands.

Slice by Sorting Options:

  • Story: A user wants to be able to sort search results based on different criteria, such as price, popularity, or relevance.
  • Explanation: This story focuses on adding sorting options to the search results. Users can choose how they want the products to be sorted, allowing them to easily find the most relevant or desired items.

Here are more examples of different types of user stories that demonstrate the versatility of user stories and how they can be sliced to address various aspects, including functional requirements, technical improvements, architecture changes, and user experience enhancements:

 

Functional Story: User Registration

Story: A new user wants to be able to register an account on the website.

Slicing:

  • Story: A user wants to be able to enter their email and password to create an account.
  • Story: A user wants to receive a verification email to activate their account.
  • Story: A user wants to be able to provide additional information, such as name and profile picture, after creating their account.

Non-Functional Story: Performance Optimization

Story: A user wants the website to load quickly to provide a seamless browsing experience.

Slicing:

  • Story: Improve the server-side rendering performance by optimizing database queries.
  • Story: Implement caching mechanisms for frequently accessed data to reduce server load.
  • Story: Optimize frontend assets, such as JavaScript and CSS files, for faster loading times.

Architecture Story: Microservices Migration

Story: As a development team, we want to migrate from a monolithic architecture to a microservices architecture.

Slicing:

  • Story: Isolate a specific feature/module from the monolithic application as a separate microservice.
  • Story: Set up communication channels (e.g., REST API, message queue) between the microservices.
  • Story: Update the authentication and authorization mechanisms to work across the microservices.

Technical Debt Story: Code Refactoring

Story: A developer wants to refactor a codebase to improve its maintainability and readability.

Slicing:

  • Story: Refactor a specific class or module to follow coding best practices and naming conventions.
  • Story: Break down a large, complex function into smaller, more manageable functions.
  • Story: Improve test coverage by writing unit tests for critical parts of the codebase.

Usability Story: Enhanced Error Handling

Story: A user wants to receive clear and helpful error messages when something goes wrong.

Slicing:

  • Story: Identify common error scenarios and provide specific error messages for each scenario.
  • Story: Improve error handling for invalid user input by validating and providing detailed feedback.
  • Story: Enhance error logging to capture relevant information for troubleshooting purposes.

Infrastructure Story: Cloud Migration

Story: As an operations team, we want to migrate our infrastructure from on-premises servers to the cloud.

Slicing:

  • Story: Set up a cloud account and provision virtual machines for hosting the application.
  • Story: Migrate the application database to a managed cloud database service.
  • Story: Configure auto-scaling rules to handle fluctuations in traffic.

Security Story: Implement Two-Factor Authentication

Story: A user wants to enable two-factor authentication for added security.

Slicing:

  • Story: Implement the option for users to enable two-factor authentication and generate a verification code.
  • Story: Integrate with a third-party authentication service (e.g., Google Authenticator) for code verification.
  • Story: Provide fallback mechanisms for users who don't have access to their primary authentication device.

Improvement Story: Enhance Reporting Dashboard

Story: A manager wants to have access to more comprehensive and insightful reports.

Slicing:

  • Story: Add additional data visualizations (e.g., charts, graphs) to the reporting dashboard.
  • Story: Implement filtering and grouping options for more granular analysis of the data.
  • Story: Integrate with external data sources to enrich the reporting capabilities.

User Interface Story: Mobile Responsive Design

Story: A mobile user wants the website to be responsive and optimized for smaller screens.

Slicing:

  • Story: Adapt the website's layout and styling to ensure a consistent and user-friendly experience on mobile devices.
  • Story: Implement responsive navigation menus and buttons for better touch interaction.
  • Story: Optimize images and media for faster loading on mobile connections.

Knowledge Sharing Story: Documentation Improvement

Story: As a team, we want to improve the documentation to facilitate knowledge sharing and onboarding.

Slicing:

  • Story: Update existing documentation to reflect the latest system architecture and components.
  • Story: Create a comprehensive API reference documentation with examples and usage guidelines.
  • Story: Establish a knowledge base or wiki for sharing best practices, troubleshooting guides, and FAQs.

 

By vertically slicing the original user story, we create smaller stories that deliver incremental value and can be developed and deployed independently. Each sliced story represents a specific piece of functionality that can be implemented and tested separately, allowing for faster feedback and iteration.

It's important to note that the slicing approach may vary based on the specific context and needs of the project. The key is to focus on delivering incremental value and creating stories that are independent, valuable, estimable, small, and testable (following the INVEST principles).

 

In the end, what is best is what works for you and your cases. It’s not about strictly following every single rule from the methodologies and frameworks that have been implemented into your organization, but it’s about scaling and determining the best solution for the users, clients and developers.

Cookie