Note that even if you checked [icefaces] , this answer applies to JSF in general, not IceFaces.
In the MVC pattern, what is a model component in JSF? Is it a driven bean?
It is right. View is the JSP / Facelets page. The controller is a FacesServlet . For more on how this works "under the covers", see also this answer .
Is it good to write business logic in action methods? I have seen hundreds of lines written in action methods.
You can also delegate a call to a business service, such as EJB. This way you can distract business details. In "simple" applications, it is usually not harmful to leave this part and do everything in a managed bean. However, as soon as you get to the point, you would like to change the business logic (for example, for another client or for demonstration purposes, etc.), then the provision of the service would be more convenient, so you do not need to change managed beans, but you just need to write another implementation class for a particular business interface.
Do you think that we can write any logic in getter methods ?. How many times a getter or setter was called in the JSF life cycle.
If business logic needs to be executed every time getter is called, then do it (this, however, is very unlikely in the real world, expect crazy logging or special lazy (repeated) load cases). But if business logic needs to be executed only once per action, event, request, session, or application area, it should definitely be executed elsewhere. See also this answer .
How many times a getter is called, you should be the least concerned. A getter must do nothing but return the property in question. When called in the output value, it may be once per request. When the input value is called, this can be two times per request. When inside the datatable / repeat component, multiply the calls by the number of rows. When inside the displayed attribute, multiply calls with 6 ~ 8 times.
What is the usual way to write faces-config.xml. I read in one document that he says that it is good practice to write a managed bean declaration and a navigation case for this bean together. It will be more readable.
I myself use very rarely navigation cases, usually not in my faces-config.xml . I always return back to the same view (return null or void ), and then render / enable the result conditionally. For page navigation, I do not use POST requests (for which navigation cases are mandatory) simply because the user interface does not work properly and the URL in the address bar of the browser is always at one step, because it is by default forward, not redirected) and SEO (search engine optimization, search engines don’t “post index POST). I just use the output links or even simple HTML <a> elements to navigate the pages.
Also, in JSF 2.0, technically there is no need for w812 managed definitions and navigation in faces-config.xml . See also this answer .
Using a phase listener will affect the response time. For example, I am writing logic to analyze a query parameter in a PhaseListener and execute some logic. Are there any tips on this?
This applies to servlet filters in the premature optimization category. Concern about their execution usually does not make sense. This balance is usually only one or two lines of code. There is really nothing to worry about. You would have much more trouble copying this piece of code into all classes. If you really think it is worth the performance, first a profile, and then we can talk about it.