How to decouple your business logic from UI components?
The UI is a volatile and hard-to-test component. You don't want to have direct references of UI framework elements inside your automated code tests. So how can you decouple UI components from your business logic? In this article, we look at two patterns for extracting business logic from UI logic to increase testability in your application.