We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Building Widgets and APIs using: Third Party JavaScript

Formal Metadata

Title
Building Widgets and APIs using: Third Party JavaScript
Alternative Title
Building Third-party Widgets and APIs using JavaScript
Title of Series
Number of Parts
150
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
When building a web page composed of different parts, the different parts can be combined at different stages of page rendering. Everything can either be loaded on the server before being returned to the client, or the client might receive the minimum amount of data immediately before loading individual components using JavaScript. The first way might be more straight-forward, but the latter both allows for looser coupling between services as well as allowing better user interation with the various page components. There are many scenarios where third-party JavaScript provides a good separation of concerns. You might be building a site with several secondary features like comment fields, feedback dialogs or shared toolbars, or you might be providing widgets or an API for other websites to consume. All of these cases are good candidates for writing so-called third-party JavaScript applications. When writing JavaScript that should run on known or unknown sites there are a lot of considerations to take into account. Should the application provide a near-seamless experience, giving the impression that the components are a native part of the parent page - like for instance a login widget, or should the widget give a branded and more isolated impression like the Facebook widget? Can the site be trusted? Should the web site or the users be allowed to interact with the application? Depending on the answers there are a number of different approaches, ranging from tight integration to sandboxed iframes. In this talk I will go into detail on the following subjects: - Loading and initializing the JavaScript application, - Running JavaScript and rendering HTML in unknown environments, - The balance between integration and sandboxing, - Communicating with other sites and components, - Security, and how to work around browser constraints