<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Musings of a Trained Monkey: Tag plugin</title>
    <link>http://www.stevelongdo.com/articles/tag/plugin</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Unspace.ca: The Agony, The Ecstasy</title>
      <description>&lt;a href="http://unspace.ca"&gt;Unspace.ca&lt;/a&gt; has released some interesting code to the open source community this year.  September 13th, 2006 has them unleashing the first Rails plugin code that will make you want to gouge out your own eyes upon viewing the example code.  &lt;br/&gt;&lt;br/&gt;&lt;b&gt;"The Agony"&lt;/b&gt; in the title of this post relates to the release of the &lt;a href="http://unspace.ca/discover/haml/"&gt;HAML&lt;/a&gt; plugin.  &lt;i&gt;(Somewhat irresponsibly linked to by me, seriously please don't gouge out your eyes)&lt;/i&gt;  Why, oh why, did they decide to combine white space sensitivity with HTML? Is there a disgruntled postal worker/Python  programmer working there or what? Perhaps it is used in some sort of hazing ritual for their new employees.&lt;br /&gt;&lt;br /&gt;
On the other hand we have &lt;b&gt;"The Ecstasy"&lt;/b&gt;, the very useful &lt;a href="http://unspace.ca/discover/datagrid"&gt;Datagrid&lt;/a&gt;.  This is an excellent and worthy open source release.  It combines functionality with a great example of use.  Granted it would be nice if it was packaged as a Rails plugin, but back in March adding routes in a plugin would have been difficult. &lt;br /&gt;&lt;br /&gt;Anyway, I am looking forward to see what &lt;a href="http://unspace.ca"&gt;Unspace.ca&lt;/a&gt; will do next, hopefully they will serve up more of &lt;b&gt;"The Ecstasy"&lt;/b&gt; </description>
      <pubDate>Thu, 14 Sep 2006 04:05:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1c8cae62-7016-4091-8d04-5f9fc377a121</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/09/14/unspace-ca-the-agony-the-ecstasy</link>
      <category>plugin</category>
      <category>rails</category>
    </item>
    <item>
      <title>Ruby, Rails, Selenium and testing...</title>
      <description>People that have worked with me in the past know how much I think unit tests are worth.  In fact I won't say any more about them.  White box testing has a place, it just isn't on my &lt;a href="http://www.stevelongdo.com/"&gt;blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;
&lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt; is an open source testing framework that will be making products like &lt;a href="http://www.mercury.com/us/products/quality-center/functional-testing/winrunner/"&gt;Mercury Interactive's WinRunner&lt;/a&gt; quake in their boots.  Being able to do acceptance/functional/regression/Black Box testing of web applications across browser and OS platform boundaries from a single script file is already possible with &lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt;.  The major testing/QA vendors can't even boast  that level of functionality yet.  Even better &lt;a href="http://adaptivepath.com/publications/essays/archives/000385.php"&gt;AJAX&lt;/a&gt; applications are supported by &lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt;.    There is a &lt;a href="http://www.openqa.org/selenium-ide/"&gt;Selenium IDE&lt;/a&gt; that works as an extension to &lt;a href="http://www.getfirefox.com"&gt;Firefox&lt;/a&gt;.  You can simply record your actions "macro-like" as you navigate through the web application you want to test.
&lt;br /&gt;&lt;br /&gt;
What makes this all the more exciting is the recent &lt;a href="http://andthennothing.net/archives/2006/02/19/new-version-of-selenium-on-rails"&gt;selenium_on_rails&lt;/a&gt; plugin.  It allows you to embed and run your   &lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt; tests as &lt;code class="typocode_ruby"&gt;&lt;span class="keyword"&gt;rake&lt;/span&gt;&lt;/code&gt; tasks.  Automated quality assurance has never been this compelling to include as part of the development process.&lt;br /&gt;&lt;br /&gt;  So far the only short coming I've observed is the lack of i18n support, however the new .rsel format probably could be used to overcome this. Rsel lets you define your &lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt; tests in terms of &lt;a href="http://ruby-lang.org/"&gt;Ruby code&lt;/a&gt;. To see all of this in action take a look at the excellent &lt;a href="http://andthennothing.net/archives/2006/02/20/show-dont-tell"&gt;screencast over at and then nothing.net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Someone made a good point that I maybe didn't make clear here, &lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt; can be used to test &lt;u&gt;ANY&lt;/u&gt; web application, not just &lt;a href="http://rubyonrails.org"&gt;Rails&lt;/a&gt; powered, but even legacy &lt;a href="http://java.sun.com"&gt;Java&lt;/a&gt;, &lt;a href="http://www.microsoft.com/net/default.mspx"&gt;.NET&lt;/a&gt;, &lt;a href="http://www.php.net/"&gt;PHP&lt;/a&gt;, or any &lt;a href="http://www.infogoal.com/cbd/cbdhome.htm"&gt;other caveman languages&lt;/a&gt; &lt;a href="http://www.perl.com/"&gt;from the last century&lt;/a&gt;.  :-)</description>
      <pubDate>Thu, 23 Feb 2006 03:44:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1fac5e60-0661-42e5-a94d-d53290e519a6</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/02/23/ruby-rails-selenium-and-testing</link>
      <category>ruby</category>
      <category>rails</category>
      <category>ajax</category>
      <category>selenium</category>
      <category>testing</category>
      <category>plugin</category>
      <trackback:ping>http://www.stevelongdo.com/articles/trackback/80</trackback:ping>
    </item>
    <item>
      <title>Rails acts_as_rateable plugin...</title>
      <description>I've gotten quite a bit done on rating.  Models can now use the act_as_rateable plugin to track rating information.  I've written ActionView Helpers to implement a &lt;a href="http://komodomedia.com/blog/index.php/2006/01/09/css-star-rating-part-deux/"&gt;star  rating system&lt;/a&gt; and a very &lt;a href="http://www.robarov.be/rate/"&gt;cool 1..10 style bar&lt;/a&gt;.  I've done some preliminary studying of integration with the sciptaculous_slider rails plugin as well.&lt;br /&gt;&lt;br /&gt;
