Podcast
Questions and Answers
What does the Lightning Experience application use to load its resources?
What does the Lightning Experience application use to load its resources?
What is the URL used to access the Lightning Experience application?
What is the URL used to access the Lightning Experience application?
In the context of Lightning Experience, which statement is true regarding Visualforce pages?
In the context of Lightning Experience, which statement is true regarding Visualforce pages?
How does the browser affect the performance of a Visualforce page in Lightning Experience?
How does the browser affect the performance of a Visualforce page in Lightning Experience?
Signup and view all the answers
Which of the following describes the relationship between Lightning Experience and Visualforce pages?
Which of the following describes the relationship between Lightning Experience and Visualforce pages?
Signup and view all the answers
What does the implementation of Lightning Experience imply for developers working with Visualforce?
What does the implementation of Lightning Experience imply for developers working with Visualforce?
Signup and view all the answers
Which aspect of JavaScript errors is highlighted in relation to Lightning Experience?
Which aspect of JavaScript errors is highlighted in relation to Lightning Experience?
Signup and view all the answers
What is the primary type of application that Lightning Experience is characterized as?
What is the primary type of application that Lightning Experience is characterized as?
Signup and view all the answers
What is one significant change in how Visualforce operates between Salesforce Classic and Lightning Experience?
What is one significant change in how Visualforce operates between Salesforce Classic and Lightning Experience?
Signup and view all the answers
Which of the following accurately describes the execution context of Visualforce pages in Lightning Experience?
Which of the following accurately describes the execution context of Visualforce pages in Lightning Experience?
Signup and view all the answers
Which of these is a recommended adjustment for Visualforce code when transitioning to Lightning Experience?
Which of these is a recommended adjustment for Visualforce code when transitioning to Lightning Experience?
Signup and view all the answers
What is a notable difference in default values for Visualforce pages when running in Lightning Experience compared to Salesforce Classic?
What is a notable difference in default values for Visualforce pages when running in Lightning Experience compared to Salesforce Classic?
Signup and view all the answers
What does the Lightning Experience application structure predominantly represent?
What does the Lightning Experience application structure predominantly represent?
Signup and view all the answers
Which element of Visualforce's functionality is impacted by its new context in Lightning Experience?
Which element of Visualforce's functionality is impacted by its new context in Lightning Experience?
Signup and view all the answers
Which aspect of page rendering is primarily altered when Visualforce pages move to Lightning Experience?
Which aspect of page rendering is primarily altered when Visualforce pages move to Lightning Experience?
Signup and view all the answers
How does Visualforce's role change within Lightning Experience compared to Salesforce Classic?
How does Visualforce's role change within Lightning Experience compared to Salesforce Classic?
Signup and view all the answers
What happens to the standard Salesforce Classic header and sidebar when Visualforce pages run in Lightning Experience?
What happens to the standard Salesforce Classic header and sidebar when Visualforce pages run in Lightning Experience?
Signup and view all the answers
Which attribute controls the inclusion or suppression of standard Salesforce Classic stylesheets in Lightning Experience?
Which attribute controls the inclusion or suppression of standard Salesforce Classic stylesheets in Lightning Experience?
Signup and view all the answers
What effect do the showHeader and sidebar attributes have on Visualforce pages running in Lightning Experience?
What effect do the showHeader and sidebar attributes have on Visualforce pages running in Lightning Experience?
Signup and view all the answers
What distinguishes the sforce.one JavaScript Utility Object?
What distinguishes the sforce.one JavaScript Utility Object?
Signup and view all the answers
How does the presence of sforce.one affect Visualforce pages in Lightning Experience?
How does the presence of sforce.one affect Visualforce pages in Lightning Experience?
Signup and view all the answers
What will happen if a page is shared between Salesforce Classic and Lightning Experience regarding the attributes showHeader and sidebar?
What will happen if a page is shared between Salesforce Classic and Lightning Experience regarding the attributes showHeader and sidebar?
Signup and view all the answers
Why can't the Lightning Experience header or sidebar be suppressed?
Why can't the Lightning Experience header or sidebar be suppressed?
Signup and view all the answers
What is the default state of the standardStylesheets attribute when running in Lightning Experience?
What is the default state of the standardStylesheets attribute when running in Lightning Experience?
Signup and view all the answers
What is the primary role of Lightning Experience in relation to Visualforce pages?
What is the primary role of Lightning Experience in relation to Visualforce pages?
Signup and view all the answers
What is one disadvantage of Visualforce pages running inside an iframe in Lightning Experience?
What is one disadvantage of Visualforce pages running inside an iframe in Lightning Experience?
Signup and view all the answers
What should you consider updating when a Visualforce page communicates with services besides Salesforce?
What should you consider updating when a Visualforce page communicates with services besides Salesforce?
Signup and view all the answers
Which of the following is NOT an element of security that might be affected by the new Visualforce container in Lightning Experience?
Which of the following is NOT an element of security that might be affected by the new Visualforce container in Lightning Experience?
Signup and view all the answers
What is the distinction between the browsing context of Lightning Experience and the Visualforce page?
What is the distinction between the browsing context of Lightning Experience and the Visualforce page?
Signup and view all the answers
Which of the following statements regarding JavaScript errors in this context is true?
Which of the following statements regarding JavaScript errors in this context is true?
Signup and view all the answers
When Visualforce pages operate within Lightning Experience, what aspect is NOT a concern for those pages?
When Visualforce pages operate within Lightning Experience, what aspect is NOT a concern for those pages?
Signup and view all the answers
What is one of the main advantages of running Visualforce pages inside an iframe from Lightning Experience's perspective?
What is one of the main advantages of running Visualforce pages inside an iframe from Lightning Experience's perspective?
Signup and view all the answers
What happens if a Visualforce page needs to access external services while running inside an iframe?
What happens if a Visualforce page needs to access external services while running inside an iframe?
Signup and view all the answers
Which statement best summarizes the parent-child relationship between Lightning Experience and Visualforce pages?
Which statement best summarizes the parent-child relationship between Lightning Experience and Visualforce pages?
Signup and view all the answers
What is the purpose of the $Api.Session_ID global variable?
What is the purpose of the $Api.Session_ID global variable?
Signup and view all the answers
What happens to the session ID when crossing hostname boundaries?
What happens to the session ID when crossing hostname boundaries?
Signup and view all the answers
Why should developers avoid manipulating window.location in Lightning Experience?
Why should developers avoid manipulating window.location in Lightning Experience?
Signup and view all the answers
What is the recommended method for interacting across frame boundaries in Lightning Experience?
What is the recommended method for interacting across frame boundaries in Lightning Experience?
Signup and view all the answers
What principle should developers adhere to regarding JavaScript scope in Lightning Experience?
What principle should developers adhere to regarding JavaScript scope in Lightning Experience?
Signup and view all the answers
What change occurs automatically when Visualforce pages run within Lightning Experience?
What change occurs automatically when Visualforce pages run within Lightning Experience?
Signup and view all the answers
What is a common misconception regarding session management in Lightning Experience?
What is a common misconception regarding session management in Lightning Experience?
Signup and view all the answers
How does the same-origin policy affect Visualforce and Lightning Experience?
How does the same-origin policy affect Visualforce and Lightning Experience?
Signup and view all the answers
What is an action developers should not take regarding session IDs?
What is an action developers should not take regarding session IDs?
Signup and view all the answers
What should experienced JavaScript developers be cautious of when working with Visualforce in Lightning Experience?
What should experienced JavaScript developers be cautious of when working with Visualforce in Lightning Experience?
Signup and view all the answers
Study Notes
Lightning Experience Overview
- Lightning Experience is a single-page application (SPA) accessed via the /lightning URL.
- Upon loading, the application code takes over the environment after the resources (HTML and JavaScript) load.
Application Startup Process
- The startup process for a SPA is both interesting and complex, typically involving a static HTML shell and a large amount of JavaScript.
- Familiarity with frameworks like AngularJS or React can provide insights into how Lightning Experience operates.
Visualforce Interaction
- Lightning Experience governs the request, meaning that it is the parent context while the Visualforce page functions as the child context.
- Visualforce pages must adhere to constraints imposed by Lightning Experience, as children are expected to obey their parents.
Constraints on Visualforce Pages
- Some constraints come directly from Lightning Experience, such as the size of the frame used to display Visualforce pages.
- Implicit constraints may arise from the browser itself, focusing on security and JavaScript execution.
- Most pages are generally unaffected by security constraints; those that are usually fail early with clear error messages.
- JavaScript errors can be more nuanced, making them harder to diagnose, but general rules exist to mitigate these issues.
Visualforce in Salesforce Classic vs. Lightning Experience
- Visualforce pages in Salesforce Classic own the page and environment, while in Lightning Experience, they run inside an iframe in a larger container.
- Lightning Experience is a single-page application (SPA) that manages the request, creating specific constraints for Visualforce pages.
- The execution context changes how Visualforce pages interact with the overall Salesforce application.
Changes in Visualforce Page Functionality
- Visualforce runs in an iframe, isolating it from the parent Lightning Experience context, which means some pages may require updates to access top-level browsing context.
- Common code patterns needing updates include session handling and JavaScript scope adjustments due to the iframe boundaries and security policies.
Security and Scope Impacts
- Session maintenance and renewal must be considered due to differing session IDs between the Visualforce iframe and Lightning Experience.
- Cross-domain requests can lead to issues, necessitating proper configuration for CORS settings.
- JavaScript code in Visualforce cannot manipulate DOM elements in the Lightning Experience context directly; it must follow the principle of not affecting other contexts.
Visualforce Defaults in Lightning Experience
- The standard Salesforce Classic header and sidebar are suppressed when Visualforce runs in Lightning Experience.
- Attributes showHeader and sidebar are always set to false and cannot be overridden for Lightning Experience.
- The standardStylesheets attribute defaults to true but can be altered.
sforce.one JavaScript Utility Object
- The sforce.one utility object is automatically added in Lightning Experience for navigation purposes, providing multiple useful functions.
- It is not available in Salesforce Classic, highlighting a key difference in capabilities between the two environments.
Considerations for Developers
- Developers must analyze how their existing Visualforce code will behave in the new iframe context and adjust accordingly.
- Understanding and adhering to security constraints will mitigate issues with cross-domain requests and API interactions.
- To maintain effective navigation across frame boundaries, using methods like window.postMessage is necessary rather than relying on direct JavaScript access.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Explore the intricacies of the Lightning Experience application, a single-page application (SPA) accessed via the /lightning URL. This quiz examines how SPA structures load resources, focusing on the role of static HTML and JavaScript. Ideal for those familiar with JavaScript frameworks like AngularJS.