Recreating UseCase: Embracing a Fluent and Fun Approach (2023) | by Stephen Siapno | Aug, 2023
After delving into functional programming, I began to investigate ways to enhance my use case. I initiated the code below, which shares similarities with my second article on Fluent and Fun Clean Architecture. fun placeOrderUseCase(orderRepository: OrderRepository) {if (orderRepository.isLoggedIn()) {val cart = orderRepository.getCart()if (cart.isNotEmpty()) {if (orderRepository.hasEnoughFunds(getTotalPrice()))…
Mobile App Development
0
Fluent and Fun Clean Architecture using Kotlin — Part 2 (2023) | by Stephen Siapno | Jul, 2023
Functional programming is a powerful paradigm that emphasizes writing code in a declarative and expressive manner. In this approach, functions play a central role, and immutable data is preferred. Instead of using traditional object-oriented techniques, functional programming offers a different way of thinking about software…