Posts tagged with: "camping"

Announcing 'OpenlySociable Micro' - an OpenSocial Widget Ruby Microframework

Mini

by Pradeep Elankumaran

Openly Sociable Micro Logo

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.gem
in 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.

Comment | 

Words we've written view all blog posts »

Featured Article

Intridea at Lonestar Ruby Conference

by Renae Bair on August 18, 2010

For the third straight year in a row, senior-level developers from the Intridea team will be at the Lonestar Ruby Conference, on Thursday, August 26th, teaching students about Ruby. Students attending the Ruby Intrigue class will work with our Director of Mobile Development, Brendan Lim, our Director of Development, Adam Bair, and our Director of Research and Development, Pradeep Elankumaran. Continue reading »

Recent Blog Posts

FlockFeeds Launches From Node Knockout

by Intridea on August 30, 2010

Using NPM with Heroku Node.js

by Michael Bleigh on August 24, 2010

Fixing Common Bundler Problems

by Jerry Cheung on August 23, 2010