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

JSF design patterns  RSS feed

 
George Bromfield
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I've tried looking on the net for examples of simple projects that use JSF design patterns with small database but I couldn't find anything satisfactory.
Can anyone help me with this?

Thanks for any suggestions.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, a strategy that's worked well for me is to use a Domain Model where the actual ORM components are accessed via a DAO layer and detached for presentation to the JSF backing beans. The only issue there is that since sometimes ORM data mappings (such as booleans against Oracle) don't work well and I have to use a translating DTO so that JSF gets access against a boolean object (for checkboxes) but the DAO then has to translate that to a numeric or character true/false ORM object.

There are other ways to handle the datatype mismatches as well, but that one's the most universally adaptable. It's only an issue because Java and SQL aren't 100% compatible on datatypes.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!