Synopses & Reviews
Like all good web ventures, the Social Web has risen in prominence ahead of any reliable standards that would ensure a consistent user experience. But that's finally beginning to change. With this book, you'll learn about a rich set of open source technologies for building compelling—and secure—social applications and websites. You'll discover what it takes to engage users on a personal level, and learn ways to monetize your venture.
Programming Social Applications introduces you to the open source tools used on many major social platforms, and explains how technologies such as OpenSocial, Apache Shindig, OAuth, OpenID, Caja, and others work together to help you solve practical issues. You'll also examine successful proprietary platforms to help you gain a comprehensive understanding of the Social Web's foundations.
- Learn how to build viral applications with social data
- Implement social web technologies using real-world examples
- Work with OpenSocial to standardize social graphs—individual nodes and their relationships
- Build a scalable OpenSocial application container with Apache Shindig
- Develop comprehensive user authentication and authorization systems using OAuth and OpenID
- Learn how Caja, and ADsafe provide user security on social websites
- Deal with bugs and other problems when implementing these technologies
- Build distributed web frameworks that extend social graphs to include any social footprints users leave on the Web
Synopsis
Social networking has made one thing clear: websites and applications need to provide users with experiences tailored to their preferences. This in-depth guide shows you how to build rich social frameworks, using open source technologies and specifications. You'll learn how to create third-party applications for existing sites, build engaging social graphs, and develop products to host your own socialized experience.
Programming Social Apps focuses on the OpenSocial platform, along with Apache Shindig, OAuth, OpenID, and other tools, demonstrating how they work together to help you solve practical issues. Each chapter uncovers a new layer in the construction of highly viral social applications and platforms.
- Learn how to build applications on top of social containers, and leverage existing user data
- Map user relationships with a social graph, and extend social links between users
- Customize your application with user profile information and encourage growth through friendships
- Build a scalable social application container with OpenSocial and Shindig
- Dive into advanced OpenSocial topics such as templating and data pipelining methods
- Protect your container and its users against malicious code
About the Author
Jonathan LeBlanc is a technology evangelist and senior software engineer working with the Yahoo! Developer Network in Sunnyvale, California. As a specialist in open source initiatives in social engagement services, Jonathan works with and promotes emerging technologies to aid in the adoption and utilization of new social development techniques. As a software engineer, Jonathan works extensively with social interaction development on the web, engaging in new methods for targeting the social footprint of users to drive the ideal of an open web.
Table of Contents
Dedication; Preface; Audience; Contents of This Book; Using an Open Source Technology Stack; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1: Social Application Container Core Concepts; 1.1 What Is a Social Application Container?; 1.2 Implementing Proprietary Versus Open Standards; 1.3 The Embedded Application: Building in a Black Box; 1.4 Embedded Application Security; 1.5 The External Application: Integrating Social Data Outside the Container; 1.6 Application Views; 1.7 Application Permission Concepts; 1.8 Client-Side Versus Server-Side Applications; 1.9 When Good Applications Go Bad; 1.10 Application Model Case Studies; 1.11 Quick-Start Tips; Chapter 2: Mapping User Relationships with the Social Graph; 2.1 The Online Social Graph; 2.2 Applying the Real-Life Social Graph Online; 2.3 Sharing Private User Data: Opt-in Versus Opt-out; 2.4 Understanding Relationship Models; 2.5 Relationships Versus Entities; 2.6 Building Social Relevance: Exploring the Facebook Social Graph; 2.7 Defining Entity Likes and Dislikes Through the OpenLike Protocol; 2.8 Conclusion; Chapter 3: Constructing the Foundation of a Social Application Platform; 3.1 What You'll Learn; 3.2 Apache Shindig; 3.3 Setting Up Shindig; 3.4 Partuza; 3.5 The OpenSocial Gadget XML Specification; 3.6 Configuring Your Application with ModulePrefs; 3.7 Defining User Preferences; 3.8 Application Content; 3.9 Putting It All Together; Chapter 4: Defining Features with OpenSocial JavaScript References; 4.1 What You'll Learn; 4.2 Including the OpenSocial Feature JavaScript Libraries; 4.3 Dynamically Setting the Height of a Gadget View; 4.4 Inserting Flash Movies in Your Gadget; 4.5 Displaying Messages to Your Users; 4.6 Saving State with User Preferences; 4.7 Setting Your Gadget Title Programmatically; 4.8 Integrating a Tabbed Gadget User Interface; 4.9 Extending Shindig with Your Own JavaScript Libraries; 4.10 Putting It All Together; Chapter 5: Porting Applications, Profiles, and Friendships; 5.1 What You'll Learn; 5.2 Evaluating OpenSocial Container Support; 5.3 Core Components of the OpenSocial Specification; 5.4 Cross-Container Development and Porting; 5.5 Porting Applications from Facebook to OpenSocial; 5.6 Personalizing Applications with Profile Data; 5.7 Using Friendships to Increase Your Audience; 5.8 Putting It All Together; Chapter 6: OpenSocial Activities, Sharing, and Data Requests; 6.1 What You'll Learn; 6.2 Promoting Your Applications with OpenSocial Activities; 6.3 Direct Sharing Versus Passive Sharing; 6.4 Making AJAX and External Data Requests; 6.5 Putting It All Together; Chapter 7: Advanced OpenSocial and OpenSocial Next; 7.1 What You'll Learn; 7.2 Data Pipelining; 7.3 OpenSocial Templating; 7.4 A Few More Tags: The OpenSocial Markup Language; 7.5 Localization Support with Message Bundles; 7.6 The OpenSocial REST API Libraries; 7.7 OpenSocial Next: Areas of Exploration; 7.8 OpenSocial and Distributed Web Frameworks; 7.9 Putting It All Together; Chapter 8: Social Application Security Concepts; 8.1 What You'll Learn; 8.2 Hosting Third-Party Code Through iframes; 8.3 A Secure Approach: The Caja Project; 8.4 Why Use Caja?; 8.5 Attack Vectors: How Caja Protects; 8.6 Setting Up Caja; 8.7 Cajoling Scripts from the Command Line; 8.8 Running Caja from a Web Application; 8.9 Running Caja with an OpenSocial Gadget; 8.10 Using JSLint to Spot JavaScript Issues Early; 8.11 Playing in the Caja Playground; 8.12 Tips for Working in a Caja Environment; 8.13 A Lighter Alternative to Caja: ADsafe; 8.14 ADsafe Versus Caja: Which One Should You Use?; 8.15 How to Implement ADsafe; 8.16 Putting It All Together; 8.17 Conclusion; Chapter 9: Securing Social Graph Access with OAuth; 9.1 Beyond Basic Auth; 9.2 The OAuth 1.0a Standard; 9.3 OAuth 2; 9.4 Conclusion; Chapter 10: The Future of Social: Defining Social Entities Through Distributed Web Frameworks; 10.1 What You'll Learn; 10.2 The Open Graph Protocol: Defining Web Pages As Social Entities; 10.3 Activity Streams: Standardizing Social Activities; 10.4 WebFinger: Expanding the Social Graph Through Email Addresses; 10.5 OExchange: Building a Social Sharing Graph; 10.6 PubSubHubbub: Content Syndication; 10.7 The Salmon Protocol: Unification of Conversation Entities; 10.8 Conclusion; Chapter 11: Extending Your Social Graph with OpenID; 11.1 The OpenID Standard; 11.2 Do I Already Have an OpenID? How Do I Sign Up for One?; 11.3 The OpenID Authentication Flow; 11.4 OpenID Providers; 11.5 Bypassing Domain Discovery Errors in OpenID; 11.6 OpenID Extensions; 11.7 Implementation Example: OpenID; 11.8 Common Errors and Debugging Techniques; 11.9 Conclusion; Chapter 12: Delivering User-Centric Experiences with Hybrid Auth; 12.1 The OpenID OAuth Hybrid Extension; 12.2 When Should I Use OpenID Versus Hybrid Auth?; 12.3 The OpenID OAuth Hybrid Auth Flow; 12.4 Implementation Example: OpenID, OAuth, and Yahoo!; 12.5 Conclusion; Web Development Core Concepts; A Brief Tour of Open Source Standards; Web Service APIs; HTTP Response Status Codes; Understanding the Same-Origin Policy; REST Requests; Microformats and the Semantic Web; Installing Subversion (SVN); Installing Apache HTTP Server; Setting Up Your PHP Environment; Setting Up Your Python Environment; Glossary; Colophon;