Book Image

Visualforce Developer's guide

By : Chamil Madusanka
Book Image

Visualforce Developer's guide

By: Chamil Madusanka

Overview of this book

<p>Visualforce allows you to build sophisticated, custom user interfaces that can be hosted natively on the Force.com platform. Visualforce achieves this with the help of a tag-based language which is similar to HTML. This book aims to introduce you to Visualforce development tools to develop a better perspective towards UI development with Visualforce, and take your expertise in UI development to the next level.</p> <p>"Visualforce Developer's Guide" is a hands-on guide aimed towards developing a custom UI interface. As you read through the content, you will notice that this book focuses on a single real-world example. This book builds upon this example to help you understand and use Visualforce development tools in your custom UI interfaces.</p> <p>"Visualforce Developer's Guide" begins with an introduction to Visualforce to give you an understanding of the MVC model and the Visualforce architecture. Special emphasis is given to building a rich user interface by leveraging JavaScript, jQuery, CSS, and HTML with Visualforce. Through the course of the book, you will learn how to reuse the code with the help of custom components, and minimize the Visualforce and Apex code through Visualforce dynamic binding. The later sections of the book focus on building Visualforce pages for mobile devices. By the end of the book, you will learn the best practices and security tips for Apex and Visualforce development.</p>
Table of Contents (17 chapters)
Visualforce Developer's Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Improving Visualforce's performance


The performance of a Visualforce page is a key factor to consider in development because performance is a reason that effects the end user's satisfaction of the application. The following are the best practices to improve Visualforce's performance:

  • Use only one <apex:form> tag per Visualforce page because each <apex:form> tag adds a view state to the page. A Visualforce page has a limit for view state size that is 135 KB. We can decrease the loading time of a Visualforce page by reducing the view state size.

  • Try to use the transient keyword in custom controller as much as possible. The state is not maintained for transient instance variables. If a particular instance is used only in the page request, then it must not be a part of view state. It will help to reduce the view state size.

  • When using an SOQL query to refer data of a particular object, use only the relevant data in the SOQL query.

  • When designing the Visualforce page, do not overload...