Skip to main content

Lets Shindig

Following the introductory presentation on OpenSocial at the Google Developer Day conference in Sydney, Dan Peterson and John Hjelmstad delved into the workings of Shindig with their presentation "Apache Shindig: Make your social site an OpenSocial container".

What is Shindig?

Shindig, a project in Apache Software Foundation Incubation is an open source implementation of OpenSocial and gadgets.

At present Shindig provides two ports, one in Java and one in PHP, both of which support version 0.7 of OpenSocial. There is work in progress for version 0.8 which will introduce the RESTful API. Some containers using the Java version of Shindig are hi5, iGoogle and orkut.

There is a strong open source community behind Shindig, producing some high quality code, with updates occurring as OpenSocial evolves.

Shindig Architecture

Dan and John showed a diagram similar to the one below to illustrate the structure of Shindig. It is made up of three main components.

|> Gadget Server:

OpenSocial gadget is going to be composed of HTML, CSS and JavaScript encapsulated inside an XML file. The Gadget Server will process that XML file and render it inside an iFrame. Shindig downloads your gadget and takes in the metadata, upon which it performs translations to deliver the content to the user in their language. It then looks at the preferences that might have been set, by taking in the variables and doing substitutions on the gadget content. Next up, it examines the features which are JavaScript libraries, so the gadget can behave in a certain way on the social site. An example of a feature is all the different views of a gadget. The final product is the HTML rendered inside an iFrame.

|> OpenSocial data server:

This server needs to be on the same domain as the gadget, as they talk to each other. Social information is exchanged with the gadget via a JSON wire format. There are three kinds of social information, they are: people, friends and activities.

Version 0.8 will introduce the RESTful API for non-JavaScript access to OpenSocial data. This will provide developers with the opportunity to build more interesting apps and for external sites to interact with social information.

The data server also provides persistent data storage for gadgets, but there is a limit to how much you can store.

The benefit of all this to developers is that they do not need any infrastructure of their own to have a gadget on a social website.

|> Gadget Container JavaScript:

This is a sample of core JavaScript functionality you may implement on your gadgets, and involves things like a UI layout and security.

Get Started with Shindig

To become an OpenSocial container you need to first connect the Shindig OpenSocial data server to your database and then add gadgets to your site. To add gadgets you need to do a few things. First, add some JavaScript libraries for remote procedure calls (RPC). You then need a user interface from which users can choose what gadgets to put on their page and finally add some UI elements such as a gadget gallery to your website.

By Lana Kovacevic
www.builderau.com.au

Comments

Popular posts from this blog

Financial Engineering

Financial Engineering: Key Concepts Financial engineering is a multidisciplinary field that combines financial theory, mathematics, and computer science to design and develop innovative financial products and solutions. Here's an in-depth look at the key concepts you mentioned: 1. Statistical Analysis Statistical analysis is a crucial component of financial engineering. It involves using statistical techniques to analyze and interpret financial data, such as: Hypothesis testing : to validate assumptions about financial data Regression analysis : to model relationships between variables Time series analysis : to forecast future values based on historical data Probability distributions : to model and analyze risk Statistical analysis helps financial engineers to identify trends, patterns, and correlations in financial data, which informs decision-making and risk management. 2. Machine Learning Machine learning is a subset of artificial intelligence that involves training algorithms t...

Wholesale Customer Solution with Magento Commerce

The client want to have a shop where regular customers to be able to see products with their retail price, while Wholesale partners to see the prices with ? discount. The extra condition: retail and wholesale prices hasn’t mathematical dependency. So, a product could be $100 for retail and $50 for whole sale and another one could be $60 retail and $50 wholesale. And of course retail users should not be able to see wholesale prices at all. Basically, I will explain what I did step-by-step, but in order to understand what I mean, you should be familiar with the basics of Magento. 1. Creating two magento websites, stores and views (Magento meaning of website of course) It’s done from from System->Manage Stores. The result is: Website | Store | View ———————————————— Retail->Retail->Default Wholesale->Wholesale->Default Both sites using the same category/product tree 2. Setting the price scope in System->Configuration->Catalog->Catalog->Price set drop-down to...

How to Prepare for AI Driven Career

  Introduction We are all living in our "ChatGPT moment" now. It happened when I asked ChatGPT to plan a 10-day holiday in rural India. Within seconds, I had a detailed list of activities and places to explore. The speed and usefulness of the response left me stunned, and I realized instantly that life would never be the same again. ChatGPT felt like a bombshell—years of hype about Artificial Intelligence had finally materialized into something tangible and accessible. Suddenly, AI wasn’t just theoretical; it was writing limericks, crafting decent marketing content, and even generating code. The world is still adjusting to this rapid shift. We’re in the middle of a technological revolution—one so fast and transformative that it’s hard to fully comprehend. This revolution brings both exciting opportunities and inevitable challenges. On the one hand, AI is enabling remarkable breakthroughs. It can detect anomalies in MRI scans that even seasoned doctors might miss. It can trans...