appyx icon indicating copy to clipboard operation
appyx copied to clipboard

Create ParentNodeViewBase as interface to allow customisations in builders become more flexible

Open sfeatherstone opened this issue 3 years ago • 0 comments

Views are difficult to subistute when ParentNodeView<> is an abstract class. Making ParentNodeView<> an interface would fix this.

Case 1 In a Builder class you are expected to pass the view as ObservableSource<Event>, Consumer<ViewModel> to the Interactor and as ParentNodeView<> to the Node. If I want optionally pass in the view when created as a testable mock from a test build I can't without sharing the concrete type.

Case 2 View Customisations

The example for Customisations has the factory returning a NodeView. This would not satisfy the requirements above for a builder. Again to abstract this I would want to create a interface that has ObservableSource<Event>, Consumer<ViewModel> and ParentNodeView<> as an interface.

sfeatherstone avatar Aug 11 '22 08:08 sfeatherstone