<?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:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JazzRecord Blog &#187; contribution</title>
	<atom:link href="http://blog.jazzrecord.org/tag/contribution/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jazzrecord.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 09 Dec 2009 21:25:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Future Plans</title>
		<link>http://blog.jazzrecord.org/2009/12/future_plans/</link>
		<comments>http://blog.jazzrecord.org/2009/12/future_plans/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 20:35:27 +0000</pubDate>
		<dc:creator>thynctank</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[contribution]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://blog.jazzrecord.org/?p=38</guid>
		<description><![CDATA[We get a fair number of visits, I think. For a rarely-maintained, grassrootsy, non-commercial site. Not a lot. We had under 400 visits the last month, according to Google Analytics, though most visits last over 2 minutes, and at least half our visitors are repeat visitors.
I have to assume folks are making use of JazzRecord [...]]]></description>
			<content:encoded><![CDATA[<p>We get a fair number of visits, I think. For a rarely-maintained, grassrootsy, non-commercial site. Not a lot. We had under 400 visits the last month, according to Google Analytics, though most visits last over 2 minutes, and at least half our visitors are repeat visitors.</p>
<p>I have to assume folks are making use of JazzRecord in some way, and that they&#8217;re visiting to refer to the documentation. I don&#8217;t see any other explanation. I&#8217;d really like to get to know the users, and find out if we can do anything to improve JazzRecord short-tern and long-term.</p>
<p>Long-term, for instance, I&#8217;d like to move our documentation into the source code repo and simply reference/style that nicer on the Web site. I&#8217;d also like to provide better docs and add a few more features, like the ability to add indexes in a model&#8217;s declaration. I&#8217;m still considering the implications of async support eventually, though I certainly don&#8217;t have time to support this idea at the moment. We&#8217;d still like to translate the docs into other languages, but we need volunteers.</p>
<p>Short-term, I&#8217;d like to add some new adapters to the codebase. I&#8217;d like to support any new runtimes that may have cropped up lately. Node.js and similar are definitely on the list. Does anyone use Jaxer still? Is there an environment you&#8217;d like to see supported? So long as SQLite or a compatible dialect of SQL is supported, and so long as a *synchronous* API of some kind exists, JazzRecord can be added with very little effort.</p>
<p>Please, take a moment and comment, here or on <a href="http://twitter.com/jazzrecord">Twitter</a>. Let us know how you use JR and what you&#8217;d like to see in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jazzrecord.org/2009/12/future_plans/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>New Features in JazzRecord 0.7: Migrations and isNew()</title>
		<link>http://blog.jazzrecord.org/2009/02/new-features-in-jazzrecord-07-migrations-and-isnew/</link>
		<comments>http://blog.jazzrecord.org/2009/02/new-features-in-jazzrecord-07-migrations-and-isnew/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 07:01:10 +0000</pubDate>
		<dc:creator>thynctank</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[behind-the-scenes]]></category>
		<category><![CDATA[contribution]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[migrations]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://blog.jazzrecord.org/?p=20</guid>
		<description><![CDATA[First off, thanks to Khou Suylong of Mango Team for once again providing me with a bug find which led to a fix!
We’ve been busy once more, putting together JazzRecord 0.7, which incorporates manual migrations with all of the major features from Rails’ ActiveRecord migrations. While there are no official updated docs yet, here’s a brief list of changes:
ID must now [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">First off, <strong>thanks to Khou Suylong of Mango Team</strong> for once again providing me with a bug find which led to a fix!</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">We’ve been busy once more, putting together <strong><strong>JazzRecord</strong> <strong>0.7</strong></strong>, which incorporates <em>manual <strong>migrations</strong></em> with all of the major <strong>features</strong> from Rails’ ActiveRecord <strong>migrations</strong>. While there are no official updated docs yet, here’s a brief list of changes:</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">ID must now explicitly be listed as a column for a model. If using automigrations, you must list it in the model definition. The explicit requirement for ID column may change going forward, but once we hit Version 1 (another month, perhaps) we will stand firm on the API. <em>If using manual <strong>migrations</strong>, you may now leave out columns from the model definition entirely and rely on <strong>migrations</strong> setting the model’s column knowledge for you.</em></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">What this means is, <em>no matter what changes you make to a db schema using <strong>migrations</strong>, the model is always aware of the current state of the schema</em> and will allow you to create, destroy, and modify properties of records with no problem. The only thing to watch out for is validations if you have any, because they can cause problems if there are requirements which cannot be satisfied given a specific updated schema.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">The following schema operations are available as of now:</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;"><strong>JazzRecord</strong>.createTable(tableName, cols) &#8211; this creates a table using a columns object, identical the the (now optional) columns object from a model declaration.</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 15px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;"><code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.dropTable(tableName)</code> &#8211; removes a table from the DB.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 15px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;"><code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.renameTable(tableName)</code> &#8211; renames a table</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 15px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;"><code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.addColumn(tableName, colName, colType)</code> &#8211; adds a column of given type to a table</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 15px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;"><code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.removeColumn(tableName, colName)</code> &#8211; removes a column from a table</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 15px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;"><code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.renameColumn(tableName, oldName, newName)</code> &#8211; renames a given column in a table</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 15px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;"><code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.changeColumn(tableName, colName, colType)</code> &#8211; changes the type of a column. This can result in data loss, as determined by how the DB converts data types</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">The last three functions were the trickiest, because <strong>SQLite does not provide inherent capabilities for modifying columns once they exist in a table</strong>. In order to reproduce these<strong>features</strong>, then, we have to go about slurping up all data in a table, dropping the existing table, creating a <strong>new</strong> table with the <strong>new</strong> schema, and spitting the same data back into the database, with data types changed or columns removed or changed in type. To keep this (hopefully) relatively safe, we wrap the destructive DROP operation in a transaction.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">Did anyone even know <strong>JazzRecord</strong> had a <code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.runTransaction(func, bind)</code> method? I’m not sure! Calling this and passing in a function full of operations will ensure that if something goes wrong and you or some function you call throws an exception, all will revert to its pre-transaction state. Pretty cool, huh?</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">Making use of the schema operations is as simple as calling them anywhere, though typically you’d organize them into <strong>migrations</strong>. <strong>Migrations</strong> are now a bit streamlined, as well.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">To automigrate, simply call <code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.migrate()</code> with no options, or to refresh the DB to an empty state, pass in an object with refresh property set to true:<code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.migrate({refresh: true})</code>. To optionally load fixture data, assign a fixtures object (same as the old object format) to <em><strong>JazzRecord</strong>.fixtures</em>, and if it exists it will be loaded. To run <strong>migrations</strong>, simply assign to <em><strong>JazzRecord</strong>.<strong>migrations</strong></em> an object literal with numerically-named properties (starting with the number 1) each containing an object literal which has an up function and a down function. These functions should be the reverse of one another, and for an explanation of proper migration usage consult any Rails tutorial or wait for the documentation. Here’s a simple sample migration which creates a couple tables and adds a column to one of them over a few schema versions:</p>
<pre style="font-family: 'Lucida Grande', Verdana, sans-serif; padding: 0px; margin: 0px;"><code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; display: block; padding: 15px; margin: 0px;">  <strong>JazzRecord</strong>.<strong>migrations</strong> = {
    1: {
      up: function() {
        <strong>JazzRecord</strong>.createTable("military_dudes", {
          id: "number",
          name: "text",
          title: "text",
          base_id: "number"
        });

        <strong>JazzRecord</strong>.createTable("bases", {
          id: "number",
          location_name: "text"
        });
      },
      down: function() {
        <strong>JazzRecord</strong>.dropTable("bases");
        <strong>JazzRecord</strong>.dropTable("military_dudes");
      }
    },

    2: {
      up: function() {
        <strong>JazzRecord</strong>.renameColumn("military_dudes", "title", "rank");
        <strong>JazzRecord</strong>.addColumn("bases", "state", "text");
      },
      down: function() {
        <strong>JazzRecord</strong>.removeColumn("bases", "state");
        <strong>JazzRecord</strong>.renameColumn("military_dudes", "rank", "title");
      }
    }
  };
</code></pre>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">After setting up a <strong>migrations</strong> object like this, you can call <code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.migrate()</code> standalone (to migrate to the latest version), or you can pass in a version number to reach the specified migration number. To reset to pre-migration status, call <code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>JazzRecord</strong>.migrate(0)</code>. In this way, you can evolve an application’s schema over time and can almost effortlessly jump between schema versions to diagnose problems or revert when you’ve introduced more problems than you’ve fixed! You can pretty much use <strong>migrations</strong> exactly as in Rails: changing schema and inserting/removing/updating data for existing, already-deployed applications. Soon we will add additional tools for updating multiple columns and multiple rows simultaneously, which will further add to the usefulness of <strong>migrations</strong>.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">The smaller, but still useful, function introduced in <strong>JazzRecord</strong> <strong>0.7</strong> is Record’s <code style="font-family: 'Andale Mono', Monaco, 'Courier New', Courier, monospace; background-color: #666666; color: #ffffff; padding: 0px; margin: 0px;"><strong>isNew</strong>()</code> function. This function, when called, will return true if a record has <em>not</em> been saved yet, or false if it <em>has</em>.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">As a previous blog post stated, we are extremely interested in having our documentation translated into other languages, so please contact me at <a style="font-family: 'Lucida Grande', Verdana, sans-serif; color: #336699; font-weight: bold; text-decoration: none; padding: 0px; margin: 0px;" href="mailto:thynctank@thynctank.com">thynctank@thynctank.com</a> if you can help with that.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jazzrecord.org/2009/02/new-features-in-jazzrecord-07-migrations-and-isnew/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You Have the Pen (with which to Translate Documentation)!</title>
		<link>http://blog.jazzrecord.org/2009/02/you-have-the-pen-with-which-to-translate-documentation/</link>
		<comments>http://blog.jazzrecord.org/2009/02/you-have-the-pen-with-which-to-translate-documentation/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 18:43:29 +0000</pubDate>
		<dc:creator>David Rivers</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[contribution]]></category>
		<category><![CDATA[localization]]></category>

		<guid isPermaLink="false">http://blog.jazzrecord.org/?p=24</guid>
		<description><![CDATA[Nick’s last post made me think of that fruity dance song from the early 90s (or some time around then).  This post is like a remix, except instead of empowering you I’m hoping to exploit your possible multilingualism for the sake of JazzRecord!  (And in keeping with blog titles that include exclamation points, I hereby christen [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">Nick’s last post made me think of that fruity dance song from the early 90s (or some time around then).  This post is like a remix, except instead of empowering <strong>you</strong> I’m hoping to exploit your possible multilingualism for the sake of JazzRecord!  (And in keeping with blog titles that include exclamation points, I hereby christen yet another reckless blurt of the English language!!…)</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">JazzRecord is veritably an international JavaScript ORM.  It eats at the International House of Pancakes (Are there even any of these restaurants outside of the United States?) and it drives on the wrong side of the road.  It can’t help it.  It just loves multinationalism.  Actually, as of last week, Google Analytics reports that JazzRecord.org has enjoyed visitors from <em>all seven continents</em>!  That’s right!  Someone from Antarctica visited 3 pages and spent a whopping 14 minutes and 13 seconds on JazzRecord.org!  That’s one JavaScript ORMing penguin!!!  JazzRecord.org has hosted <em>72 countries</em>‘ worth of visitors that speak <em>40 languages</em>, and is particularly well read by Eurasia, and recently Brazil!  This is all very exciting news to the JazzRecord team. However, there is a problem with these demographics: I remember very little of my high school German and Spanish courses. Also, I don’t know a lick of Portuguese, Khmer, Russian, or whatever the hell it is they speak in England!  <strong>We’re hoping that this is where <strong>you</strong> come in</strong>.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">The JazzRecord team is always excited to hear from developers that are using the library in other parts of the world, especially ones that speak other languages, but we’re afraid that the all-English <strong>documentation</strong> might be impeding their usage.  <strong>So, we’re calling out all fluently bilingual JazzRecord users to help us expand our <strong>documentation</strong> into other languages!</strong> If <strong>you</strong> fit this description and would like to help out, please send an email to Nick Carter (Project Leader) at thynctank at thynctank dot com or David Rivers (Web Designer/Webmaster) at david at ideogon dot com.  We can’t promise that helping us out will get <strong>you</strong> on Oprah, but we will certainly give credit where credit is due!</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: 'Lucida Grande', Verdana, sans-serif; line-height: 17px; padding: 0px;">JazzRecord is open-source, free software, because a small group of developers devote their blood, sweat, tears, first-born, and third arms to the cause. Unlike the RIAA we believe in the power of transparency and collaboration. However, <strong>we do need <strong>you</strong></strong> (Think like Uncle Sam is pointing <strong>you</strong> out minus all the negative connotations that the American military would conjure in the minds of our far-reaching user base)! After all, I can hit my Rosetta Stone even harder, but I don’t think my ability to describe an apple in each of the colors of the rainbow is going to get us anywhere!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jazzrecord.org/2009/02/you-have-the-pen-with-which-to-translate-documentation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
