MOle updated - Version 0.003
We have updated the MOle plugin to pack in a few more
- Added origination ip address for users. This is useful to see where users are using your application from, as well as filtering in or out users from your organization
- Added browser tracking. Not only can you see how folks are interacting with your rails application, you can now also see what browsers they are using. This will allow you to access browser support and maximize efforts in this area.
- Multiple apps single db support. There has been scenarios where our users wanted to mole applications that used the same database. You can now namespace the mole features with the application name on the same database.
- Simpler initialization and configuration. We've eliminated all const var setup and
bottled down the initialization to a single call:
Moleable::init( :max_perf_time => 10, :app_name => 'Beast' )
Thank you all again for your support, we hope you'll find these changes useful...
New video of the new features coming soon !!
MOle Plugin - Inspect The Rails
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...ZiYa got video ?
ZiYa Plugin - Charting the rails...
Delynn and I have been hard at work and are pleased to announce the ZiYa Plugin.
ZiYa is based on the most excellent XML/Swf charts charting tool. It allows you to render charts in your web app by leveraging Flash rendering. No worries mate, you won't need to learn Flash to use this plugin. Sure there are many tools out there you can use to generate charts for your rails app but none are easier to setup and maintain than ZiYa.
ZiYa offers the following advantages:
- Offload the chart rendering activity to the client side. No need to install Rmagick and the likes on your server.
- Style your charts using the Ziya YAML style-sheets.
ZiYa leverages YAML and ERB for styling which allows you to perform dynamic styling based on certain model states. - Uses themes to provide consistent charts look and feel.
- Embed links within your charts and use them for navigation and drill-down activities.
- Provides dramatic chart transition.
- Embed ajax periodical refresh by calling back to your controller.
Getting Started...
- Download the plugin:
ruby script/plugin install svn://rubyforge.org/var/svn/liquidrail/plugins/ziya/trunk
- Setup ZiYa for your controller:
class BleeController < ApplicationController
include Ziya - Define an action to setup a bar chart:
def fred
chart = Ziya::Charts::Bar.new
render :text => chart
end - In the associated view use the ZiYa helper
<%=gen_chart( "blee", url_for( :controller => 'blee', :action => 'fred' ), '#ffffff', 400, 300 )%>
You can find out more about Ziya by reading the documentation here or view the samples apps to get some idea on the possibilities.
Let us know what you think...Graphing the rails
So you say to me: "Ah I am using gruff to address my charting needs and it's awesome!!". To this I say: "Right you are my friend". However let's color this statement a bit. Depending on your graphic needs Gruff may not be the end all be all. Of recent I have been building some applications that uses SWF Charts and I have been very happy with it. Swf charts is a rich graphing library the uses flash to render the charts. You produce a bit of xml in your rails controller and the xml is rendered on the client. Yes on the client, what a great concept. Why overload your server with rendering graphs using Rmagick when you can suck some cycles out of your customers bitchin machines ?
So for applications that need to deliver different graphs to customers I believe flash rendering is the best approach. If your application delivers the same graphs and does not require any client side interactivity then Gruff and caching is probably the right path for you.
Now if you need your customers to be able to interact with the charts and render different view based on a particular login, I believe flash charting is the better solution for you. SWF Charts offers the ability to embed links within the graphic components and you will be able to catch the link clicks within your rails controller. How cool is that ?
This particular package is free for the basic charting behavior but will cost you $45 per domain registration to enable links behavior and certain graph types. In my experience, this is money well spend. I have had great success with the support on this package too. Very fast turn around time.
I will shortly post some sample code to show SWF Chart with Rails mashup...
And Joy !!
