The Observer pattern is of course recommended for use with MVC. However, for this assignment it may be considered out of scope. I was concerned about providing server-side callbacks to remote clients for update purposes whenever a change was made to the database file by any client. But, the consensus on this forum is that it is not necessary for this project to implement this functionality.
Again, any extra functionality you put into your project will not earn you any extra credit points - and there is the added risk of more things that could go wrong during examination if you submit an elaborate solution. Although an elaborate solution is not prohibited.
posted 13 years ago
I have started the project without the Observer & Observable pattern, but suddenly when I saw it, I was bit confused whether to include them or not. Now that it is said to be out of scope let me not burden myself.
In that case is the following design aceptable? But I am concerned that there is no interaction with the View and the Controller.
Any clarification would be really appreciated.
[Andrew: put diagram between [code] and [/code] UBB tags] [ May 17, 2005: Message edited by: Andrew Monkhouse ]
SCJP 1.6, SCJD, SCWCD, SCBCD.
Be nice to people on the way up cos, you'll need 'em on your way down - From somewhere I can't remember!
There are many ways of implementing the MVC pattern. One of them has the Views registering themselves as Observers of the Model. This can work very well, especially when you have multiple views/controllers all connected to one model - any change to the data will be reflected in all the views.
Whether you should use it or not is more difficult to answer. It is more important for you to decide what benefits it will give you/might give you in the future versus what benefits will be gained by not implementing this. You can then explain your choice in your design decisions document.