Getting Started with Polymer in Ruby on Rails

Polymer is a polyfill framework for the upcoming Web Components standards. Web Components is a set of new standards that encompass Shadow DOM, Custom Elements, and HTML Imports. Together, these standards make it easy to extend the nature of the web by creating a reusable set of widgets similar to the ones already provided by standard HTML elements.

At the time of this writing, there are 3 ongoing efforts to integrate Polymer with Ruby on Rails. They are:

All three of these projects have a similar approach. They integrate with Sprockets and the Rails Asset Pipeline to simplify component creation and management by including an app/assets/components directory where you can define your custom web components, and they also source vendor/assets/components for managing and referencing 3rd party components.

Setting up a Canvas LMS Development Virtual Machine

Canvas is an open source Learning Management System (LMS) developed by Instructure. Canvas caught my attention when it was released two years ago primarily because it was developed using Ruby and Ruby on Rails. As of this posting, it's still using Rails 2.3.x and Ruby 1.8.

When it just so happened that I would actually need an LMS as part of another project that I was working on last December, I jumped at the opportunity to try Canvas. Part of acquainting myself with that codebase involved setting up the project and all of its system dependencies based on Canvas's own Quick Start Guide. To ease some of the configuration burden of that guide I've recorded the setup in a Vagrant based virtual machine environment using VirtualBox that I've now released on GitHub.

Integrating Devise with Backbone.js

For the impatient: view the code, or see the demo.

Update 30 May 2012: The original version of the application and this article referenced the backbone.modelbinding project by Derick Bailey. Per the readme, that project has been abandoned and I have replaced backbone.modelbinding with the preferred backbone.modelbinder project. All code and referenced samples below have been updated accordingly.

Backbone.js UI implementation for Devise, Ruby on Rails authentication

jQuery with Rails 3

Update: Since this article was written, the jquery-ujs project has been turned into a gem which includes a generator that streamlines this process. Instructions can be found in the README for the Github project.

One of the most talked about features in Rails 3 is its plug & play architecture with various frameworks like Datamapper in place of ActiveRecord for the ORM or jQuery for javascript. However, I've yet to see much info on how to actually do this with the javascript framework.

Fortunately, it looks like a lot of the hard work has already been done. Rails now emits HTML that is compatible with the unobtrusive approach to javascript. Meaning, instead of seeing a delete link like this:

you'll now see it written as

This makes it very easy for a javascript driver to come along, pick out and identify the relevant pieces, and attach the appropriate handlers.

So, enough blabbing. How do you get jQuery working with Rails 3? I'll try to make this short and sweet.

Structure and Interpretation of Computer Programs (SICP) for Kindle

I just started reading the SICP book (Structure and Interpretation of Computer Programs, by Abelson, Sussman, and Sussman) which MIT Press has so graciously made available on their website. I'm not very fond of sitting in front of a computer screen to read books, so I mirrored their copy locally and converted it into a prc file (using Mobipocket Creator) so I could read it on my Kindle.

Here it is for anyone else who wants to save a bit of time.

It is provided under Creative Commons Attribution-Noncommercial 3.0 Unported License.

Ubiquity Commands Updated

Ubiquity 0.5 was released a few weeks ago, and I finally got around to updating my commands. If you were using my W3C or Drupal API Ubiquity commands, they are now 0.5 compatible. Please update your command source.

March Phoenix Drupal Meetup

The March Phoenix Drupal meetup will be held next Tuesday, March 10th at 7pm. The meetup is moving on to the ASU campus thanks to the help of Chris Yates. Event details can be found on the DrupalPHX group page.

Chris will be giving a presentation about the Mars Image Explorer project and how they are utilizing Drupal within that project. There's also been mention of DrupalCon attendees sharing a bit about what went on at the conference.

Hope you all can make it.

Phoenix Metro Drupal Meetup Next Tuesday

There will be a Phoenix Drupal meetup next Tuesday evening at Macayo's in Tempe. See official event details and sign up HERE. This meeting is a chance for local Drupal developers to get together and discuss what's going on in their Drupal world and Drupal in general. While we are working on a more presentation friendly meeting spot for future meetups, this will give us a chance to at least meet and gauge community interest level. Hope to see you there!

Getting Started with Exhibit using Drupal and Views (part 3)

In this last episode of getting started with Exhibit and Drupal, we'll embellish the Exhibit we created in part 2 by adding some additional views, exploring the use of lenses and expressions, and adding another facet. Our final Exhibit can be seen here.

Adding Views to your Exhibit

So the first thing we'll do is add several additional views to our Exhibit. The tabular view is nice and provides some great functionality, but Exhibit provides some additional views that are great at visually enhancing the way your data is displayed. We'll start by adding a calendar view. To do this you'll need the following code pasted within your viewPanel:

<div ex:role="view"
      ex:formats="date { mode: short; 
                         show: date-time; 
                         template: 'MM/dd/yyyy' } 
                  item { title: expression(.title) }"></div>

Getting Started with Exhibit using Drupal and Views (part 2)

Ok, now that we know a bit about Exhibit and how Drupal can help us create Exhibits, let's start by getting our Drupal data in Exhibit JSON format.


The setup I'm using for this tutorial includes a Drupal 6 installation with the following modules enabled: Exhibit, Views 2, CCK, Date, Location, and GMap. I'm only using CCK, Date, Location and GMap to create a custom Event node type with date and location fields. I've also added taxonomies to the Event node type for event type and tags. You can create your own node type and add whatever fields you would like. I'm using this setup to demonstrate the broadest possible uses of Exhibit. With this Event node type, we'll be able to create an Exhibit complete with Calendar, Timeline, Map, and Interactive Table displays. You can visit my playground here:

Create Exhibit JSON from your Views

Syndicate content