HTML pages served by one web server can "host" content from a 3rd-party web server. That functionality is basic to the Web, but it has only really been exploited in recent years. In this lecture we'll look at methods for including 3rd-party content in web page, and some common patterns of application that use these methods.
The object and embed elements are used to transclude non-HTML content
Usually used for Java applets [http://java.sun.com/docs/books/tutorial/deployment/applet/], Silverlight [http://en.wikipedia.org/wiki/Microsoft_Silverlight], and Flash applications
Sophisticated embedded objects can allow users to explore sites without needing to visit them (e.g. YouTube)
All the previous methods of transcluding 3rd-party content are client-side methods
the browser is loading the 3rd-party content directly
With server-side widgets, the 3rd-party content is loaded by a web server (such as a widget portal [Widget Portals (1)] or platform [Widget Platforms (1)]) and integrated into a web page before sending it to the browser
The big success of 3rd-party content has been driven by social networking sites: MySpace, Facebook, but also things like phpBB [http://www.phpbb.com/]
Profiles, wiki pages, blog posts, comment threads are all places where client-side transclusion can be used (if allowed)
Note that social networking sites can be both hosts [http://www.facebook.com/platform_tour.php] and sources [http://www.facebook.com/facebook-widgets/] of 3rd-party content
Through a popular host site, providers of third-party content can also grow very popular
Sometimes the third-party (para)site can "eat its host"
Widget portals are an update of the old My Netscape portal [Content Syndication (Atom & RSS); RSS History (1)] idea
Intended for use as "start pages" with an overview of commonly accessed content
Weather, news, sports scores, email inbox, etc.
Yahoo! [http://developer.yahoo.net/blog/archives/2009/09/yaps_on_yahoo.html], Google [http://www.google.com/ig/directory], and Microsoft [http://gallery.live.com/default.aspx?pl=4] all have variations on this theme
Widget portals use server-side transclusion, so 3rd parties must develop widgets according to portal specifications (or use syndication [Content Syndication (Atom & RSS); Syndication Formats (1)])
Transclusion isn't just for "extra" stuff like badges or ads
It can be used to "outsource" core functionality to another company or service
For example:
Disqus [http://disqus.com/] provides commenting for other sites (like Tumblr [http://tumblinerb.com/post/482404218/review-wiz-khalifa-yelawolf-9-30-club#disqus_thread])
Gravatar [http://en.gravatar.com/] provides avatars for other sites (like Disqus)
What are the advantages of this kind of outsourcing? Disadvantages?