• 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

View Helper Pattern and JSF

 
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

I'm wondering about how View Helper pattern could be expressed with JSF.
Are Managed Beans and JSF tags the implementation strategies for View Helper using JSF applications?

My question is here because I've seen some apps where developers creates an additional class with all the components from a view mapped inside it either by String, Integer, Double or Date types either binding with UI components.
To me it seems like a form class from Struts, so I don't think it's the best way to model a JSF application and in some places this kind of class have been called View Helper.

Could someone give me some help to get those things clarified?

Thanks.


 
Saloon Keeper
Posts: 27763
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
I've seen far too many Views that were full of bindings and other stuff. I think it's because while JSF was being developed that was originally about the only way to do it, and the examples outlived their usefulness. The Internet is, alas, very good at that. I rarely use bindings. The whole point of JSF is to provide a simple interface to POJOs, but some people can't seem to tolerate simple. Well, I've been accused of that myself, buy when it comes to GUIs, I'd rather not go overboard.

In short, the ultimate "Helper" for JSF Views is JSF itself. All else is just icing.
 
Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:I've seen far too many Views that were full of bindings and other stuff. I think it's because while JSF was being developed that was originally about the only way to do it, and the examples outlived their usefulness. The Internet is, alas, very good at that. I rarely use bindings. The whole point of JSF is to provide a simple interface to POJOs, but some people can't seem to tolerate simple. Well, I've been accused of that myself, buy when it comes to GUIs, I'd rather not go overboard.

In short, the ultimate "Helper" for JSF Views is JSF itself. All else is just icing.



Tim,

do you think that people are using JSF like the way I said before because most of them are used with action based frameworks like Struts that have the ActionForm interface? Because a class to have only the components of the view seems to be an ActionForm...
What do you think about it?

Thanks in advance.
 
Tim Holloway
Saloon Keeper
Posts: 27763
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

Adolfo Eloy wrote:

Tim Holloway wrote:I've seen far too many Views that were full of bindings and other stuff. I think it's because while JSF was being developed that was originally about the only way to do it, and the examples outlived their usefulness. The Internet is, alas, very good at that. I rarely use bindings. The whole point of JSF is to provide a simple interface to POJOs, but some people can't seem to tolerate simple. Well, I've been accused of that myself, buy when it comes to GUIs, I'd rather not go overboard.

In short, the ultimate "Helper" for JSF Views is JSF itself. All else is just icing.



Tim,

do you think that people are using JSF like the way I said before because most of them are used with action based frameworks like Struts that have the ActionForm interface? Because a class to have only the components of the view seems to be an ActionForm...
What do you think about it?

Thanks in advance.



I think that it's a mixture of "cleverness" and ignorance. As I've said, there's some old, stale docs out there that do things the hard way. But I've also seen where people tried to make a brain-dead coded-by-monkeys framework out of JSF as well. A third possibility, which I'd forgotten is that some of the vendor-supplied packages seem to go this route, apparently to make it easier for their automated frameworks to get the job done (which is just another version of the brain-dead coded-by-monkeys approach).

I'm a big fan of Alan Kay's rule: "Simple things should be Simple, and Complex things should be Possible", paired with Einstein's "Everything should be as simple as possible, but no simpler". JSF works very well in that regard. However, people seem to be uncomfortable with too much simplicity -- as was parodied in the inventions of Rube Goldeberg.

I can get carried away sometimes myself, but I prefer to do it in more obscure areas and leave the basic UI stuff to be basic.
 
reply
    Bookmark Topic Watch Topic
  • New Topic