Intridea Company Blog
Announcing 'OpenlySociable Micro' - an OpenSocial Widget Ruby Microframework

Example:
Here is an example of an OpenlySociable Micro app, which implements the ‘Friend List’ app from the OpenSocial documentation site:
require 'openly_sociable_micro'
OpenSocial.make_app :ListFriends
module ListFriends::Controllers
class Index < R '/'
def get
@title = "Friend List"
render :index
end
end
end
module ListFriends::Views
def index
javascript :friends
div(:id => "message")
end
end
OpenSocial.start_mongrel :ListFriends, :port => 3301, :root => "/"
Here the ‘javascript :friends’ refers to a friends.js widget-specific javascript file that lives in the same directory. OpenlySociable Micro uses the Builder XML library to wrap a view action’s results into an XML format served by Mongrel. This format is the Google Gadget format, which OpenSocial containers like Orkut and Ning recognize and display.
Getting Started:
- Install the gem as described below
- Read through the Camping mini-app
- Look through the examples found here
- Write your first widget!
Installation:
OpenlySociable Micro can be found here: http://svn.intridea.com/svn/public/openly_sociable/micro/
You can also install the gem by downloading it and running:gem install openly_sociable_micro-0.0.1.gemin your download path.
Plans to integrate OpenlySociable Micro into Rubyforge are underway. For now there is a trac setup here here .What is it?:
‘OpenlySociable Micro’ is a clean, simple and concise way of writing OpenSocial widgets. It uses the Camping microframework and Mongrel to allow developers to write self-contained widgets for OpenSocial-enabled websites with none of the overhead of a full-blown Rails application.
The Intridea Blogs
Blog Archive
- June 2009 (7)
- May 2009 (4)
- April 2009 (6)
- March 2009 (15)
- February 2009 (18)
- January 2009 (4)
- December 2008 (2)
- November 2008 (3)
- October 2008 (7)
- September 2008 (9)
- August 2008 (2)
- July 2008 (7)
- June 2008 (14)
- May 2008 (5)
- April 2008 (14)
- March 2008 (6)
- February 2008 (5)
- January 2008 (6)
- December 2007 (5)
- November 2007 (5)
- October 2007 (7)
- September 2007 (2)
- August 2007 (7)
- July 2007 (4)
- June 2007 (3)
- April 2007 (1)
Pradeep Elankumaran