|
From: Hans F. <ha...@fu...> - 2003-12-12 21:37:30
|
/* Quoth Jamis Buck <jg...@em...> on Fri, 12 Dec 2003 at 12:43 -0700 in <3FD...@em...> */ > >On the MVC issue, can anyone give me a good reason why view and > >controller are separate? Some suggest tightly coupling them and I really > >am having a hard time figuring out the benefit in keeping them separate. >=20 > For what it's worth, Danny and I have been taking 456 (GUI's) this=20 > semester, and Dr. Olsen is of the opinion that there is no added value=20 > in separating the view from the controller. He said that it used to be= =20 > done, but caused a lot more complexity for few additional benefits. =20 > Also, he said that the only reason for separating the view from the=20 > controller is if you want to reuse the controller or view independently= =20 > of one another (ie, attach the same view to a different controller, or=20 > vice versa). This happens extremely rarely. =46rom more reading I've done, I think another aspect at play is that what with the toolkits we have nowdays the controller aspect is usually extremely simple and very tightly coupled with the view (also done with the same toolkit. in fact some widgets are both controllers _and_ views). I just read about the Model-View-Presenter model[1] and I really like that approach. It almost exactly maps onto the four-layer architecture[2] as well. 1. http://www.object-arts.com/EducationCentre/Overviews/ModelViewPresenter.= htm 2. http://c2.com/cgi/wiki?FourLayerArchitecture --=20 Hans Fugal | De gustibus non disputandum est. http://hans.fugal.net/ | Debian, vim, mutt, ruby, text, gpg http://gdmxml.fugal.net/ | WindowMaker, gaim, UTF-8, RISC, JS Bach --------------------------------------------------------------------- GnuPG Fingerprint: 6940 87C5 6610 567F 1E95 CB5E FC98 E8CD E0AA D460 |