Meteor

Quick Links

See also:

or you may want to use the search bar on the top right of this page.

About Meteor

Meteor is

  • a plugin for Ruby on Rails
  • a framework for the construction of re-usable “widgets” in rails.
  • a distribution model for sharing pre-built “widgets”.

History

When the meteor project started, I was only attempting to write a re-usable editor widget around the following use-case.

  • I had a deeply hierarchical data model, and I wanted to write a re-usable editor widget that could navigate the hierarchy (parent/child relationships). Most of the CRUD oriented scaffolds I had seen worked great for single tables, but the mechanisms for managing hierarchical relationships just didn’t cut it (at least for me).
  • Depending on a user’s level of access, large parts of the UI needed to have custom behavior. For example, a particular might
    • only be able to view certain fields
    • only be able to edit certain fields
    • only be able to view or delete certain rows
  • At any point I would need to be able to “re-skin” the widget on a per app, request, or page basis.
  • Additionally, in this real world case the users seem to change their minds every day about what the business rules.
  • Metadata to the rescue, I set out to write an editor widget that could be hold the business rules in metadata.

What I realized was that this wasn’t that easy in rails. For one thing, it seemed pretty hard to get all those unruly HTML snippets to behave like a single parameterized widget. This first widget I called Meteor, which was short for “METa data EditOR”. Somehow as I was writing this, the basic framework of having a meta-data driven editor widget got put into a plugin.

Once the plugin was written, I wrote another widget called the “named cell widget”. A few people looked at meteor and said “cool”. In fact everyone who looked at it said “cool”, but before long that became “how does it work?”, “how do I install it?”, “how do I create a new widget?”.

Summary

It seems like HTML snippet code is actually pretty hard to write in a reusable way, so my hope here is that meteor can enable the situation where you can easily write a spec-driven widget in rails without too much trouble. Based on my work on my new blog post on creating a new meteor widget, I think we’ve succeeded.

Ready to get started?

First install the plugin, then maybe you’ll want to create a new meteor widget.

Leave a Reply