MOle Plugin - Inspect The Rails 2
Ara Howard, Delynn Berry and I, are pleased to announce the MOle plugin.
The MOle allows you to precisely analyze how your customers are interacting with your rails application. Instead of sitting on the console and watching your controller actions and db queries fly by, you can easily leverage the MOle and let it do this work for you by trapping events of interest. This plugin allows you to figure out if your latest application features are a success or a bust. You will be able to trap certain user interactions and record them for your next iterations. This is not yet another page hit or heat map type plugin, within a few steps you will be able to monitor your users interactions LIVE and assess your application usability from the comfort of your own machine...
We've produced an introduction to the MOle, you can watch the video MOle Video
Getting Started...
- Download the plugin:
ruby script/plugin install svn://rubyforge.org/var/svn/liquidrail/plugins/mole/trunkUpon install, the plugin will create 2 tables in your db namely mole_features and mole_logs
- Set up the MOle in config/environment.rb:
MOLE = File.new( "#{RAILS_ROOT}/config/mole.conf" )All the interactions of your moled application is orchestrated via the mole.conf file. A sample mole.conf file has been dropped in the config dir during the plugin installation. You can turn the mole on/off via the MOLEABLE_APP var. A built in feature of the mole is also to record long running actions, we will cover this later but the last variable will set the default perf threshold in this case 5 seconds.
MOLEABLE_APP = true
MOLE_PERF_MAX_TIME = 5
- Load the MOle configuration:
In your ApplicationController, add the following line:load MOLE.path if File.exists?(MOLE.path) and MOLEABLE_APPThis will load the mole configuration that instruct what/how to mole your rails application. All mole interactions occur in one single file, no need to sprinkle mole code all over your controllers. In the configuration file you simply instruct the mole where and what to capture when a particular interaction occurs.
- Moling a controller action:
MyController.before( :feature => :show ) do |context, feature, args|
Mole::DbMole.mole_it( context, feature, context.session[:user_id],
:some_var => context.instance_variable_get('@myVar'))
orMyController.after( :feature => :show ) do |context, feature, ret_val, args|
Mole::DbMole.mole_it( context, feature, context.session[:user_id],
:some_var => context.instance_variable_get('@myVar'), :return => ret_val
- That's all !!
We have also bundle a couple of consoles to allow you to view the mole in action aka The Snitch and the Yahoo! Widget MOlet...
The Snitch source can be downloaded here:
In order to run the companion widget application, you will need to install the Yahoo! Widget Engine for your platform and then download the MOlet Widget and save it to your platform specific widgets directory ( MAC Documents/widgets -- WIN Document And Setting/user/widgets)
You can find out more about the MOle by reading the documentation or tuning to the MOle Forum
Let us know what you think...Comments
-
Your link to the MOlet widget doesn't work. Looks like you meant: svn co svn://rubyforge.org/var/svn/liquidrail/plugins/mole/samples/consoles/widgets/molet
-
Thanks for the feedback Gavin !! The post was upated...
