• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MVC: Automatic Update of View a MUST?

 
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have seen a lot of people here using the observer pattern (or something similar) to do an automatic update whenever a room is booked. Is this really needed? I don't see any must in the requirements. Or is it bad style not to use an observer on the MVC model?
I use the MVC pattern, but don't use any observer on the model. Whenever the user does something (booking/searching) I update the view. When a different client does the booking, the other client are not informed about that. Actually my view is independent of any network type.
So, do I loose points if I don't use the observer for the MVC model?

Thanks.
Bob
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy, Bob!

So, do I loose points if I don't use the observer for the MVC model?



Oh, no. Not at all. In fact, I didn't implement an observer. My JTable is only updated when the user books or search for rooms.
 
Bob Wheeler
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roberto Perillo wrote:Howdy, Bob!

So, do I loose points if I don't use the observer for the MVC model?



Oh, no. Not at all. In fact, I didn't implement an observer. My JTable is only updated when the user books or search for rooms.



Thanks. That was what I wanted to hear.

cheers
Bob
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bob,

And it's even better than what Roberto told you: you even can get a perfect score without using observer pattern

Kind regards,
Roel
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have also not implemented the Observer pattern. In my application user must click the retrieve button to get the latest data after updating or deleting the record.


sat
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On my point of view, try to implement an observer pattern is more error prone and could cost you some points if you do something wrong. I didn't used a observer and still waiting for my results ( 6 weeks and 1 day, lol )

Best regards and good lucky,
 
Bob Wheeler
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Matheus Mendes wrote:On my point of view, try to implement an observer pattern is more error prone and could cost you some points if you do something wrong.


Right. I'm with you.

Thank you guys for your responses.
cheers
Bob
 
reply
    Bookmark Topic Watch Topic
  • New Topic