• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Design flow question ?

 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am new to JSF's. So it may be very basic question, but i need to confirm that its correct.

for my application i am thinking following flow :-

JSF - > Managed Bean - > Controller -> Facade - > Business Delegate/Manager classes.

Is anyone see any issues with this flow ?

This will be very high level flow.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. First of all, that's not "flow", it's architecture. Secondly, it's more like this:

View -> JSF (Controller) - > Managed Bean(s) (Model) - > Business Delegate/Manager -> Persistence Layer, etc.

JSF is a fairly faithful representation of the MVC achitecture.

In many cases, my Managed Beans are façades or decorators for some other types of support beans (often Object Model beans), so the Model layer may have levels within it.
 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim for the reply.

View -> JSF (Controller) - > Managed Bean(s) (Model) - > Business Delegate/Manager -> Persistence Layer, etc.

My only concern here is Managed bean directly calling the Business Delegate/Manager. If in future we need to change business delegate then that will impact the presentation Tier also isn't ? and will it not be tight coupling then.

Sorry i am new JSF, so may be I need go back and read more...but this is just my first thought on looking at above architecture.

 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your Mileage May Vary. If so, adjust as needed. In my case, the app usually exists to "do business", so the business layer is actually one of the items less likely to change. The UI, on the other hand, is subject to adjustments based on feedback. The Backing Model normally mitigates the changes to keep the business layer independent of UI changes.

A lot of it depends on how you define your terms, though.
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am also new to JSF, my background was in Struts 1 & 2, need to learn JSF because of my new job that company currently use JSF frame work.

My question is, what's a JSF Controller if the managed bean is the Model layer? Can you give me some examples of what a JSF controller class should look like. Pesudo code would be just great
 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The primary JSF controller is the FacesServlet. The secondary controllers are the display element tags. Technically, things like the validators and converters are part of the controller infrastructure as well.

Unlike desktop GUIs, you usually don't code much controller logic in JSF. The most noteworthy exception is if you code listeners. Which a lot of people do to excess. But that's another story, and I think it comes in part from the fact that obsolete documentation often lingers on the Internet to the detriment of more modern information.
 
Good heavens! What have you done! Here, try to fix it with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic