Thursday, September 6, 2012

Increase your JSF application performance (Part 2 - Design Patterns)

  • Use Facelets instead of JSP
  • If possible, always use HTML instead of JSF tags
  • Never put logic in getters because they can be called multiple times - especially for the rendered attribute
  • Avoid much logic in EL expression
  • Avoid using h:outputText. Just use EL expressions. If you need to escape HTML, it's better to use a EL function
  • Use AJAX as much as possible
  • Only process and update components which are really required to process or update
  • Cache data, which is required multiple times in the same view, in @RequestScoped beans
  • Avoid using @SessionScoped, @ViewScoped and other long living scopes
  • Split your beans. Its better to have a seperate bean for logic and a seperate bean for values which are required for multiple requests (@ViewScoped, @ViewAccessScoped...). I call them *Controller and *StateHolder

3 comments:


  1. thank u for sharing this postthank u for sharing this postcustom web application development

    ReplyDelete
  2. Thank for the information, Such a good content.
    Searching for Software Devlopment Company? 3sstudio is Considered as the most well-established Software Devlopment Company in Delhi offers you an entire range of Devlopment services as far as erp & Crm Devlopment, with more than 1000+ satisfied clients.

    contact us on :+91 9811241103

    ReplyDelete