<p>I have done Java and JSP programming in the past, but I am new to Java Server Faces and want to know if there's a set of best practices for JSF development. </p>

[{'answer_id': 31960, 'author': 'Rowan', 'author_id': 2087, 'author_profile': 'https://Stackoverflow.com/users/2087', 'pm_score': 5, 'selected': True, 'text': '<p>Some tips:\nUnderstand the JSF request <a href="http://www.java-samples.com/showtutorial.php?tutorialid=470" rel="nofollow noreferrer">lifecycle</a> and where your various pieces of code fit in it. Especially find out why your model values will not be updated if there are validation errors.</p>\n\n<p>Choose a tag library and then stick with it. Take your time to determine your needs and prototype different libraries. Mixing different taglibs may cause severe harm to your mental health.</p>\n'}, {'answer_id': 43562, 'author': 'Tim Howland', 'author_id': 4276, 'author_profile': 'https://Stackoverflow.com/users/4276', 'pm_score': 4, 'selected': False, 'text': '<p>Consider using <a href="https://facelets.dev.java.net/" rel="noreferrer">facelets</a>- it greatly simplifies the worst parts of JSF development. I\'m doing a CMS-based JSF project now without facelets (after doing a project with it) and it feels like my left arm is missing....</p>\n'}, {'answer_id': 72508, 'author': 'David Waters', 'author_id': 12148, 'author_profile': 'https://Stackoverflow.com/users/12148', 'pm_score': 4, 'selected': False, 'text': '<p>I would strongly recommend getting someone experienced in JSF to lead your first project in JSF even if this means paying a contractor for 3 months.\nThe JSF approach is very different to JSP. The way you approach and solve problems is very different.</p>\n\n<h2> Libraries </h2>\n\n<p>Consider the following libraries:</p>\n\n<ul>\n<li><a href="http://myfaces.apache.org/tomahawk/index.html" rel="nofollow noreferrer">Tomahawk</a></li>\n<li><a href="http://www.jboss.org/jbossrichfaces/" rel="nofollow noreferrer">RichFaces</a></li>\n<li><a href="http://shale.apache.org/" rel="nofollow noreferrer">Shale</a></li>\n<li><a href="http://myfaces.apache.org/trinidad/index.html" rel="nofollow noreferrer">Trinidad</a></li>\n<li><a href="http://spring.io/" rel="nofollow noreferrer">Spring</a></li>\n</ul>\n\n<h2>Architecture</h2>\n\n<p>Embrace <a href="http://en.wikipedia.org/wiki/Model-view-controller" rel="nofollow noreferrer">MVC</a> you need not only to know what this means but use it extensively.</p>\n\n<p>There are two main patterns for associating controllers with the views</p>\n\n<h3>Dot Net Style, One Request controller per view</h3>\n\n<p>Every top level page has a request scoped controller (bean) all validation and actions of the page use this class. Also used for filtering and ordering the Model.\nThe Model will be stored on a few session level controllers which will handle talking to the back-end (EJBs, or persistence layer) these session controllers should be implementing the business logic and have no knowledge of JSF,HTML or any presentation technology.</p>\n\n<h3>Controllers are session level</h3>\n\n<p>Design controllers based on your data model, nest them with in each other. (This post is getting too long so I wont go into the nuts and bolts of these).</p>\n\n<h2>Knowledge Required</h2>\n\n<p>Everyone:</p>\n\n<ul>\n<li><a href="http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFIntro10.html" rel="nofollow noreferrer">Life Cycle</a></li>\n<li>MDC</li>\n<li>Component based development</li>\n<li>Tags in <a href="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/overview-summary.html" rel="nofollow noreferrer">h: and f:</a> </li>\n</ul>\n\n<p>At Least One Person:</p>\n\n<ul>\n<li><a href="http://blogs.steeplesoft.com/jsf-component-writing-check-list/" rel="nofollow noreferrer">Creating Custom Components</a></li>\n<li>Limitations to JSF (back button,\nrandom navigation, etc) </li>\n<li>Debug 3rd\nparty libraries (At least one person\nhas to be comfortable breaking out\nthe debugger and stepping into the\nimplementation of JSF (easiest with\nopen source implementations like\nMyFaces))</li>\n</ul>\n'}, {'answer_id': 143110, 'author': 'fnCzar', 'author_id': 15053, 'author_profile': 'https://Stackoverflow.com/users/15053', 'pm_score': 0, 'selected': False, 'text': "<p>I have been using the IBM implementation of JSf and have some comments. It is not a bad way to go but you have to commit to the IBM 'way-of-life'. They have written their own tag lib which extends the JSF standard. If you can manage to stay inside of Rational Application Developer (RAD) (which does not get updated THAT often), the integration is sometimes buggy but overall decent. Also the integration with WebSphere is pretty good. Unless your employer plays golf with IBM, I think it is better to stay as vanilla as possible.</p>\n"}, {'answer_id': 341990, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>I am not yet aware of a "Best Practice" for cross field / form level validation.</p>\n\n<p>That is, JSF validation is currently orientated to single field validation. IMO it gets ugly when you look at complex cross field / form level validation.</p>\n\n<p>Old but still looks acurate to me\n<a href="http://weblogs.java.net/blog/johnreynolds/archive/2004/07/improve_jsf_by_1.html" rel="nofollow noreferrer">http://weblogs.java.net/blog/johnreynolds/archive/2004/07/improve_jsf_by_1.html</a></p>\n\n<p><a href="http://www.jroller.com/robwilliams/entry/jsf_multi_field_validation_not" rel="nofollow noreferrer">http://www.jroller.com/robwilliams/entry/jsf_multi_field_validation_not</a></p>\n'}, {'answer_id': 358918, 'author': 'Erik I', 'author_id': 9987, 'author_profile': 'https://Stackoverflow.com/users/9987', 'pm_score': 1, 'selected': False, 'text': '<ul>\n<li>Add my vote for facelets. I\'ve recently upgraded a project to use facelets, and it solves some big issues with jsf, specially giving you a decent template system right out of the box and letting you use standard html when it is appropriate, without wrapping it in "verbatim"-tags.</li>\n<li>RestFaces is a solution to the get/post problem that many people complain about. It\'s also well documented and easy to use.</li>\n<li>Don\'t use to many taglibs. It makes the job a lot harder when upgrading.</li>\n<li>SEAM collects many of the JSF best practices, but I haven\'t used it yet, so I can\'t really recommend it, just recommend you to take a look at it. </li>\n</ul>\n'}, {'answer_id': 7666298, 'author': 'ayengin', 'author_id': 633719, 'author_profile': 'https://Stackoverflow.com/users/633719', 'pm_score': -1, 'selected': False, 'text': '<p>Select a good component library .Do not use richfaces ,  i suggest you dont use jsf , use spring mvc,jquery fro view  and  json in a  rest architecture.  but if you have to ,use primefaces it easy to use and has enough components.</p>\n'}, {'answer_id': 8808345, 'author': 'Darkaico', 'author_id': 1025840, 'author_profile': 'https://Stackoverflow.com/users/1025840', 'pm_score': 0, 'selected': False, 'text': '<p>You could check it the following link in where you could find interesting articles</p>\n\n<p><a href="http://www.jsftutorials.net/" rel="nofollow">http://www.jsftutorials.net/</a></p>\n'}]
['https://Stackoverflow.com/questions/31924', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']