aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes MVC Controller vs listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "MVC Controller vs listener" Watch "MVC Controller vs listener" New topic
Author

MVC Controller vs listener

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
Could someone explain the difference between an MVC controller and an
event listener?

Thanks.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
 
subject: MVC Controller vs listener