Remaining todo items include:
&lt;ul&gt;&lt;li&gt;&lt;strike&gt;Rake task to copy images the helpers use to public/images directory.&lt;/strike&gt;&lt;/li&gt;&lt;li&gt;&lt;strike&gt;Rake task to setup database tables for storing rating info.&lt;/strike&gt;&lt;/li&gt;&lt;li&gt;&lt;strike&gt;Convert the SQL file I've been using into a Migrations style script.&lt;/strike&gt;&lt;/li&gt;&lt;li&gt;Increase Unit Testing coverage.&lt;/li&gt;&lt;li&gt;Tying in a rate method on ActionControllers...&lt;/li&gt;&lt;/ul&gt;
This last item is giving me pause though.  I was wanting to include a simple rating_controller with the plugin and have it automatically register its route via the init.rb file.  I sought out help from the &lt;a href="http://wrath.rubyonrails.org/pipermail/rails/2006-February/016706.html"&gt;Rails mailing list&lt;/a&gt;, but no one &lt;strike&gt;could help&lt;/strike&gt; helped. I may pursue a rake task for adding the route into the routes.rb file.  I think this isn't nearly as cool as self-registering a route within the init.rb file, but I haven't had any luck with the methods I have tried so far.</description>
      <pubDate>Thu, 09 Feb 2006 19:25:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4f72d246-d618-4110-924b-cf8fc26c8a0b</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/02/09/rails-acts_as_rateable-plugin</link>
      <category>ajax</category>
      <category>rating</category>
      <category>rails</category>
      <category>plugin</category>
      <trackback:ping>http://www.stevelongdo.com/articles/trackback/74</trackback:ping>
    </item>
    <item>
      <title>Polling/Rating latest...</title>
      <description>Work has been slow going on my polling plugin.  My day job has been sapping my energy for working on &lt;a href="http://rubyonrails.org"&gt;Rails&lt;/a&gt; projects when I get home.&lt;br /&gt;&lt;br /&gt;
