Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC Controller vs listener

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone explain the difference between an MVC controller and an
event listener?

Thanks.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A big role of the controller is to "interpret user gestures" into some kind of action. In a Swing it is an event listener in this job, though maybe not exactly an AWT/Swing event listener. In MVC2, as seen in Struts and other web models, is a servlet an event listener? If a request coming in from the browser is an event, sure.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's like the difference between an ambulance and an automobile - in many circumstance, an ambulance *is* an automobile, but if you are on sea, it's more likely to be a ship.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic