This is a general situation which I will illustrate with a scenario form my solution
* BO = a Product
* The £ Selling Prices of Products can be changed
* By selecting those to be changed in a List View of all Products
* And using a SingleChoiceAction which has several ChoiceItems e.g. "change by £" "Change by %"
To implement this I need a WInUI and also an ASP View Controller because:
* the Grid multi-select and so on needs to be set
* SelectionChanged event and so on need to be handled
There are 5 elements to the View Controller Code:
- Set up Single Choice Actions - event handling etc
- Set up the Grid and Grid Events
- Interact with the user - users confirms to update, show user results of update and so on
- Handle the Choice Action execution (do the updates)
- Localisation of captions & messages shown to users
Of these 5 elements only 2. is Platform specific.
What is the best design pattern to avoid duplicating the code for the other 4 ?