That said I have been able to solve some of the issues I posted about earlier and some progress has been made.  I have given the code for the Horizontal CSS bar graph to &lt;a href="http://nubyonrails.topfunky.com"&gt;topfunky&lt;/a&gt; to include in his &lt;a href="http://nubyonrails.topfunky.com/pages/css_graphs"&gt;CSSGraphs plugin&lt;/a&gt;.  I finally was able to get poll results to show up in the &lt;a href="http://typo.leetsoft.com"&gt;Typo&lt;/a&gt; sidebar.  My local verison of &lt;a href="http://typo.leetsoft.com"&gt;Typo&lt;/a&gt; is severly hacked to accomplish this.  Unfortunately this makes the polling code difficult to distribute.  I have decided to rethink my entire approach to the project. &lt;br /&gt;&lt;br /&gt;
I am going to rewrite polling as a &lt;a href="http://rails-engines.org/"&gt;Rails engine&lt;/a&gt; to better facilitate code sharing and obviate the need for a hacked verison of &lt;a href="http://typo.leetsoft.com"&gt;Typo&lt;/a&gt;.  I will make some sort of &lt;a href="http://typo.leetsoft.com"&gt;Typo&lt;/a&gt; integration with the polling engine available.  Perhaps even making the polling information available through a web service.  Before I do any of that though, I want to add a stripped down version of polling as a rating plugin for &lt;a href="http://rubyonrails.org"&gt;Rails&lt;/a&gt;.  Rating will be implemented in the style of the acts_as_* &lt;a href="http://api.rubyonrails.com/classes/ActiveRecord/Base.html"&gt;ActiveRecord&lt;/a&gt; mixins.  A model would have acts_as_rateable and the table would need a rating_id column.  I have detailed this a bit better on my &lt;a href="/pages/projects"&gt;projects page&lt;/a&gt;.  I may have to pursue rating as an &lt;a href="http://rails-engines.org/"&gt;engine&lt;/a&gt; since there would need to be some sort of rating input widget.  The experiment continues...</description>
      <pubDate>Thu, 02 Feb 2006 03:24:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0d7bd2bd-4037-4b4c-99c7-e93812c0a809</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/02/02/polling-rating-latest</link>
      <category>plugin</category>
      <category>poll</category>
      <category>rails</category>
      <category>ruby</category>
      <category>typo</category>
      <category>engines</category>
      <category>rating</category>
      <trackback:ping>http://www.stevelongdo.com/articles/trackback/70</trackback:ping>
    </item>
    <item>
      <title>Polling plugin for Typo III...</title>
      <description>Well I promised an update, and here it is.  Not much progress to report.  I am stalled on the sidebar issue, trying to have AJAX links in the sidebar panel to vote with and then updating the sidebar DIV with the results.  &lt;a href="http://typo.leetsoft.com"&gt;Typo&lt;/a&gt; sidebars load fine from the SidebarController, but trying to hit them directly fails with &lt;span class="typocode"&gt;uninitialized constant Plugin&lt;/span&gt; at the bottom of the error trace it mentions the controller file and the plugin.rb file.&lt;br /&gt;&lt;br /&gt;
Apparently plugin.rb is not loaded when you go to the controller directly. I wish sidebars worked more like the TextFilters.  I tried to hack it up, but didn't have much success.  I do notice that while the TextFilters are technically plugins, the controller for them lives inside the main &lt;a href="http://typo.leetsoft.com"&gt;Typo&lt;/a&gt; application, whereas the sidebar controller lives in the components directory...  Long story short I've asked for help on the typo mailing list.&lt;br /&gt;&lt;br /&gt;
In the meantime I've been researching ways to display polling results.  &lt;a href="http://openlaszlo.org"&gt;OpenLaszlo&lt;/a&gt; looked like a great candidate for this, especially for fitting into the small amount of real estate a sidebar allows. I had high hopes for its &lt;a href="http://wiki.openlaszlo.org/Charting_Components_API#piechart"&gt;PieChart control&lt;/a&gt;, but it is still beta quality.  I messed around with it a bit, but I wasn't satisfied with how it looks and also mouse events aren't supported yet.  I spent quite a bit of time getting the demo up and running mostly because when you check it out from source some of the files have moved and thus the demos don't work.  I will be keeping an eye on this project though especially now that there is a &lt;a href="http://www.rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; integration &lt;a href="http://laszlo-plugin.rubyforge.org/"&gt;gem available&lt;/a&gt; from &lt;a href="http://osteele.com/projects/"&gt;Oliver Steele&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;
Better news for Horizontal CSS graphing though.  I was able to implement a helper based on &lt;a href="http://nubyonrails.topfunky.com/"&gt;Geoff Grosenbach's&lt;/a&gt; &lt;a href="http://nubyonrails.topfunky.com/articles/2006/01/11/css-graphs-come-and-get-em"&gt;Vertical Bar CSS graphing code&lt;/a&gt;. At this point I will just be excited to see something show up in the sidebar for results...  (grumble)</description>
      <pubDate>Tue, 24 Jan 2006 05:36:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d5a8c977-bc23-4991-b610-d4b0133b4d26</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/01/24/polling-plugin-for-typo-iii</link>
      <category>ajax</category>
      <category>laszlo</category>
      <category>plugin</category>
      <category>poll</category>
      <category>ruby</category>
      <category>rails</category>
      <category>typo</category>
      <trackback:ping>http://www.stevelongdo.com/articles/trackback/65</trackback:ping>
    </item>
    <item>
      <title>Polling Plugin for Typo II...</title>
      <description>I am continuing to work on the &lt;a href="/pages/projects"&gt;polling stuff&lt;/a&gt; for &lt;a href="http://typo.leetsoft.com"&gt;Typo&lt;/a&gt;.  I've ended up expanding my approach to include a full Admin panel for the Polls.  Mostly to allow selection of the "active" sidebar poll and to be able to view historical poll results.  &lt;br /&gt;
