Breaking down the application requirements
There isn’t a universal right way to break down the requirements of the application you are making; however, there are typically two different styles – the bottom-up style and the top-down style.
In the bottom-up style of TDD, developers start by writing tests and implementing functionality for the smallest and most fundamental components of the system. This approach emphasizes the construction of individual units or classes, thoroughly testing them before integrating them into higher-level components. It provides strong validation for the underlying parts of the system and helps in creating a robust foundation.
However, this style might lead to challenges in integrating the components if the bigger picture and interactions between the units are not carefully considered.
Back to the online pizza store, we can break the whole page down into the following tasks:
- Implement a single
PizzaItem
component with a pizza...