<?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: Polling for Typo...</title>
    <link>http://www.stevelongdo.com/articles/2006/01/06/polling-for-typo</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <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>
