• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC: Automatic Update of View a MUST?

 
Bob Wheeler
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • 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
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
 
satishkumar janakiraman
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • 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
 
Matheus Mendes
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic