Reputation: 19607
I'm adding some code to my project that allows drag and drop.
The Form used for the actual dropping is obviously part of the view/presentation layer. However, there's a question mark on a TransferHandler
class that contains the actual logic which detects and validates objects dropped on the window.
Considering I have presentation, logic and data layers, where could this class be placed in the structure?
Upvotes: 0
Views: 86
Reputation: 1999
Which class is the information expert, meaning the class with the most information pertaining to the operation? It seems like the presentation layer contains the class that is the information expert, thus it would be reasonable to place the code there. Should this action affect domain objects though you may want to look at implementing a use case controller which would be called from the presentation layer.
Upvotes: 1
Reputation: 43098
I would suggest a presentation layer, but creating some package for example util
, which will contain all classes you use to help your view features like drag-adnd-drop.
Upvotes: 2
Reputation: 240880
If it is totally related to presentation layer, then at presentation layer.
or if the same thing is needed when your presentation changes than at logic (service) layer.
Upvotes: 3