I've run into an issue with the sidebar poll content.rhtml though.  I was wanting to have AJAX voting via remote_link_to's, but no public routing is defined for sidebar plugins.&lt;br /&gt; I've looked into how TextFilters are implemented in &lt;a href="http://typo.leetsoft.com"&gt;Typo&lt;/a&gt; to better understand how they work despite not having public routing.  The TextFilterController defines a public_action method that allows child filters to include symbols for :plugin_public_action which in turn exposes the referenced methods.&lt;br /&gt;
Despite being named plugin_public_action it is in fact only implemeted for Filters and not for Sidebar components.  I am debating adding this functionality and submitting a patch, however, I wonder if I am the only person that needs this functionality?  I would update the routes.rb file to include a route for my poll controller, but that doesn't work because the sidebar controller handles loading all of the dependencies for "child" plugins.  </description>
      <pubDate>Fri, 20 Jan 2006 06:05:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:51e12b95-1b06-4c00-8641-f7990e40d7cf</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/01/20/polling-plugin-for-typo-ii</link>
      <category>rails</category>
      <category>typo</category>
      <category>poll</category>
      <category>plugin</category>
      <category>ajax</category>
      <category>sidebar</category>
      <trackback:ping>http://www.stevelongdo.com/articles/trackback/60</trackback:ping>
    </item>
    <item>
      <title>Polling for Typo...</title>
      <description>I've been working on a polling plugin for &lt;a href="http://typo.leetsoft.org/"&gt;Typo&lt;/a&gt;.  Initially I've been including it as a sidebar plugin, but now I am not sure if this is the way to distribute it.  The code itself doesn't really need to be tied to the sidebar model even though it started out that way.&lt;br/&gt;&lt;br/&gt;
I am not sure what exactly the best way is to package it though.  &lt;a href="http://rubyonrails.org"&gt;Rails&lt;/a&gt; provides for a component mechanism that may be a more appropriate way to distribute the polling code, but I am uncertain of the specifics of being able to add database tables for components or their lifecycle in general.  I need to spend more time researching this.&lt;br/&gt;&lt;br/&gt;
The sidebar mechanism in &lt;a href="http://typo.leetsoft.org/"&gt;Typo&lt;/a&gt; makes adding the tables fairly straight forward, but I wonder how things will work down the line for future updates to the plugin.  Also I haven't found the hook in the sidebar for when a sidebar block is removed.  Seems like I should remove the associated polling tables when someone removes the poll from their sidebar.&lt;br/&gt;&lt;br/&gt;
Which leads me to another candidate for distribution which would be to make the polling available as an ActiveRecord mixin. Similar to how the Touch mixin in the &lt;a href="http://api.rubyonrails.com/classes/ActiveRecord/Timestamp.html"&gt;TimeStamp &lt;/a&gt; class works with the created_on and updated_on columns.  The Pollable? mixin could require model objects to include a poll_id column or something or perhaps add acts_as_pollable. That way you could associate the poll with individual articles instead of just putting a single poll in the sidebar. I still would need to add the tables used for storing the polling information however. So I am not sure that this is right either.&lt;br/&gt;&lt;br/&gt;  &lt;b&gt;&amp;lt;plea&gt;Does anyone with Rails knowledge have any guidance for me?&amp;lt;/plea&gt;&lt;/b&gt;</description>
      <pubDate>Fri, 06 Jan 2006 18:52:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c9093803-d779-49e7-b06c-92f93f010512</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/01/06/polling-for-typo</link>
      <category>rails</category>
      <category>typo</category>
      <category>poll</category>
      <category>plugin</category>
      <trackback:ping>http://www.stevelongdo.com/articles/trackback/57</trackback:ping>
    </item>
  </channel>
</rss>
