The Artima Developer Community
Sponsored Link

Design Forum
MVC - Model View Controller

1 reply on 1 page. Most recent reply: Jun 7, 2005 12:12 PM by Shashank D. Jha

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Eduardo Bezerra

Posts: 1
Nickname: edubez
Registered: Jun, 2005

MVC - Model View Controller Posted: Jun 6, 2005 12:10 PM
Reply to this message Reply
Advertisement
I have a question about the MVC pattern.

Is it all right for the Model to communicate directly with the View
or should I use publish-subscribe to make any kind of communications
with the View ?

TIA,
Eduardo


Shashank D. Jha

Posts: 68
Nickname: shashankd
Registered: May, 2004

Re: MVC - Model View Controller Posted: Jun 7, 2005 12:12 PM
Reply to this message Reply
responding to Eduardo

> Is it all right for the Model to communicate directly with
> the View
> or should I use publish-subscribe to make any kind of
> communications
> with the View ?

View is subscriber to changes in model (publisher).

Or you may make another Handler class (subscriber) to model change (pubisher) that may take care of updating the view on specific events.

You are right. you should decouple them like mentioned.

regards,

------------
Shashank D. Jha
iCMG
e-mail : shashank@icmgworld.com
Phone : +91-80-98451 87302

Flat View: This topic has 1 reply on 1 page
Topic: design oral rules Previous Topic   Next Topic Topic: Database design

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use