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

Doubt about MVC for JSF (Strategy, Composite and Observer)  RSS feed

 
John Anaivs
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I know that a convencional MVC works with Design Pattern like that:
View - Composite/ Observer
Controller - Strategy
Model - Observer

Can I use the same model for JSF?

Thanks, Nato.
 
John Anaivs
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok... JSF uses Page Controller Pattern and to be honest I still don't know this pattern. Any other thoughts?

Thanks in advance, Nato.
 
Patricio Hervas
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nato, im also new to jsf.
I think its a good idea if you read chapter one of JavaServer Faces in Action.
There you can find a good explanation of some basics.
You can buy the book or you can read the free chapter at
http://www.manning.com/mann/

hope that helps
 
John Anaivs
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Patricio, it sure helps. But I also need take out some doubt meanwhile I'm going forward with my studies. Right know I need to know specific about this question. If you can help with this I really appreciate.

Thanks, Nato.
 
Patricio Hervas
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets see. According to the author of the book i mentioned, JSF implements
a variation of the MVC model defined as Model 2, which is specific to
web applications.
The model would be your javaBeans or EJBs.
The view would be the html/jsp/jsf tags and the controller would be
the servlet that helps the model and view interact.

Now, about the page controller pattern, this page
http://www.onlamp.com/pub/a/php/2004/10/14/page_controller.html
gives a nice explanation of the theory behind it. I dont know
enough of all this as to explain, so i recommend that you read it
so that i dont confuse you.

This page also has a good discussion about page controller
http://mail-archives.apache.org/mod_mbox/struts-user/200603.mbox/%3C425b63690603201808q6f29fceah4b6a162117b92b29@mail.gmail.com%3E

hope that helps Nato
 
John Anaivs
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks again Patricio. This help me so much. Nato.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!