>>You can find descriptions of both MVP and PM at
>>http://www.martinfowler.com/eaaDev/OrganizingPresentations.html
[quoted text clipped - 3 lines]
>>in Swing in combination with the PM pattern.
>>See http://www.jgoodies.com/articles/
> According to you what is fundamentally the difference between
> Presenter and Controller? [...]
I think Martin Fowler describes this well in this writing:
http://www.martinfowler.com/eaaDev/OrganizingPresentations.html
> Why do you assert that MVC is only for components? e.g.
> Visual C++ applications use MVC Pattern, Java Web and
> Swing applications as well employ MVC.
More precisely: MVC is better for components,
MVP and PM are better for applications. In Smalltalk
where MVC was invented, whole apps were built with MVC.
Since modern toolkits already handle fine grained events,
the application's presentation logic can focus on
coarse grained events that lead to operations on
the domain or presentation state.
And yes, you can build a Swing application that uses
MVC. But no, Swing itself doesn't use MVC; instead
it uses a variant of MVC. For example in Swing the
painting code and the event handling is not separated,
it is typically done in a single class, the UI delegate.
You can find some diagrams about the difference between
MVC and the variant used in Swing in my presentations
"Desktop Patterns & Data Binding" as well as in
"Data Binding for Swing" at http://www.jgoodies.com/articles/
- Karsten
Casper - 07 Sep 2005 16:33 GMT
Thanks to all for the answers. :)
Regards,
Casper