Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC: how to implement hooks

 
Gytis Jakutonis
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
one more post on MVC. I identified several options to implement hooks for View->Controller events.
  • use ActionListener - common solution
  • use Action - more usable IMO, since we can attach Action to many components(menu, buttons) and events(keystroke)
  • use CustomListener - not tied to swing, but definitely tied to custom logic(custom event types, constants etc.)


  • I'm considering to go with Action solution, but in such case Actions are instantiated in Controller, and Controller specifies Action name, icon etc. - properties, which are gui specific. Any comments? Thanks.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic