1 | initial version |
According to Uncle Bob's Clean Architecture principles, the creation and instantiation of objects should be done outside of the business logic, preferably in a separate layer such as the infrastructure layer. This separation ensures that the business logic remains decoupled from any external libraries or frameworks, making it easier to test and maintain. Therefore, an instance of a stream or any required object should be created in the infrastructure layer and injected into the appropriate use case or presenter as needed.