Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache MyFaces 1.2 Web Application Development - Question  RSS feed

 
Armando Flores Ibarra
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does MyFaces deals with JSF weaknesses?
 
Bart Kummel
author
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Armando,

That's a very general question you are asking. Are there any particular weaknesses you have in mind? Without that, I can only give you the following general answer: combined with Facelets, MyFaces does deal very well with JSF 1.2 weaknesses. For example, the MyFaces Trinidad component set can help you to leverage AJAX functionality without the need for JSF 2.0. MyFaces Orchestra can create a conversation scope and manage persistence transactions for you; that's even more than JSF 2.0 has on offer. MyFaces ExtVal can help you to use Bean Validation (JSR 303) with JSF 2.0 and even goes beyond what JSF 2.0 implements as JSR 303 support. In my opinion, you can reach at least the same level as JSF 2.0 by using MyFaces and Facelets. That's one of the main themes in the MyFaces 1.2 Web Application Development book.

I hope this general answer is helpful. Don't hesitate to let me know if you have a particular JSF 1.2 weakness in mind.

Best regards,
Bart Kummel
 
Armando Flores Ibarra
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bart,

Thank you for you quick answer !

I can see that a combination of myfaces+trinidad+orchestra+extval solve many of JSF's downsides.

What about GET requests and Annotations to avoid declaring backing-beans inside faces-config?
 
Bart Kummel
author
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Armando,

I don't know what you mean exactly when referring to GET requests. Can you explain in a bit more details what downside of JSF you mean be referring to GET requests?

Regarding backing beans... AFAIK, there is no way to declare them by Annotation in JSF 1.2. However, you could use Spring to manage your beans instead of letting JSF manage them. If you're going to use Orchestra, you'll have to let Spring manage your beans anyway. The Orchestra chapter in the Apache MyFaces 1.2. Web Application Development book has a section on how to migrate managed beans from faces-config.xml to Springs application context.

Best regards,
Bart
 
Armando Flores Ibarra
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you again for your great answer !!!

By "GET requests" I'm talking about "everything is a POST request in JSF" =)
 
Bart Kummel
author
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Armando,

Now I get what you mean. I don't see why using only POST requests would be a problem. In the projects I did, no one ever cared about whether we were using GET or POST requests. But that were all applications for internal use. For external applications, sometimes URLs and therefore the type of request do matter. I came across a project called PrettyFaces once. It says it enables you to use GET requests in JSF; I didn't try it myself, though. Perhaps you should give it a try...

Best regards,
Bart
 
Tim Holloway
Bartender
Posts: 18704
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PrettyFaces works very well. It's easy to install and use (especially if you build using Maven), And its author, Lincoln Baxter has been known to show up in this forum on occasion. I use PrettyFaces to provide me with "bookmarkable" URLs, although in one case they also helped be kludge around a blemish in Internet Explorer.

JSF2 adds a lot of support for direct URL (GET/POST) access, and I believe Lincoln helped to contribute to that effort.
 
Armando Flores Ibarra
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, thank you very much for your answers. They are very useful to me
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!