• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

MVC - Use of Observer & Observable.

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Inorder to implement the MVC architecture in the assignment, I would like to know whether using Observer & Observable model recomended or not.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Muthaiah Ramanathan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Muthaiah,

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.

Regards, Andrew
 
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic