<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Workbooks Technical Blog</title>
	<atom:link href="http://workbooks.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://workbooks.wordpress.com</link>
	<description>Because we couldn't find it anywhere else...</description>
	<pubDate>Wed, 04 Jun 2008 08:32:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Really useful Rails/Ruby debug helper functions</title>
		<link>http://workbooks.wordpress.com/2008/06/04/really-useful-railsruby-debug-helper-functions/</link>
		<comments>http://workbooks.wordpress.com/2008/06/04/really-useful-railsruby-debug-helper-functions/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 08:32:22 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[debug]]></category>

		<category><![CDATA[exceptions]]></category>

		<category><![CDATA[helpers]]></category>

		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=18</guid>
		<description><![CDATA[OK, so printing stuff out to the console is pretty important when debugging your really nifty RoR application.  Here&#8217;s a couple that we find exceptionally useful:
Defines a new method &#8216;pm&#8217; on the Kernel object which prints out a readable, sorted list of the methods on the specified object


Kernel.send(:define_method, :pm, proc { &#124;obj&#124;
  obj.methods.sort.each{ [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>OK, so printing stuff out to the console is pretty important when debugging your really nifty RoR application.  Here&#8217;s a couple that we find exceptionally useful:</p>
<p>Defines a new method &#8216;pm&#8217; on the Kernel object which prints out a readable, sorted list of the methods on the specified object</p>
<pre name="code" class="ruby">

Kernel.send(:define_method, :pm, proc { |obj|
  obj.methods.sort.each{ |m| puts m }
})
</pre>
<p>Defines a new p method on the base Object that does a standard &#8216;Kernel.p&#8217; but also prints out the file and line number that called the &#8216;p&#8217; method.  This is really handy when you have finished developing/debugging a large section of code across many files and can&#8217;t quite find those last few debug lines that you need to remove.  Anyone tried searching their source code for the search string &#8220;p&#8221;? <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre name="code" class="ruby">

class Object
  def p(*args)
    Kernel.p args
    puts &quot;@ &quot; &lt;&lt; caller[0].to_s
  end
end
</pre>
<p>Raising errors while parsing your own files/DSL?  Help the developer out by including a key part of the stack trace when the exception was thrown and concatenating this method call on the end of the raise (in this case the .txt file that was being parsed):</p>
<pre name="code" class="ruby">

def parse_error
  &quot;This happened while parsing #{ caller.map{ |o| o.to_s.grep(/\.txt/) } }&quot;
end
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=18&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/06/04/really-useful-railsruby-debug-helper-functions/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tingleychris-128.jpg" medium="image">
			<media:title type="html">tingleychris</media:title>
		</media:content>
	</item>
		<item>
		<title>Using jQuery and Ajax to load sub-sections of a webpage</title>
		<link>http://workbooks.wordpress.com/2008/05/12/using-jquery-and-ajax-to-load-sub-sections-of-a-webpage/</link>
		<comments>http://workbooks.wordpress.com/2008/05/12/using-jquery-and-ajax-to-load-sub-sections-of-a-webpage/#comments</comments>
		<pubDate>Mon, 12 May 2008 12:43:31 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[ajax]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[lazy loading]]></category>

		<category><![CDATA[tabs]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=17</guid>
		<description><![CDATA[OK, so this isn&#8217;t really rocket science, but there are a couple of neat uses for this technique:
Ajax powered tab sets
Tabs can; broadly-speaking, be loaded in three different ways:

Immediately loaded - i.e. when the webpage has loaded, it is the default selected tab.
Later (deferred loading) - i.e. after the user clicks a tab, go off [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>OK, so this isn&#8217;t really rocket science, but there are a couple of neat uses for this technique:</p>
<p><strong>Ajax powered tab sets</strong></p>
<p>Tabs can; broadly-speaking, be loaded in three different ways:</p>
<ul>
<li>Immediately loaded - i.e. when the webpage has loaded, it is the default selected tab.</li>
<li>Later (deferred loading) - i.e. after the user clicks a tab, go off to the server and retrieve the contents of a tab, or</li>
<li>Lazy loading - e.g. load in the background before the user clicks a tab.  This enhances the user experience as the contents of a tab are immediately shown, but on the flip side means requires more traffic and the user may never click the tab anyway, effectively wasting bandwidth.</li>
</ul>
<p><strong>Content panes, portal layouts etc</strong></p>
<p>As with tabs, content panes on a page can be loaded in several ways, although lazy loading is probably not very useful.</p>
<p><strong>Solution</strong></p>
<p>Here&#8217;s a javascript (using jQuery) implementation of the above which supports loading now, loading on page load and lazy loading (which takes place after the on page loads):</p>
<pre name="code" class="javascript">

ajaxLoader : {
    /** A queue of embeds to load on document ready */
    loadQueue: {},

    /** A queue of embeds to load on after the load queue */
    lazyQueue: {},

    /**
     * Called on Document Ready to load all the queued embeds
     */
    init: function() {
        jQuery.each(this.loadQueue, function(id, url) {
            wbHtmlWidgets.embed._load(id, url);
        });

        jQuery.each(this.lazyQueue, function(id, url) {
            wbHtmlWidgets.embed._load(id, url);
        });
    },

    _load: function(id, url) {
        $(&quot;#&quot; + id).load(url);
    },

    /**
     * Loads a url into a dom id immediately - ensure that the page has
     * completely loaded before using this method, as manipulating the DOM
     * before it has been created does nasty things in browsers such as IE.
     * If you want to embed the wibl after the page has loaded, use embed.afterLoad()
     * @param {string} id The div id to load the embed into
     * @param {string} url The url to load into the specified div id
     */
    now: function(id, url) {
        this._load(id, url);
    },

    /**
     * Loads a url into a dom id after the onLoad queue has been processed.
     * @param {string} id The div id to load the embed into
     * @param {string} url The url to load into the specified div id
     */
    lazy: function(id, url) {
        this.lazyQueue[id] = url;
    },

    /**
     * Loads a url into a dom id after the page has loaded.
     * If you want to embed the wibl now, use embed.now()
     * @param {string} id The div id to load the embed into
     * @param {string} url The url to load into the specified div id
     */
    afterLoad: function(id, url) {
        if ( $(&quot;#&quot;+id).html() == &#039;&#039; ) {
            $(&quot;#&quot;+id).html(&#039;&lt;image src=&quot;/images/spinner.gif&quot; /&gt;&#039;);
        }
        this.loadQueue[id] = url;
    }
}
</pre>
<p>To get this to work, ensure that you have an onLoad (document ready) event on your page&#8230;</p>
<pre name="code" class="javascript">

$(document).ready(function(){
    ajaxLoader.init();
});
</pre>
<p>Then to make the magic work, in your HTML you may want to do something like:</p>
<pre name="code" class="html">

&lt;span id=&quot;tab-0&quot;&gt;&lt;/span&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
//&lt;![CDATA[
    ajaxLoader.afterLoad(&quot;tab-0&quot;, &quot;http://your/tab/address&quot;);
//]]&gt;
&lt;/script&gt;
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=17&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/05/12/using-jquery-and-ajax-to-load-sub-sections-of-a-webpage/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tingleychris-128.jpg" medium="image">
			<media:title type="html">tingleychris</media:title>
		</media:content>
	</item>
		<item>
		<title>Dumping and loading seed data for Rails database resets</title>
		<link>http://workbooks.wordpress.com/2008/05/09/dumping-and-loading-seed-data-for-rails-database-resets/</link>
		<comments>http://workbooks.wordpress.com/2008/05/09/dumping-and-loading-seed-data-for-rails-database-resets/#comments</comments>
		<pubDate>Fri, 09 May 2008 12:22:56 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[reset]]></category>

		<category><![CDATA[seed data]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=16</guid>
		<description><![CDATA[As mentioned in our previous posts regarding database migrations in Rails, we have introduced a method of managing seed data in migrations.  Although this methodology still has some problems, generally speaking it works pretty well.
After a database migration, a schema dump takes place.  This allows fast recreation of databases without having to go [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As mentioned in our previous posts regarding database migrations in Rails, we have introduced a method of managing seed data in migrations.  Although this methodology still has some problems, generally speaking it works pretty well.</p>
<p>After a database migration, a schema dump takes place.  This allows fast recreation of databases without having to go through every single migration.  The problem with this is that any seed data added during the migrations is not added back in when doing a <code>db:reset</code>.  This can be solved by having a similar function to Schema Dumper.</p>
<p>Here are the seed data tasks (you probably want to add these into the db namespace):</p>
<pre name="code" class="ruby">

namespace :seed_data do
  desc &#039;Load schema seed data&#039;
  task :load =&gt; :environment do
    puts &quot;== Loading dumped seed data&quot;
    config = ActiveRecord::Base.configurations[RAILS_ENV || &#039;development&#039;]
    ActiveRecord::Base.establish_connection(config)
    require &#039;active_record/fixtures&#039;
    Dir.glob(RAILS_ROOT + &#039;/db/seed_data/global/*.yml&#039;).each do |file|
      Fixtures.create_fixtures(RAILS_ROOT + &#039;/db/seed_data/global&#039;, File.basename(file, &#039;.*&#039;))
    end
  end

  desc &#039;Save schema seed datae&#039;
  task :dump =&gt; :environment do
    config = ActiveRecord::Base.configurations[RAILS_ENV || &#039;development&#039;]
    ActiveRecord::Base.establish_connection(config)
    Database::SeedDataDumper.dump(ActiveRecord::Base.connection)
  end
end
</pre>
<p>You&#8217;ll need the SeedDataDumper class:</p>
<pre name="code" class="ruby">

module Database
  class SeedDataDumper

    def self.dump(connection)
      new(connection).dump()
      true
    end

    def dump()
      @connection.tables.each do |table|
        if @connection.select_all(&quot;DESCRIBE #{table}&quot;).inject(false) { |b, col| b || (col[&quot;Field&quot;]==&quot;came_from_migration&#038;quot <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> }
          data = @connection.select_all(&quot;SELECT * FROM #{table} WHERE came_from_migration IS NOT NULL&#038;quot <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
          if !data.empty?
            outfile = File.new(&quot;#{@folder}/#{table}.yml&quot;,  &quot;w&#038;quot <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
            header(outfile)
            i = &quot;0&quot;
            outfile.write data.inject({}) { |hash, record|
              hash[&quot;#{table}_#{i.succ!}&quot;] = record
              hash
            }.to_yaml
            footer(outfile)
          end
        end
      end
    end

    private
      def initialize(connection)
        @connection = connection
        @folder = &quot;#{RAILS_ROOT}/db/seed_data&quot;
        puts &quot;== Dumping seed data&quot;
      end

      def header(stream)
        stream.puts &lt;&lt;HEADER
# This file is auto-generated from all the current &quot;came_from_migration&quot; rows in the selected
# database.  It generates a yaml file per table which can be loaded in again using fixtures.
HEADER
      end

      def footer(stream)
        stream
      end

  end
end
</pre>
<p>Remember to put the following line at the end of your <code>db:migrate</code> task:</p>
<pre name="code" class="ruby">

Rake::Task[&quot;db:seed_data:dump&quot;].invoke if ActiveRecord::Base.schema_format == :ruby
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=16&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/05/09/dumping-and-loading-seed-data-for-rails-database-resets/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tingleychris-128.jpg" medium="image">
			<media:title type="html">tingleychris</media:title>
		</media:content>
	</item>
		<item>
		<title>Seeding data in Rails Migrations (Part 2)</title>
		<link>http://workbooks.wordpress.com/2008/05/09/seeding-data-in-rails-migrations-part-2/</link>
		<comments>http://workbooks.wordpress.com/2008/05/09/seeding-data-in-rails-migrations-part-2/#comments</comments>
		<pubDate>Fri, 09 May 2008 12:20:36 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[migrations]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=15</guid>
		<description><![CDATA[We&#8217;ve had a significant number of hits on our first article on Seeding data as part of Rail database migrations which just goes to show that people are finding this a bit of a problem!  As we have been using our technique for a few weeks now, we&#8217;d like to point out a few [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We&#8217;ve had a significant number of hits on our first article on <a href="http://workbooks.wordpress.com/2008/04/10/seeding-data-as-part-of-database-migrations/">Seeding data as part of Rail database migrations</a> which just goes to show that people are finding this a bit of a problem!  As we have been using our technique for a few weeks now, we&#8217;d like to point out a few of the problems with it that we have found (some with solutions, and some that we just haven&#8217;t figured out yet!).</p>
<ol>
<li><strong>Fixtures#create_fixtures deletes data </strong>- Whoops!  After looking at the source code, create_fixtures effectively drops all the data in the table it is just about to populate.  Obviously this isn&#8217;t very useful if you want to use a migration on any table that isn&#8217;t empty.</li>
<li><strong>Related data </strong>- Migrations in Rails 2 have a nifty feature allowing you to create inter-related table rows by using named data items.  The methodology outlined in Part 1 doesn&#8217;t load all the yaml files into the migration and then run them, instead it runs them one at a time meaning (and with no model class) so Rails is unable to resolve the relationships between rows.</li>
</ol>
<div><strong>Solutions</strong></div>
<div>The easiest way  to fix the related data is to extend the reader for yaml files to have more than one table per file, consider a yaml seed data migration file &#8220;006_add_monkeys_and_fruit.yml&#8221;:</div>
<pre name="code" class="ruby">

monkeys:
  george:
    name: George the Monkey
    pirate: reginald
    fruits: apple, orange, grape

fruits:
  apple:
    name: apple

  orange:
    name: orange

  grape:
    name: grape
</pre>
<p>This naming convention follows the ideas behind migration naming convention and doesn&#8217;t stop you having more than one seed file per migration (obviously of unrelated data) e.g. 006_add_tables_and_chairs.yml</p>
<p><strong>Temporary work around</strong></p>
<p>For the time being (until we extend the yaml parser) we have written a slightly different seed data function for our migration files  This allows us to seed a row into the database, read its insertion ID and then reference that row object in subsequent inserts.</p>
<p><strong>Conclusion</strong></p>
<p>We still think that Fixtures provides a pretty good way of introducing structure data into our tables, but just needs a little bit more work before it plays nicely with migrations.  We have also found the time to start writing the schema dump/load equivalents for seed data (when creating database from schemas, i.e. in production).  These methods are just being finished and tested and we will post them up here in the next couple of days.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=15&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/05/09/seeding-data-in-rails-migrations-part-2/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tingleychris-128.jpg" medium="image">
			<media:title type="html">tingleychris</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple client-side form validation in javascript using jQuery</title>
		<link>http://workbooks.wordpress.com/2008/04/15/simple-client-side-form-validation-in-javascript-using-jquery/</link>
		<comments>http://workbooks.wordpress.com/2008/04/15/simple-client-side-form-validation-in-javascript-using-jquery/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 10:13:20 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[forms]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=14</guid>
		<description><![CDATA[I&#8217;m new to jQuery (I come from a prototype background), so I quite enjoyed my first little jaunt using jQuery&#8230; and I used it to create a simple client-side form validation library.
As we are generating a lot of our forms server side which in turn can be rendered into several different formats, so it&#8217;s important [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m new to jQuery (I come from a prototype background), so I quite enjoyed my first little jaunt using jQuery&#8230; and I used it to create a simple client-side form validation library.</p>
<p>As we are generating a lot of our forms server side which in turn can be rendered into several different formats, so it&#8217;s important for us to have a simple way to attach validation to form elements.</p>
<p>For this method to work, each form element needs to be wrapped up in a container, a <code>li</code> is used in this example.  Each container then has a class applied to it to indicate the type of validation required for the form field contained by the wrapper.  Here&#8217;s the HTML snippet:</p>
<pre name="code" class="html">

&lt;ol&gt;
	&lt;li class=&quot;validation required&quot;&gt;&lt;label for=&quot;name&quot;&gt;Contact name&lt;/label&gt;&lt;/li&gt;
	&lt;li class=&quot;validation date&quot;&gt;&lt;label for=&quot;dob&quot;&gt;Contact DOB&lt;/label&gt;&lt;/li&gt;
&lt;/ol&gt;
</pre>
<p>Now all that needs to be done is a validation function bound to each input field, that&#8217;s easy because each input field is wrapped in a container with the &#8220;validation&#8221; class.  The second class is the type of validation that is required for the input field.  To keep it generic, you can just <code>eval</code> the class name as long as there is a function to match, heres the javascript:</p>
<pre name="code" class="javascript">

init: function() {
	$(&#039;li.validation&#039;).find(&quot;:input&quot;).each(function() {
		var validations = $(this).parent().get(0).className.split(&#039; &#039;);
		for (var i=0; i&lt;validations.length; i++) {
			vtype = validations[i];
			if (vtype != &#039;validation&#039; ) {
				$(this).bind(&quot;blur&quot;, {element: this}, eval(vtype));
			}
		}
	})
},

required: function(o) {
	var element = o.data.element;
	// do some validation with element.value
},

date: function(o) {
	var element = o.data.element;
	// do some validation with element.value
}
</pre>
<p>The validation functions can then do whatever you want.  I generate a boolean result and an error message (if necessary) and pass these parameters to a generic function which indicates the problem with the field, but equally as important may be to disable the submit button etc.</p>
<p>To stop any nasty conflicts, I&#8217;d recommend wrapping that all up in a namespace or similar.  Other points worth nothing: this setup validates everything on a blur event (which might be a bit annoying).  Also, there is no way of passing any parameters to the validation functions; so special cases need their own validation functions.  However, I can&#8217;t imagine there will ever be that many different types of validation for it to matter too much.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=14&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/04/15/simple-client-side-form-validation-in-javascript-using-jquery/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tingleychris-128.jpg" medium="image">
			<media:title type="html">tingleychris</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating common fields in your Rails model database migrations</title>
		<link>http://workbooks.wordpress.com/2008/04/13/creating-common-fields-in-your-rails-model-database-migrations/</link>
		<comments>http://workbooks.wordpress.com/2008/04/13/creating-common-fields-in-your-rails-model-database-migrations/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 15:36:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=13</guid>
		<description><![CDATA[Sometimes you want a set of common set of fields in a bunch of your tables. DRY it up a little so you can write this in your migrations:


include MigrationHelpers

class CreateUserTales &#60; ActiveRecord::Migration
  def self.up
    create_table :user_tales do &#124;t&#124;
      t.common_fields
      t.integer :tale_id, :null =&#62; false
  [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sometimes you want a set of common set of fields in a bunch of your tables. DRY it up a little so you can write this in your migrations:</p>
<pre name="code" class="ruby">

include MigrationHelpers

class CreateUserTales &lt; ActiveRecord::Migration
  def self.up
    create_table :user_tales do |t|
      t.common_fields
      t.integer :tale_id, :null =&gt; false
    end
    add_common_field_indexes :user_tales
    add_index :user_tales, :user_id
    foreign_key :user_tales, :tale_id, :tales
  end
end
</pre>
<p>You need a /lib/migration_helpers.rb containing this:</p>
<pre name="code" class="ruby">

module MigrationHelpers

  # Common fields for which we want to create an index by default.
  # Rather than create indexes for every field we create them by default only for those fields which do not change every time the record is updated.
  COMMON_INDEX_FIELDS = %w(owner_id created_by created_at)

  class ActiveRecord::ConnectionAdapters::TableDefinition
    def common_fields
      self.integer :owner_id, :created_by, :updated_by
      self.integer :version, :default =&gt; 0, :null =&gt; false
      self.boolean :is_deleted, :default =&gt; false, :null =&gt; false
      self.timestamps                   # adds created_at and updated_at as datetimes
    end
  end

  # Create indexes for the Common Fields
  def add_common_field_indexes(table_name, columns_to_index=COMMON_INDEX_FIELDS)
    columns_to_index.each do |column_name|
      index_name = &quot;index_#{table_name}_on_#{column_name}&quot;
      execute &quot;CREATE INDEX #{index_name} ON #{quote_table_name(table_name)} (#{column_name})&quot;;
    end
  end

  # Hide mysql&#039;s foreign key syntax behind a simple method
  def foreign_key(from_table, from_column, to_table)
    constraint_name = &quot;fk_#{from_table}_#{from_column}&quot;
    execute %{ALTER TABLE #{from_table} ADD CONSTRAINT #{constraint_name} FOREIGN KEY (#{from_column}) REFERENCES #{to_table}(id)}
  end
end
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=13&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/04/13/creating-common-fields-in-your-rails-model-database-migrations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Seeding data as part of Rails database migrations</title>
		<link>http://workbooks.wordpress.com/2008/04/10/seeding-data-as-part-of-database-migrations/</link>
		<comments>http://workbooks.wordpress.com/2008/04/10/seeding-data-as-part-of-database-migrations/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 17:15:02 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[migrations]]></category>

		<category><![CDATA[seeding]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=11</guid>
		<description><![CDATA[So, we stumbled across a slight problem when trying to seed data as part of our database migration scripts.  The de-facto standard seems to be to keep the seed data in yaml files and load them in using fixtures.  This is a perfectly adequate way of doing it for seed data that will [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So, we stumbled across a slight problem when trying to seed data as part of our database migration scripts.  The de-facto standard seems to be to keep the seed data in yaml files and load them in using fixtures.  This is a perfectly adequate way of doing it for seed data that will never change, but doesn&#8217;t really fit into the infrastructure of migrations.  There are also many plugins out there to help with using fixtures to seed data, but none of them allow you to have different seed data for different migration versions.</p>
<p>After bumping our heads together, we came up with a way of managing seed data using the same philosophy as data structure migrations.  The only prerequisite to your data structure is to add a column named &#8220;came_from_migration&#8221; to any table that is going to contain seeded data.  This way when moving down migrations it is possible to determine what data that shouldn&#8217;t be there (and delete it).</p>
<ol>
<li>Add a &#8220;fixtures&#8221; folder to /db/migrate.  Your seed data yaml files will be saved here.</li>
<li>Create your seed data yaml file and name it in a similar fashion to your migration script using the table name as the descriptor e.g. 005_table_name_to_seed.yml.  Save this in the folder you created above.  This means that you can seed several tables as part of one migration version and it&#8217;s nice and easy to see what&#8217;s going on from just the file name.</li>
<li>Now I needed to write a couple of helper methods to move to and from the seed data.  I&#8217;ve placed these in a MigrationsHelper module which is included in any migration that needs to seed data.  And because we are so nice, here they are:</li>
</ol>
<pre name="code" class="ruby">

  def seed_from_yaml(table_name)
    info = get_migration_file_info(caller[0])
    fixture_folder = RAILS_ROOT + &quot;/db/migrate/#{info[:type]}_fixtures&quot;
    fixture_file = &quot;#{info[:version]}_#{table_name}&quot;
    puts &quot;Seeding #{table_name} from #{info[:type]} fixture version #{info[:version]}&quot;

    require &#039;active_record/fixtures&#039;
    connection = ActiveRecord::Base.connection
    seed_data = Fixtures.new(connection, table_name.to_s, nil, File.join(fixture_folder, fixture_file))
    seed_data.insert_fixtures
  end

  def deseed(table_name)
    info = get_migration_file_info(caller[0])
    puts &quot;Deseeding #{table_name} with anything newer than #{info[:version]}&quot;

    execute %{DELETE FROM #{quote_table_name(table_name)} WHERE #{quote_column_name(&#039;came_from_migration&#039;)}=#{info[:version].to_i}}
  end

  private
    def get_migration_file_info(file)
      file.gsub!(/:.*/, &#039;&#039 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> # get rid of everything after the colon
      migration = file.split &#039;/&#039;
      db_type = migration.include?(&quot;global&#038;quot <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ? &quot;global&quot; : &quot;private&quot;
      migration_file = migration[migration.length-1].split &#039;_&#039;
      migration_number = migration_file[0]
      { :type =&gt; db_type, :version =&gt; migration_number, :file =&gt; migration_file }
    end
</pre>
<p><strong>Seeding data when not using migrations</strong></p>
<p>What about when running tests or deploying, i.e. seeding data when not using migrations and coming from a empty database?  Well, the schema should be held for you in your _schema.rb file, but that doesn&#8217;t cover any seed data.  The answer is to create a *_seed.yml containing <strong>all</strong> the <em>data</em> in the database (in the same way the *_schema.rb file contains the complete data <em>structure</em> schema of the database).  This way you can load in the seed data after the tables have been created.  We have yet to write this method, so is left as an exercise for the reader at present.  The basic premise is to go through every table in the schema, check for the existence of the &#8220;came_from_migration&#8221; column, do a &#8220;select * from table where came_from_migration is not null&#8221; on tables with that column and then concatenate the output from the select statements to a *_seed.yml and save in /db.  There may also be problems with referential integrity with seed data and to what order it is inserted into the database.  No doubt we will come across these difficulties soon.</p>
<p><strong>Bibliography</strong></p>
<ul>
<li>http://wiki.rubyonrails.org/rails/pages/FlexibleFixtures</li>
<li>http://railspikes.com/2008/2/1/loading-seed-data</li>
<li>http://quotedprintable.com/2007/11/16/seed-data-in-rails</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=11&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/04/10/seeding-data-as-part-of-database-migrations/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tingleychris-128.jpg" medium="image">
			<media:title type="html">tingleychris</media:title>
		</media:content>
	</item>
		<item>
		<title>Supported data types for create_table in Rails 2.0</title>
		<link>http://workbooks.wordpress.com/2008/04/10/supported-data-types-for-create_table-in-rails-20/</link>
		<comments>http://workbooks.wordpress.com/2008/04/10/supported-data-types-for-create_table-in-rails-20/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 16:52:51 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[migrations]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=10</guid>
		<description><![CDATA[Even given the sketchy documentation, I managed to glean the data types for create_table from the ActiveRecord::Migration Rails Framework Docs as being:

:string
:text
:integer
:float
:decimal
:datetime
:timestamp
:time
:date
:binary
:boolean

A default value can be specified by passing an options hash like { :default =&#62; 11 }. Other options include :limit and :null e.g. { :limit =&#62; 50, :null =&#62; false }
   [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Even given the sketchy documentation, I managed to glean the data types for create_table from the ActiveRecord::Migration Rails Framework Docs as being:</p>
<ul>
<li>:string</li>
<li>:text</li>
<li>:integer</li>
<li>:float</li>
<li>:decimal</li>
<li>:datetime</li>
<li>:timestamp</li>
<li>:time</li>
<li>:date</li>
<li>:binary</li>
<li>:boolean</li>
</ul>
<p>A default value can be specified by passing an options hash like <code>{ :default =&gt; 11 }</code>. Other options include <code>:limit</code> and <code>:null</code> e.g. <code>{ :limit =&gt; 50, :null =&gt; false }</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=10&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/04/10/supported-data-types-for-create_table-in-rails-20/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tingleychris-128.jpg" medium="image">
			<media:title type="html">tingleychris</media:title>
		</media:content>
	</item>
		<item>
		<title>Selenium RC environments with whitespace characters</title>
		<link>http://workbooks.wordpress.com/2008/04/07/selenium-rc-environments-with-whitespace-characters/</link>
		<comments>http://workbooks.wordpress.com/2008/04/07/selenium-rc-environments-with-whitespace-characters/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 13:17:35 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=9</guid>
		<description><![CDATA[We use selenium grid to orchestrate our acceptance testing over multiple browsers on multiple platforms.  One of the nice things with registering environments with the selenium grid hub, is that you can use descriptive names like: &#8220;IE on Windows XP&#8221; and &#8220;Firefox on OS X&#8221; for example.
I was having difficulties with environment names with [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We use selenium grid to orchestrate our acceptance testing over multiple browsers on multiple platforms.  One of the nice things with registering environments with the selenium grid hub, is that you can use descriptive names like: &#8220;IE on Windows XP&#8221; and &#8220;Firefox on OS X&#8221; for example.</p>
<p>I was having difficulties with environment names with whitespace characters, so after a lot of experimentation, here are the tweaks I made to get it working across all Linux and Windows.</p>
<p>The Rakefile for the selenium-grid needs to have the rc_args method redefined as follows (notice the changes on lines 6 and 7):</p>
<pre name="code" class="ruby">

def rc_args(options)
  args = []
  args &lt;&lt; &quot;-host&quot; &lt;&lt; (options[:host] || ENV[&#039;HOST&#039;] || &quot;localhost&#038;quot <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
  args &lt;&lt; &quot;-port&quot; &lt;&lt; options[:port]
  args &lt;&lt; &quot;-hubUrl&quot; &lt;&lt; (options[:hub_url] || ENV[&#039;HUB_URL&#039;] || &#039;http://localhost:4444&#039 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
  args &lt;&lt; &quot;-env&quot; &lt;&lt; &quot;\&quot;#{(options[:environment] || ENV[&#039;ENVIRONMENT&#039;] || &quot;*chrome&quot;)}\&quot;&quot;
  args &lt;&lt; &quot;-env&quot; &lt;&lt; &quot;\&quot;#{(options[:environment] || ENV[&#039;ENVIRONMENT&#039;] || &quot;*chrome&quot;)}\&quot;&quot;
  args &lt;&lt; (options[:selenium_args] || ENV[&#039;SELENIUM_ARGS&#039;] || &quot;&#038;quot <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
  args
end
</pre>
<p>Now you can run the RCs from the command line as follows:</p>
<p><em>On windows:</em><br />
<code><br />
rake rc:start PORT=5555 HUB_URL=http://172.16.7.122:4444 HOST=172.16.7.119 ENVIRONMENT=&#8221;IE on Windows Vista&#8221;<br />
</code></p>
<p><em>On linux:</em><br />
<code><br />
rake rc:start PORT=5555 HUB_URL=http://172.16.7.122:4444 HOST=172.16.7.119 ENVIRONMENT=Safari\ on\ OS\ X<br />
</code><br />
 </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=9&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/04/07/selenium-rc-environments-with-whitespace-characters/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tingleychris-128.jpg" medium="image">
			<media:title type="html">tingleychris</media:title>
		</media:content>
	</item>
		<item>
		<title>Welcome</title>
		<link>http://workbooks.wordpress.com/2008/04/07/welcome/</link>
		<comments>http://workbooks.wordpress.com/2008/04/07/welcome/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 12:40:47 +0000</pubDate>
		<dc:creator>James</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Welcome]]></category>

		<guid isPermaLink="false">http://workbooks.wordpress.com/?p=4</guid>
		<description><![CDATA[Workbooks is developing a new application, delivered using the &#8220;Software as a Service&#8221; model. Eventually we&#8217;ll no doubt post more about what the application does, and who it&#8217;s aimed at - if you want to know more go to the Workbooks website. This is the blog of Workbooks&#8217; development team; as we discover things which [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.workbooks.com/">Workbooks</a> is developing a new application, delivered using the &#8220;Software as a Service&#8221; model. Eventually we&#8217;ll no doubt post more about what the application does, and who it&#8217;s aimed at - if you want to know more go to the <a href="http://www.workbooks.com/">Workbooks website</a>. This is the blog of Workbooks&#8217; development team; as we discover things which may be useful to the community in general we&#8217;ll publish them here.</p>
<p>Technically, we&#8217;re using <a href="http://www.rubyonrails.org/">Ruby on Rails</a> and <a href="http://extjs.com/">ExtJS</a> as a starting point. We&#8217;re fans of the <a href="http://www.apple.com/macbookpro/">Apple MacBook Pro</a> and use it to run <a href="http://www.vmware.com/products/fusion/">VMware Fusion</a> as a host for 64-bit Linux development systems.</p>
<p>There are a lot of blogs which are quickly created and become moribund.  Then there are those which have a community of subscribers in the millions. While I doubt this will be the latter, we&#8217;ll do our best to fill it with useful technical information.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/workbooks.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/workbooks.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/workbooks.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/workbooks.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/workbooks.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/workbooks.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/workbooks.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/workbooks.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/workbooks.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/workbooks.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/workbooks.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/workbooks.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=workbooks.wordpress.com&blog=3404152&post=4&subd=workbooks&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://workbooks.wordpress.com/2008/04/07/welcome/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>