You need to sign in to do that
Don't have an account?
Chinmay Bhusari
How much importance should be given to javascript to develop efficient visualforce pages?
I am confused on how much knowledge of javascript is required to develop efficient visual force pages and while doing visualforce coding how much percentage of the code should be controlled by javascript (according to the requirement)?
If you are writing a mobile application, then my advice would be to write all of your business logic in JavaScript and reduce the number of requests to the server to an absolute minimum, as requests from a mobile device are always quite expensive and involve latency, especially if the user is changing cells frequently.
One of the problems with JavaScript served from Visualforce is that its difficult to automate the testing - you can't use the Salesforce testing framework as this is built for Apex, so you'll need to look at a third party solution.
My advice to customers is usually to avoid JavaScript, as its more difficult to write, maintain and test, unless there is a good reason to use it, in which case use it and don't feel bad about it. In short, no JavaScript until its time to use JavaScript :)
All Answers
If you are writing a mobile application, then my advice would be to write all of your business logic in JavaScript and reduce the number of requests to the server to an absolute minimum, as requests from a mobile device are always quite expensive and involve latency, especially if the user is changing cells frequently.
One of the problems with JavaScript served from Visualforce is that its difficult to automate the testing - you can't use the Salesforce testing framework as this is built for Apex, so you'll need to look at a third party solution.
My advice to customers is usually to avoid JavaScript, as its more difficult to write, maintain and test, unless there is a good reason to use it, in which case use it and don't feel bad about it. In short, no JavaScript until its time to use JavaScript :)
Thanks a lot. Very informative answer.