Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

In JSF - what is the MVC?  RSS feed

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

In the JSF framework , what is the MVC?

I dont understand why the backbean are cosider as the model they couple to the view.
change in them will required change in the view.

Thank you
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some good explanations of the MVC principle, and how it relates to Java web apps, can be found at http://faq.javaranch.com/java/Model1Model2MVC and http://www.javaranch.com/journal/200603/Journal200603.jsp#a5
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by avihai marchiano:

change in them will required change in the view.


That's pretty much true anyway. After all, the View is a display of the Model.

JSF is about the purest implementation of MVC you'll find for J2EE. No web-based application can be 100% pure MVC, since in true MVC, changes in the model should be postable back to the view, and HTTP protocols don't allow a server to send unsolicited data, though you can fake it with AJAX or timed page refresh.

But aside from that limitation, JSF backing beans contain only a small amount of Controller code, if any. The Controller is almost entirely in JSF tags and in the JSF infrastructure.

So it's pretty close.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!