| Article: |
A Generic MVC Model in Java | |
| Subject: | MVC using Generics | |
| Date: | 2004-07-13 19:31:34 | |
| From: | staypufd | |
|
While your example is nice at showing how I can use Generics to do MVC, it overlooks one thing. MVC systems were designed to a much weaker binding. Your example shows how we can use generics to make sure that those listening implement a certain interface or are a certain kind of class, but MVC in it's original form only required that any registered listener implemented a 'update' method and that method included who was the sender of the 'update' method. That way the reciever could call back to the object that changed. This lead to very weak coupling and the only method anyone needed to implement 'update' and model objects just had to say they changed and listeners would get notified.
|
||
Women in Technology
Hear us Roar
