<?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>AdaRuby &#187; Tutorials</title>
	<atom:link href="http://www.adaruby.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adaruby.com</link>
	<description>Rich Dynamic Applications with Ruby on Rails</description>
	<lastBuildDate>Fri, 02 Jul 2010 09:06:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Aquarium 0.4.2: Aspect-Oriented Programming for Ruby</title>
		<link>http://www.adaruby.com/2008/05/27/aquarium-042-aspect-oriented-programming-for-ruby/</link>
		<comments>http://www.adaruby.com/2008/05/27/aquarium-042-aspect-oriented-programming-for-ruby/#comments</comments>
		<pubDate>Wed, 28 May 2008 03:48:23 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Aquarium]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/05/27/aquarium-042-aspect-oriented-programming-for-ruby/</guid>
		<description><![CDATA[
			
				
			
		
Aquarium is a framework that implements Aspect-Oriented Programming (AOP) for Ruby. The premise of AOP is that some concerns in an application will  cut across the natural object boundaries of the problem domain. Rather than scatter duplicated code in each object to handle the cross-cutting concern, AOP modularizes the specification of which execution points [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F05%2F27%2Faquarium-042-aspect-oriented-programming-for-ruby%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F05%2F27%2Faquarium-042-aspect-oriented-programming-for-ruby%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Aquarium 0.4.2: Aspect Oriented Programming for Ruby" alt=" Aquarium 0.4.2: Aspect Oriented Programming for Ruby" /><br />
			</a>
		</div>
<p>Aquarium is a framework that implements Aspect-Oriented Programming (AOP) for Ruby. The premise of AOP is that some concerns in an application will  cut across the natural object boundaries of the problem domain. Rather than scatter duplicated code in each object to handle the cross-cutting concern, AOP modularizes the specification of which execution points are affected (called join points) and the actions that should be invoked at those points.</p>
<p><strong>New in V0.4.0</strong>: Preliminary support for advising Java classes in JRuby! See the discussion <a href="http://aquarium.rubyforge.org/jruby.html" rel="nofollow" >here</a>.</p>
<p>See also the <a href="http://rubyforge.org/projects/aquarium/" rel="nofollow" >RubyForge project page</a>.</p>
<h3><strong>Usage </strong></h3>
<p>Aquarium provides a Domain Specific Language (DSL) with which you can express “aspectual” system behaviour in a modular way, <em>i.e.,</em> using a succinct language and without repeating yourself all over your code base!</p>
<p>Imagine you want to trace all invocations of the public, instance methods in all classes whose names end with “Service”. Here’s how you can implement that behavior in Aquarium:</p>
<pre>
<pre class="brush: ruby;">class ServiceTracer
    include Aquarium::Aspects::DSL::AspectDSL
    before :calls_to =&gt; :all_methods, :in_types =&gt; /Service$/ do |join_point, object, *args|
      log &quot;Entering: #{join_point.target_type.name}##{join_point.method_name}: object = #{object}, args = #{args}&quot;
    end
    after :calls_to =&gt; :all_methods, :in_types =&gt; /Service$/ do |join_point, object, *args|
      log &quot;Leaving: #{join_point.target_type.name}##{join_point.method_name}: object = #{object}, args = #{args}&quot;
    end
end</pre>
<p>A more succinct implementation of this behavior uses <code>#around</code> advice:</pre>
<pre>
<pre class="brush: ruby;">class ServiceTracer
    include Aquarium::Aspects::DSL::AspectsDSL
    around :calls_to =&gt; :all_methods, :in_types =&gt; /Service$/ do |join_point, object, *args|
      log &quot;Entering: #{join_point.target_type.name}##{join_point.method_name}: object = #{object}, args = #{args}&quot;
      result = join_point.proceed
      log &quot;Leaving: #{join_point.target_type.name}##{join_point.method_name}: object = #{object}, args = #{args}&quot;
      result  # block needs to return the result of the &quot;proceed&quot;!
    end
end</pre>
<p>See the <a href="http://aquarium.rubyforge.org/examples.html" rel="nofollow" >Examples</a> and the <a href="http://aquarium.rubyforge.org/documentation/API/index.html" rel="nofollow" >API</a> section for more details.</pre>
<p><strong>Start Here </strong></p>
<pre class="brush: bash;">$ gem install -y aquarium</pre>
<p>See the <a href="http://aquarium.rubyforge.org/download.html" rel="nofollow" >download</a> page for different options or go directly to <a href="http://rubyforge.org/frs/?group_id=4281" rel="nofollow" >Rubyforge download</a> page.</p>
<p>more resources: <a href="http://aquarium.rubyforge.org/" rel="nofollow" >Aquarium.rubyforge home page</a>.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/05/27/aquarium-042-aspect-oriented-programming-for-ruby/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing RubyGems in Ubuntu Gutsy Installation</title>
		<link>http://www.adaruby.com/2008/03/24/fixing-rubygems-in-ubuntu-gutsy-installation/</link>
		<comments>http://www.adaruby.com/2008/03/24/fixing-rubygems-in-ubuntu-gutsy-installation/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 11:57:08 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Complaints]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[gutsy]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[rubygems.ruby]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/03/24/fixing-rubygems-in-ubuntu-gutsy-installation/</guid>
		<description><![CDATA[
			
				
			
		

Upgrading to the latest RubyGems in Ubuntu Gutsy is a bit non-straightforward. I&#8217;d like to share a quick fix this time. It&#8217;s trivial when you know it, but if not, a friend of mine has almost hosed his system just because of this annoying &#8220;bug&#8221;.
Installing Ruby in Ubuntu is pretty simple:
sudo aptitude install ruby ri [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F24%2Ffixing-rubygems-in-ubuntu-gutsy-installation%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F24%2Ffixing-rubygems-in-ubuntu-gutsy-installation%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Fixing RubyGems in Ubuntu Gutsy Installation" alt=" Fixing RubyGems in Ubuntu Gutsy Installation" /><br />
			</a>
		</div>
<p><a href="http://www.flickr.com/photos/evil_genius_photography/1415180013/" rel="nofollow" ><img src="http://farm2.static.flickr.com/1098/1415180013_435881aab1.jpg?v=0" alt="Ruby-like firetruck" height="500" width="333" title="Fixing RubyGems in Ubuntu Gutsy Installation" /></a></p>
<p>Upgrading to the latest <a href="http://www.rubygems.org/" rel="nofollow" >RubyGems</a> in <a href="http://www.ubuntu.com/" rel="nofollow" >Ubuntu</a> Gutsy is a bit non-straightforward. I&#8217;d like to share a quick fix this time. It&#8217;s trivial when you know it, but if not, a friend of mine has almost hosed his system just because of this annoying &#8220;bug&#8221;.</p>
<p>Installing <a href="http://www.ruby-lang.org/" rel="nofollow" >Ruby</a> in Ubuntu is pretty simple:</p>
<pre>sudo aptitude install ruby ri irb rdoc rubygems libruby-extras libmysql-ruby ruby1.8-dev</pre>
<p>(add other packages as you see fit)</p>
<p>The problem occurs right after you upgrade RubyGems to the latest version:</p>
<pre>sudo gem update --system</pre>
<p>Then you get something like this:</p>
<pre>ceefour@caliva:/usr/bin$ gem
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)</pre>
<p>Logging in and out doesn&#8217;t work. The world is coming to an end!</p>
<p>Don&#8217;t worry, the world is still running. Check out your /usr/bin folder:</p>
<pre>ceefour@caliva:/usr/bin$ ls -la gem*
-rwxr-xr-x 1 root root 701 2007-08-24 12:18 gem
-rwxr-xr-x 1 root root 698 2008-03-20 09:20 gem1.8
-rwxr-xr-x 1 root root  84 2008-03-20 09:20 gemlock
-rwxr-xr-x 1 root root  89 2008-03-20 09:20 gem_mirror
-rwxr-xr-x 1 root root  76 2008-03-20 09:20 gemri
-rwxr-xr-x 1 root root  89 2008-03-20 09:20 gem_server
-rwxr-xr-x 1 root root  86 2008-03-20 09:20 gemwhich</pre>
<p>So, there is some mismatch between gem and gem1.8. The latter being the newer/correct version.</p>
<p>Simply remove the &#8220;gem&#8221; one and replace (or link) it to the &#8220;gem1.8&#8243; one:</p>
<pre>ceefour@caliva:/usr/bin$ sudo rm gem
ceefour@caliva:/usr/bin$ sudo ln -s gem1.8 gem</pre>
<p>Now:</p>
<pre>ceefour@caliva:/usr/bin$ gem -v
1.0.1</pre>
<p>Presto! We&#8217;re back in business. <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' title="Fixing RubyGems in Ubuntu Gutsy Installation" /> </p>
<p>Interesting RubyGems articles:</p>
<ul>
<li><a href="http://blog.fiveruns.com/2008/3/3/compiling-ruby-rubygems-and-rails-on-ubuntu" rel="nofollow" >Compiling Ruby, RubyGems and Rails on Ubuntu</a></li>
<li><a href="http://dmitterdorfer.blogspot.com/2006/01/ruby-gems-on-ubuntu-linux.html" rel="nofollow" >Jag har litet bråttom: Ruby Gems on Ubuntu Linux</a></li>
<li><a href="http://wafa.web.id/2008/01/20/ruby-rubygems-mirroring/" rel="nofollow" >:: nEvEr gIVeUp :: » Ruby, RubyGems Mirroring</a></li>
<li><a href="http://www.vmunix.com/mark/blog/archives/2006/04/08/ruby-gems-still-doesnt-work-on-104/" rel="nofollow" >VMUNIX Blues » Blog Archive » Ruby GEMS still doesn’t work on 10.4?</a></li>
<li><a href="http://digitalemagine.com/wordpress/archives/18" rel="nofollow" >Stefano’s Blog(s) » The magic world of Ruby, Rails and RubyGems &#8230;</a></li>
<li><a href="http://www.openlogic.com/blogs/2007/06/rubyrailsmysql-installation-h-e-double-hockey-sticks/" rel="nofollow" >Ruby/RubyGems/Rails/MySQL installation h e double-hockey sticks &#8230;</a></li>
</ul>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/03/24/fixing-rubygems-in-ubuntu-gutsy-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating Subversion repositories using SVK</title>
		<link>http://www.adaruby.com/2008/03/20/migrating-subversion-repositories-using-svk/</link>
		<comments>http://www.adaruby.com/2008/03/20/migrating-subversion-repositories-using-svk/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 11:02:41 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[migrate]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svk]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/03/20/migrating-subversion-repositories-using-svk/</guid>
		<description><![CDATA[
			
				
			
		
Recently I got a task which involves moving, or let&#8217;s say copying, an entire Subversion repository with history to another server. Problem is, I didn&#8217;t have access to the server itself, which means I couldn&#8217;t do a regular &#8220;svnadmin dump&#8221;.
SVK comes to the rescue!

To make it work, first of all you need to install SVK. [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F20%2Fmigrating-subversion-repositories-using-svk%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F20%2Fmigrating-subversion-repositories-using-svk%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Migrating Subversion repositories using SVK" alt=" Migrating Subversion repositories using SVK" /><br />
			</a>
		</div>
<p>Recently I got a task which involves moving, or let&#8217;s say copying, an entire Subversion repository with history to another server. Problem is, I didn&#8217;t have access to the server itself, which means I couldn&#8217;t do a regular &#8220;svnadmin dump&#8221;.</p>
<p>SVK comes to the rescue!</p>
<p><a href="http://www.flickr.com/photos/jenniferbuehrer/447221619/" rel="nofollow" ><img src="http://farm1.static.flickr.com/250/447221619_5ab9e67a0a.jpg?v=0" alt="Firefighter in style!" height="500" width="332" title="Migrating Subversion repositories using SVK" /></a></p>
<p>To make it work, first of all you need to install SVK. In Ubuntu it goes like this:</p>
<pre>sudo aptitude install svk</pre>
<p>When you first run svk it&#8217;ll ask you to create a local depot, you can simply agree to its suggestion.</p>
<p>Now we mirror both of the Subversion repositories we&#8217;re trying to import and export from and to. Note that you need to create the destination repository first.</p>
<pre>svk mirror //source http://svn.source.com/project1/
svk mirror //dest http://svn.dest.com/newproject/</pre>
<p>A bit of niceness with this method instead of a regular svn dump/load procedure is that:</p>
<ul>
<li> you can import to a different folder/subfolder instead of the root folder</li>
<li>you can do a partial export (subfolder of project repository)</li>
</ul>
<p>Before doing the actual migration process, let&#8217;s sync these mirrors first:</p>
<pre>svk sync //source
svk sync //dest</pre>
<p>And then you&#8217;ll do the real thing. But we can simulate it first by using &#8220;&#8211;check-only&#8221;, kinda&#8217; like when you simulate a DVD burning session before actually writing it.</p>
<pre>svk smerge //source //dest --incremental --log --sync --verbatim --track-rename --baseless --check-only</pre>
<p>There are several switches that I used above, feel free to use them only as needed:</p>
<ul>
<li>-I [--incremental]: apply each change individually</li>
<li>-l [--log]: use logs of merged revisions as commit message</li>
<li>-B [--baseless]: use the earliest revision as the merge point</li>
<li>-s [--sync]: synchronize mirrored sources before update</li>
<li>&#8211;verbatim: verbatim merge log without indents and header</li>
<li>&#8211;track-rename: track changes made to renamed node</li>
<li>-C [--check-only]: try operation but make no changes</li>
</ul>
<p>After you&#8217;re ready, redo the above command without &#8220;&#8211;check-only&#8221;:</p>
<pre>svk smerge //source //dest --incremental --log --sync --verbatim --track-rename --baseless</pre>
<p>Simply wait several minutes&#8211;or possibly hours (or days!) if your project is sufficiently large&#8211;for SVK to do its job for you!</p>
<p>Are there disadvantages of using SVK to a &#8220;genuine&#8221; SVN dump/load? Sure, among them is that the original author names are lost.</p>
<p>Good luck!</p>
<p>Related articles and resources:</p>
<ul>
<li><a href="http://svk.bestpractical.com/" rel="nofollow" >HomePage &#8211; SVK Wiki</a></li>
<li><a href="http://utsl.gen.nz/talks/git-svn/intro.html" rel="nofollow" >An introduction to git-svn for Subversion/SVK users and deserters</a></li>
<li><a href="http://scottstuff.net/blog/articles/2005/07/07/distributed-development-with-svk" rel="nofollow" >Distributed development with SVK</a></li>
<li><a href="http://www.newartisans.com/blog_files/svk.primer.php" rel="nofollow" >An SVK primer | Tools | New Artisans LLC</a></li>
<li><a href="http://hsenidians.blogspot.com/2007/07/using-svk-for-offline-access-to.html" rel="nofollow" >Make it happen: Using SVK for offline access to subversion</a></li>
<li><a href="http://www.jkraemer.net/2006/8/15/work-offline-with-svk-and-subversion" rel="nofollow" >jkraemer.net: Work offline with SVK and Subversion</a></li>
<li><a href="http://sablog.com/archives/2006/03/20/svk-mirror-subversion-repositories-locally-and-more" rel="nofollow" >SVK &#8211; Mirror Subversion Repositories Locally and More at sablog.com</a></li>
</ul>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/03/20/migrating-subversion-repositories-using-svk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Overview of A Rails Plugin</title>
		<link>http://www.adaruby.com/2008/01/27/overview-of-a-rails-plugin/</link>
		<comments>http://www.adaruby.com/2008/01/27/overview-of-a-rails-plugin/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 11:48:23 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[294]]></category>
		<category><![CDATA[296]]></category>
		<category><![CDATA[344]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/01/27/overview-of-a-rails-plugin/</guid>
		<description><![CDATA[
			
				
			
		
A common stumbling block for beginner Rails developers is learning the basics required to write plugins. This is made more complicated by the fact that Ruby is inherently dynamic and offers many techniques for code reuse.
Luckily, if you can write Rails applications you can write plugins by simply drawing on a handful of basic patterns.
Why [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F01%2F27%2Foverview-of-a-rails-plugin%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F01%2F27%2Foverview-of-a-rails-plugin%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Overview of A Rails Plugin" alt=" Overview of A Rails Plugin" /><br />
			</a>
		</div>
<p><a href="http://www.alexyoung.org/" rel="nofollow" >A common stumbling block for beginner Rails developers</a> is learning the basics required to write plugins. This is made more complicated by the fact that Ruby is inherently dynamic and offers many techniques for code reuse.</p>
<p>Luckily, if you can write Rails applications you can write plugins by simply drawing on a handful of basic patterns.</p>
<p><strong>Why write plugins?</strong></p>
<blockquote><p>Writing a plugin will:</p>
<ul>
<li>Help make sharing code more efficient, whether it’s between projects or within the same project</li>
<li>Allow you to publish generic code to the community</li>
<li>Save time and increase your confidence by testing once and reusing many times</li>
<li>Share functionality in a robust manner, especially when using namespaces with ActiveRecord</li>
</ul>
</blockquote>
<p><strong>Usage</strong></p>
<blockquote><p>Rails provides installation scripts through <tt>script/plugin install</tt>, and a generator for creating new plugins: <tt>script/generate plugin</tt>. These will work with URLs, saving time when trying out plugins. You can read more about installing and managing plugins at the <a href="http://wiki.rubyonrails.org/rails/pages/Plugins" rel="nofollow" >Rails wiki</a>.</p></blockquote>
<p><strong>Rubyisms</strong></p>
<blockquote><p>Any of the following tools and techniques provided by Ruby are used by plugins to extend functionality:</p>
<ul>
<li>Mixins: including or extending classes using modules</li>
<li>Opening a class or module definition and adding or overriding methods</li>
<li>Dynamic extension through callbacks and hooks: <tt>method_missing</tt>, <tt>Class#inherited</tt>, <tt>Module#const_missing</tt>, <tt>Module#included</tt></li>
<li>Dynamic extension through code generation: <tt>eval</tt>, <tt>class_eval</tt>, <tt>instance_eval</tt></li>
</ul>
<p>These techniques fall into two broad categories:</p>
<ul>
<li>Using modules and classes to extend existing classes, providing new features</li>
<li>Using introspection to adapt generic code to specific cases</li>
</ul>
<p>It’s important to consider exactly what should be extended when writing a plugin. If complex meta-programming to adapt your plugin to the host application is required, care should be taken to ensure concurrency will not produce unexpected results.</p></blockquote>
<p>Hopefully this very short summary clears things a bit. Read more on  <a href="http://alexyoung.org/articles/show/40/a_taxonomy_of_rails_plugins" rel="nofollow" >Alex Young&#8217;s article</a>.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/01/27/overview-of-a-rails-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update Your Ruby Environment Using Portable Ruby</title>
		<link>http://www.adaruby.com/2008/01/15/update-your-ruby-environment-using-portable-ruby/</link>
		<comments>http://www.adaruby.com/2008/01/15/update-your-ruby-environment-using-portable-ruby/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 11:31:37 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[299]]></category>
		<category><![CDATA[300]]></category>
		<category><![CDATA[320]]></category>
		<category><![CDATA[323]]></category>
		<category><![CDATA[338]]></category>
		<category><![CDATA[345]]></category>
		<category><![CDATA[346]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/01/15/update-your-ruby-environment-using-portable-ruby/</guid>
		<description><![CDATA[
			
				
			
		
The goal of Portable Ruby is to reduce those updates to a single place, your USB drive. About.com describes how to make this possible:
Installing Ruby
The easiest way to setup a Portable Ruby application is to start with an existing Ruby installation. I recommend the One-Click Installer. If you haven&#8217;t done so already, go ahead and [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F01%2F15%2Fupdate-your-ruby-environment-using-portable-ruby%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F01%2F15%2Fupdate-your-ruby-environment-using-portable-ruby%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Update Your Ruby Environment Using Portable Ruby" alt=" Update Your Ruby Environment Using Portable Ruby" /><br />
			</a>
		</div>
<p>The goal of <a href="http://ruby.about.com/od/resources/ss/portable_ruby_3.htm" rel="nofollow" >Portable Ruby</a> is to reduce those updates to a single place, your USB drive. About.com describes how to make this possible:</p>
<blockquote><p><strong>Installing Ruby</strong></p>
<p>The easiest way to setup a Portable Ruby application is to start with an existing Ruby installation. I recommend the <a href="http://rubyinstaller.rubyforge.org/wiki/wiki.pl" rel="nofollow" >One-Click Installer</a>. If you haven&#8217;t done so already, go ahead and install it.</p>
<p>The entire Ruby distribution is created in a single &#8220;ruby&#8221; directory structure. Additional changes include the creation of shortcuts  for the start menu, which we will simulate in the PortableApp menu. The <a href="http://rubyinstaller.rubyforge.org/wiki/wiki.pl" rel="nofollow" >One-Click Installer</a> also updates the Windows PATH environment variable to include the ruby\bin directory.</p>
<p><strong>Layout the PortableApp Structure</strong></p>
<p>Another helpful tip is to install PortableApps to the root of your hard drive so you can easily test the integration of your Portable Ruby development. Using the earlier articles as a reference, install PortableApps to &#8220;C:\PortableRoot&#8221;.</p>
<p>The next step is to create a standard PortableApp directory structure. To make this easy, you can download the <a href="http://ruby.about.com/library/rubytools/RubyPortable.zip" rel="nofollow" >Ruby Portable Template</a> starter zip. In addition to the directory structure, the starter zip also contains files for creating the Ruby and SciTE Portable launchers.</p>
<p>Unzip the <a href="http://ruby.about.com/library/rubytools/RubyPortable.zip" rel="nofollow" >Ruby Portable Template</a> inside of the directory &#8220;C:\PortableRoot\PortableApps\&#8221;. Your directory structure should look similar to the following.</p>
<ul>
<li>C:\PortableRoot
<ul>
<li>PortableApps
<ul>
<li><em>OtherApps</em></li>
<li>RubyPortable
<ul>
<li>App
<ul>
<li>AppInfo</li>
<li>ruby</li>
</ul>
</li>
<li>Data
<ul>
<li>settings</li>
</ul>
</li>
<li>Other
<ul>
<li>RubyPortableSource</li>
<li>RubySource</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</blockquote>
<blockquote></blockquote>
<blockquote>
<p align="left">At this point, you can copy the contents of the &#8220;ruby&#8221; directory the One-Click Installer created into the RubyPortable -&gt; App -&gt; ruby directory.</p>
<p align="left"> Check your free space first. The directory is about 80MB, but I would plan on having additional free space for your projects. Once you have copied the Ruby directories over, you can uninstall the One-Click Installer. While this isn&#8217;t technically necessary, it is helpful to remove the changes to the Windows environment so they do not conflict with testing your setup of the Portable Ruby application.</p>
</blockquote>
<p align="left">More information and instructions are available on <a href="http://ruby.about.com/od/resources/ss/portable_ruby_3.htm" rel="nofollow" >About.com: Ruby</a> page.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/01/15/update-your-ruby-environment-using-portable-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scraping Gmail with Mechanize and Hpricot</title>
		<link>http://www.adaruby.com/2008/01/11/scraping-gmail-with-mechanize-and-hpricot/</link>
		<comments>http://www.adaruby.com/2008/01/11/scraping-gmail-with-mechanize-and-hpricot/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 00:14:00 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Praises]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[302]]></category>
		<category><![CDATA[326]]></category>
		<category><![CDATA[329]]></category>
		<category><![CDATA[336]]></category>
		<category><![CDATA[337]]></category>
		<category><![CDATA[354]]></category>
		<category><![CDATA[364]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/01/11/scraping-gmail-with-mechanize-and-hpricot/</guid>
		<description><![CDATA[
			
				
			
		
We&#8217;ve been doing a lot of scraping and mashups lately. So we&#8217;d love to share on how to do this. Fortunately Schadenfreude has written a good tutorial about using Mechanize and Hpricot to scrape Gmail.
The tutorial uses mechanize and hpricot to login to gmail and return a list of Unread emails.
Installation of required tools
 gem [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F01%2F11%2Fscraping-gmail-with-mechanize-and-hpricot%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F01%2F11%2Fscraping-gmail-with-mechanize-and-hpricot%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Scraping Gmail with Mechanize and Hpricot" alt=" Scraping Gmail with Mechanize and Hpricot" /><br />
			</a>
		</div>
<p>We&#8217;ve been doing a lot of scraping and mashups lately. So we&#8217;d love to share on how to do this. Fortunately <a href="http://schf.uc.org/articles/2007/02/14/scraping-gmail-with-mechanize-and-hpricot" rel="nofollow" >Schadenfreude has written a good tutorial about using Mechanize and Hpricot to scrape Gmail</a>.</p>
<p>The tutorial uses mechanize and hpricot to login to gmail and return a list of Unread emails.</p>
<p><strong>Installation of required tools</strong></p>
<blockquote><p> <code>gem install mechanize --include-dependencies<br />
</code></p></blockquote>
<blockquote><p>This will install both mechanize and hpricot.</p></blockquote>
<p><strong>Usage</strong></p>
<blockquote><p>Before we can scrape our gmail account, we will need to login. Mechanize is a lib for “automating interaction with websites”. It can store and send cookies as well so once we login our script will now have a session to putter around in as if it was a web browser.</p></blockquote>
<p>&nbsp;</p>
<blockquote>
<pre>require 'rubygems'
require 'mechanize'

agent = WWW::Mechanize.new
page = agent.get 'http://www.gmail.com'

form = page.forms.first
form.Email = '***your gmail account***'
form.Passwd = '***your password***'

page = agent.submit form</pre>
</blockquote>
<blockquote><p>After logging in gmail will try to redirect us to http://mail.google.com/mail?ui&amp;auth=DC8F…. we need to follow this link. Using hpricot we can search for the meta redirect and grab the href attribute then have mechanize follow the link.</p></blockquote>
<p>&nbsp;</p>
<blockquote><p> <code>page = agent.get page.search("//meta").first.attributes['href'].gsub(/'/,'')</code></p></blockquote>
<blockquote><p><em>Note we need to strip the single quotes from around the url, i used gsub for this.</em></p></blockquote>
<blockquote><p>The returned page will try to use javascript to load the interface but it will not work for use. Thankfully a <strong>noscript</strong> tag is included in the source and contains a helpful clue.</p></blockquote>
<blockquote>
<pre>&lt;noscript&gt;&lt;font face="arial"&gt;JavaScript must be enabled in order for you to use Gmail in standard view.
However, it seems JavaScript is either disabled or not supported by your browser.
To use standard view, enable JavaScript by changing your browser options, then &lt;a href=""&gt;try again&lt;/a&gt;.

&lt;p&gt;To use Gmail's basic HTML view, which does not require JavaScript,
&lt;a href="?ui=html&amp;zy=n"&gt;click here&lt;/a&gt;.&lt;/p&gt;&lt;/font&gt;

&lt;p&gt;&lt;font face="arial"&gt;If you want to view Gmail on a mobile phone or similar device
&lt;a href="?ui=mobile&amp;zyp=n"&gt;click here&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;&lt;/noscript&gt;</pre>
</blockquote>
<p><strong>Full source</strong></p>
<p>&nbsp;</p>
<blockquote>
<pre>require 'rubygems'
require 'mechanize'

agent = WWW::Mechanize.new

page = agent.get 'http://www.gmail.com'
form = page.forms.first
form.Email = '***your gmail account***'
form.Passwd = '***your password***'
page = agent.submit form

page = agent.get page.search("//meta").first.attributes['href'].gsub(/'/,'')
page = agent.get page.uri.to_s.sub(/\?.*$/, "?ui=html&amp;zy=n")
page.search("//tr[@bgcolor='#ffffff']")  do |row|
from, subject = *row.search("//b/text()")
url = page.uri.to_s.sub(/ui.*$/, row.search("//a").first.attributes["href"])
puts "From: #{from}\nSubject: #{subject}\nLink: #{url}\n\n"

email = agent.get url
# ..
end</pre>
</blockquote>
<p>Enjoy the tutorial!</p>
<p>Read more on <a href="http://schf.uc.org/articles/2007/02/14/scraping-gmail-with-mechanize-and-hpricot" rel="nofollow" >Schadenfreude</a>.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/01/11/scraping-gmail-with-mechanize-and-hpricot/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sinatra: Classy web-development dressed in a DSL</title>
		<link>http://www.adaruby.com/2007/11/17/sinatra-classy-web-development-dressed-in-a-dsl/</link>
		<comments>http://www.adaruby.com/2007/11/17/sinatra-classy-web-development-dressed-in-a-dsl/#comments</comments>
		<pubDate>Sat, 17 Nov 2007 11:37:26 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://adaruby.com/2007/11/17/sinatra-classy-web-development-dressed-in-a-dsl/</guid>
		<description><![CDATA[
			
				
			
		

Sinatra is a new cool open-source DSL-driven web application framework!
This super-sexy DSL runs at lighting speed. It sits on top of Mongrel and was written to be thread-safe, sleek and tiny. And an entire web-application can be written and contained in one file (or a small collection of files)!
It&#8217;s super easy to use! Let&#8217;s create [...]


Related posts:<ol><li><a href='http://www.adaruby.com/2009/12/21/three-ways-you-can-speed-up-your-fresh-rails-development/' rel='bookmark' title='Permanent Link: Three Ways You Can Speed Up Your Fresh Rails Development'>Three Ways You Can Speed Up Your Fresh Rails Development</a> <small> A Ruby on Rails web application I&#8217;ve been developing...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2007%2F11%2F17%2Fsinatra-classy-web-development-dressed-in-a-dsl%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2007%2F11%2F17%2Fsinatra-classy-web-development-dressed-in-a-dsl%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Sinatra: Classy web development dressed in a DSL" alt=" Sinatra: Classy web development dressed in a DSL" /><br />
			</a>
		</div>
<p><img src="http://sinatra.rubyforge.org/logo.png" height="63" width="226" title="Sinatra: Classy web development dressed in a DSL" alt="logo Sinatra: Classy web development dressed in a DSL" /></p>
<p><a href="http://www.xnot.org/sinatra" rel="nofollow" >Sinatra</a> is a new cool open-source DSL-driven web application framework!</p>
<blockquote><p>This super-sexy DSL runs at lighting speed. It sits on top of Mongrel and was written to be thread-safe, sleek and tiny. And an <strong>entire</strong> web-application can be written and contained in one file (or a small collection of files)!</p></blockquote>
<blockquote><p>It&#8217;s super easy to use! Let&#8217;s create an app from scratch to demonstrate!</p></blockquote>
<blockquote><p><strong>Install!</strong></p>
<pre>gem install sinatra -y</pre>
<p><strong>Use!</strong></p>
<ul>
<li>Create a file called lyrics.rb (or any name you like)</li>
<li>Add
<pre>  require 'rubygems'

  require 'sinatra'</pre>
</li>
<li>Run (yes, with just ruby)
<pre>  % ruby lyrics.rb

  == Sinata has taken the stage on port 4567!</pre>
</li>
<li>Take a moment and view the default page <a href="http://localhost:4567/" rel="nofollow" >localhost:4567</a>. Go ahead and bask in it‘s glory.</li>
<li>Notice:
<ul>
<li>It didn‘t create any page to show you that default page (just a cool thing to see, that‘s all)</li>
<li>There was nothing generated other than a log file</li>
<li><a href="http://sinatra.rubyforge.org/doc/classes/Sinatra.html" rel="nofollow" >Sinatra</a> is a really cool name for a web-framework that‘s a DSL</li>
</ul>
</li>
<li>Modify lyrics.rb by adding:
<pre>  get '/' do

    'Hello World'

  end</pre>
</li>
<li>Refresh (no need to restart <a href="http://sinatra.rubyforge.org/doc/classes/Sinatra.html" rel="nofollow" >Sinatra</a>):
<pre>  http://localhost:4567</pre>
</li>
<li>Modify again (then refresh):</li>
<li>
<pre>  get '/' do

    &lt;&lt;-HTML

      &lt;form action='/' method="POST"&gt;

        &lt;input type="text" name="name" /&gt;

        &lt;input type="submit" value="Say my name!" /&gt;

      &lt;/form&gt;

    HTML

  end  post '/' do

    "Hello #{params[:name] || 'World'}!"

  end</pre>
</li>
<li>Now you try: Use the <a href="http://sinatra.rubyforge.org/doc/classes/Sinatra/Erb/EventContext.html" rel="nofollow" >Sinatra::Erb::EventContext</a> or <a href="http://sinatra.rubyforge.org/doc/classes/Sinatra/Haml/EventContext.html" rel="nofollow" >Sinatra::Haml::EventContext</a> to do the same. Do them inline and as template files.</li>
<li>Learn more cool stuff: see <a href="http://sinatra.rubyforge.org/doc/classes/Sinatra/Dsl.html" rel="nofollow" >Sinatra::Dsl</a></li>
<li>Create your own plugins!
<ol>
<li>Create a ‘vendor’ directory in your app directory</li>
<li>Lay it out like: myapp.rb : root
<pre>   |- vendor

                | - plugin_name

              | - init.rb  # load and hook here

              | - lib

                    |- modules/classes here</pre>
</li>
<li>Use it in your app!</li>
</ol>
</li>
</ul>
</blockquote>
<p align="left">For further details visit:</p>
<ul>
<li><a href="http://del.icio.us/tag/sinatra" rel="nofollow" >http://sinatra.rubyforge.org/doc/</a></li>
<li><a href="http://del.icio.us/tag/sinatra" rel="nofollow" >http://www.xnot.org/sinatra</a></li>
<li><a href="http://del.icio.us/tag/sinatra" rel="nofollow" >http://del.icio.us/tag/sinatra</a></li>
</ul>


<p>Related posts:<ol><li><a href='http://www.adaruby.com/2009/12/21/three-ways-you-can-speed-up-your-fresh-rails-development/' rel='bookmark' title='Permanent Link: Three Ways You Can Speed Up Your Fresh Rails Development'>Three Ways You Can Speed Up Your Fresh Rails Development</a> <small> A Ruby on Rails web application I&#8217;ve been developing...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2007/11/17/sinatra-classy-web-development-dressed-in-a-dsl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Best microformats Resources for Web 2.0 Developers</title>
		<link>http://www.adaruby.com/2007/09/20/top-10-microformats-resources-for-web-20-developers/</link>
		<comments>http://www.adaruby.com/2007/09/20/top-10-microformats-resources-for-web-20-developers/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 11:01:29 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[Friends]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Praises]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://adaruby.com/2007/09/20/top-10-microformats-resources-for-web-20-developers/</guid>
		<description><![CDATA[
			
				
			
		

microformats has been only two years old, yet it has brought significant changes in a relatively short time.
What is it, actually? According to microformats.org, &#8220;[microformats is] designed for humans first and machines second, [they] are a set of simple, open data formats built upon existing and widely adopted standards.&#8221;
Enough with the fluff, let&#8217;s see how [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2007%2F09%2F20%2Ftop-10-microformats-resources-for-web-20-developers%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2007%2F09%2F20%2Ftop-10-microformats-resources-for-web-20-developers%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="The Best microformats Resources for Web 2.0 Developers" alt=" The Best microformats Resources for Web 2.0 Developers" /><br />
			</a>
		</div>
<p><a href="http://www.flickr.com/photos/torchlightlms/1206281509/" rel="nofollow"  title="Shave your Semantic (or semantic?) Web!"><img src="http://farm2.static.flickr.com/1187/1206281509_ce53f3d7ff.jpg" alt="Shave your Semantic (or semantic?) Web" title="The Best microformats Resources for Web 2.0 Developers" /></a></p>
<p><a href="http://microformats.org/" rel="nofollow" >microformats</a> has been <a href="http://microformats.org/blog/2007/06/21/microformatsorg-turns-2/" rel="nofollow" >only two years old</a>, yet it has brought significant changes in a relatively short time.</p>
<p>What is it, actually? <a href="http://microformats.org/about/" rel="nofollow" >According to microformats.org</a>, &#8220;[microformats is] designed for humans first and machines second, [they] are a set of simple, open data formats built upon existing and widely adopted standards.&#8221;</p>
<p>Enough with the fluff, let&#8217;s see how it <em>actually</em> works, microformats in action:</p>
<p><a href="http://www.linkedin.com/in/ariekeren" rel="nofollow"  title="Arie Kusuma Atmaja @ LinkedIn"><img src="http://farm2.static.flickr.com/1322/1408453688_afda913dd5.jpg" alt="Arie Kusuma Atmaja nampang gitu lhoh" title="The Best microformats Resources for Web 2.0 Developers" /></a><br />
<a href="http://www.flickr.com/photos/ceefour/1408453688/" rel="nofollow" >Flickr picture source</a></p>
<p align="left">The above picture is me browsing to <a href="http://www.linkedin.com/in/ariekeren" rel="nofollow" >the LinkedIn profile</a> of one of Indonesia&#8217;s  renowned Ruby on Rails experts, <a href="http://ariekusumaatmaja.wordpress.com/" rel="nofollow" >Arie Kusuma Atmaja</a>. The overlay window that contains these semantic information is <strong>not </strong>a <a href="http://www.linkedin.com/" rel="nofollow" >LinkedIn</a> feature. Rather, it is the easily usable, cross-browser <a href="http://leftlogic.com/lounge/articles/microformats_bookmarklet" rel="nofollow" >Microformats Bookmarklet by LeftLogic</a>. Go on&#8230; <em>try it</em> if you haven&#8217;t!</p>
<p align="left">As you can see, the mere act of clicking the bookmarklet shows you some important facts about Arie (or any microformats-enabled you&#8217;re currently at). In case of a <a href="http://microformats.org/wiki/hresume" rel="nofollow" >microformats-enabled resume</a> page like in LinkedIn, it shows you where he works, when, education information, and related stuff. For fun comparison purposes only, <a href="http://www.linkedin.com/in/ceefour" rel="nofollow"  title="Hendy Irawan's LinkedIn profile">my LinkedIn profile</a> has more detailed information than his, hehe <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="The Best microformats Resources for Web 2.0 Developers" /> </p>
<p align="left">The best part is not only that the information is human-readable, but it can also be extracted and processed automatically by machines or software. The primary distinguishing trait of a microformats-enabled HTML page is that it has <a href="http://en.wikipedia.org/wiki/Semantic_Web" rel="nofollow" >semantic meaning</a>. A microformats processor can know the difference between a name, an e-mail address, a street address, a job, a university, and so on; while in plain HTML, all you can infer are things dealing with paragraphs, tables, lists, and so on.</p>
<p align="left">Making microformats-enabled pages aren&#8217;t hard at all, actually it is very easy! It&#8217;s even much easier than CSS.</p>
<p align="left">To see how simple it is, let&#8217;s see a snippet of a real-world microformats, still courtesy of Arie:</p>
<pre>&lt;div id="masthead" class="vcard contact"&gt;
  &lt;div id="nameplate"&gt;
    &lt;h1 id="name"&gt;&lt;span class="fn n"&gt; &lt;span class="given-name"&gt;Arie&lt;/span&gt; &lt;span class="family-name"&gt;Kusuma Atmaja&lt;/span&gt; &lt;/span&gt;&lt;/h1&gt;
      &lt;p class="headline title"&gt;&lt;strong&gt;Senior Ruby Developer at IMT&lt;/strong&gt;&lt;/p&gt;
    &lt;div class="adr"&gt;
      &lt;p class="locality"&gt;Indonesia&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;</pre>
<p align="left">Most of the above snippet is just HTML. The microformats part is simply the <strong>class=&#8221;</strong><em>something</em><strong>&#8220;</strong> convention. Simple, and it gets the job done. <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' title="The Best microformats Resources for Web 2.0 Developers" /> </p>
<p align="left">Some more commonly used microformats specifications include:</p>
<ul>
<li><a href="http://microformats.org/wiki/hcard" rel="nofollow" >hCard</a> for people and organizations</li>
<li><a href="http://microformats.org/wiki/hcalendar" rel="nofollow" >hCalendar</a> for calendars and Events</li>
<li><a href="http://microformats.org/wiki/hcalendar" rel="nofollow" >hCalendar</a> for calendars and Events</li>
<li><a href="http://microformats.org/wiki/vote-links" rel="nofollow" >VoteLinks</a> and <a href="http://microformats.org/wiki/hreview" rel="nofollow" >hReview</a> for opinions, ratings, and reviews</li>
<li><a href="http://gmpg.org/xfn" rel="nofollow" ><abbr title="XHTML Friends Network">XFN</abbr></a> for social networks</li>
<li><a href="http://microformats.org/wiki/rel-license" rel="nofollow" >rel-license</a> for licenses</li>
<li><a href="http://microformats.org/wiki/rel-tag" rel="nofollow" >rel-tag</a> for tags, keywords, and categories</li>
<li><a href="http://microformats.org/wiki/xoxo" rel="nofollow" >XOXO</a> for lists and outlines</li>
<li><a href="http://microformats.org/wiki/" rel="nofollow" >&#8230;and more&#8230;</a></li>
</ul>
<p align="left">Despite all these specifications, &#8220;who uses it?&#8221; is a good question. It turns out, there has been many, and more and more sites are adopting it. <a href="http://wordpress.org/extend/plugins/linkedin-hresume/" rel="nofollow" >LinkedIn with hResume</a> is one example, along with <a href="http://torrez.us/archives/2007/08/02/540/" rel="nofollow" >Google Maps</a>, <a href="http://www.ylocalblog.com/blog/2006/06/21/we-now-support-microformats/" rel="nofollow" >Yahoo</a>, <a href="http://www.flickr.com/groups/microformats/" rel="nofollow" >Flickr</a>, and <a href="http://microformats.org/wiki/hcard-examples-in-wild" rel="nofollow" >all these cool guys</a> have been using them. Why shouldn&#8217;t you?</p>
<p align="left">Interested? Here are some stuff to get you started:</p>
<ol>
<li><strong>Online Tools</strong>
<ol>
<li><a href="http://leftlogic.com/lounge/articles/microformats_bookmarklet" rel="nofollow" >Microformats Bookmarklet by LeftLogic</a><br />
A handy microformats explorer bookmarklet. Useful also if you&#8217;re on the go and you want to check out some microformats. No need to install anything fancy on the computer.</li>
<li><a href="https://addons.mozilla.org/firefox/addon/4106" rel="nofollow" >Operator Firefox Extension</a><br />
Microformats explorer extension for Firefox. Whether you&#8217;re a web developer or simply want to check out this latest technology, this is a very useful tool.</li>
<li> <a href="http://blog.codeeg.com/tails-firefox-extension-03/" rel="nofollow" >Tails Firefox extension</a> is another microformats Firefox extension</li>
<li><a href="http://tools.blogmatrix.com/extract/" rel="nofollow" >Almost Universal Microformats Parser</a> is a useful web-based tool to parse microformats.</li>
</ol>
</li>
<li><strong>Tutorials and Resources<br />
</strong></p>
<ol>
<li><a href="http://www.smashingmagazine.com/2007/05/04/microformats-what-they-are-and-how-to-use-them/" rel="nofollow" >Microformats, what they are and how to use them, by Smashing Magazine </a></li>
<li><a href="http://www.xfront.com/microformats/" rel="nofollow" >Microformats Tutorial</a> by XFront<br />
This is a very extensive tutorial. The complete tutorial package including the example files is a 13 MB download! <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' title="The Best microformats Resources for Web 2.0 Developers" /> </li>
<li><a href="http://www.thinkvitamin.com/features/design/how-to-use-microformats" rel="nofollow" >How to Use Microformats</a> by Vitamin Features</li>
<li><a href="http://whymicroformats.com/introduction-to-microformats/" rel="nofollow" >Introduction to Microformats</a> by WhyMicroformats.com</li>
<li><a href="http://www.digital-web.com/articles/the_big_picture_on_microformats/" rel="nofollow" >The Big Picture on Microformats</a> by Digital Web Magazine</li>
<li>Another by Digital Web Magazine: <a href="http://www.digital-web.com/articles/microformats_primer/" rel="nofollow" >Microformats Primer</a></li>
<li>Back to the future: <a href="http://www.readwriteweb.com/archives/mozilla_does_microformats_firefox3.php" rel="nofollow" >Mozilla Firefox 3.0 Does Microformats</a><br />
<a href="http://www.readwriteweb.com/" rel="nofollow" >Read/WriteWeb&#8217;s</a> articles also touched microformats-related stuff quite often.</li>
</ol>
</li>
<li><strong>Microformat Parsers</strong>
<ol>
<li><a href="http://mofo.rubyforge.org/" rel="nofollow" >Mofo Ruby Gem and Rails Plugin</a><br />
Of course, this is Ruby on Rails blog! Mofo is a microformats parser for Ruby and it also doubles as a Rails plugin. Check out <a href="http://errtheblog.com/post/37" rel="nofollow" >Chris Wanstrath&#8217;s post</a> for more information.<br />
There are also microformat parsers for other languages:</li>
<li><a href="http://www.danwebb.net/2007/2/9/sumo-a-generic-microformats-parser-for-javascript" rel="nofollow" >Sumo</a> is a microformats parser for JavaScript</li>
<li><a href="http://allinthehead.com/hkit" rel="nofollow" >hKit</a> is a microformats parser for PHP</li>
<li><a href="http://malatestapunk-stuff.blogspot.com/2007/01/php-microformats-parser.html" rel="nofollow" >Microformats Parser</a> is another parser for PHP</li>
<li><a href="http://phildawes.net/microformats/" rel="nofollow" >Microformats Parser for Python</a></li>
<li><a href="http://code.whytheluckystiff.net/hpricot/" rel="nofollow" >Hpricot Ruby Gem</a><br />
Found a bizarre microformat or inventing your own? No problem, Hpricot comes to the rescue. Parse any HTML-ish document as you see fit&#8230; More info available from <a href="http://redhanded.hobix.com/inspect/hpricot01.html" rel="nofollow" >this RedHanded post</a>.</li>
<li><a href="http://rubyforge.org/projects/scrapi" rel="nofollow" >scrAPI</a> is another Ruby library for parsing HTML that can be useful for processing microformats.</li>
</ol>
</li>
<li><strong>References</strong>
<ol>
<li><a href="http://microformats.org/" rel="nofollow" >Microformats.org</a><br />
&#8220;Official&#8221; web site of Microformats. You can read everything about microformats, current specifications and newly proposed specs.</li>
<li><a href="http://www.amazon.com/gp/product/1590598148?ie=UTF8&amp;tag=gauldong-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=1590598148" rel="nofollow" >&#8220;Microformats: Empowering Your Markup for Web 2.0&#8243; Book</a> by <a href="http://webdirections.org/" rel="nofollow" >John Allsopp</a><br />
&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;<br />
This is the first book dedicated to, and is a comprehensive guide to, microformats. It explores why, in Bill Gates&#8217;s words, &#8220;We need microformats&#8221;; how microformats work; and the kinds of problems microformats help solve. the book covers every current microformat, with complete details of the syntax, semantics, and uses of each, along with real-world examples and a comprehensive survey of the tools available for working with them. the book also features case studies detailing how major web content publishers such as yahoo put microformats to work in their web applications.</li>
<li><a href="http://suda.co.uk/projects/microformats/cheatsheet/" rel="nofollow" >Brian Suda&#8217;s microformats cheatsheet</a><br />
For people who likes it quick and done, this is perfect. It lists microformats properties by format and also lists each format and the hierarchy. This includes elemental microformats, compound microformats and some of the standard design patterns used.</li>
<li><a href="http://www.ilovejackdaniels.com/cheat-sheets/microformats-cheat-sheet/" rel="nofollow" >Dave Child&#8217;s microformats cheatsheet</a> is another good reference</li>
<li>And <a href="http://microformats.org/wiki/cheatsheets" rel="nofollow" >more cheatsheets on microformats.org wiki</a></li>
<li><a href="http://www.w3.org/TR/grddl/" rel="nofollow" >Gleaning Resource Descriptions from Dialects of Languages (GRDDL)</a> is a recently approved W3C Recommendation that can be used, among others, for extracting semantic information (including microformats) from HTML pages.</li>
<li><a href="http://microformatique.com/" rel="nofollow" >microformatique</a>. A blog about all things microformats!</li>
</ol>
</li>
</ol>
<p>Feel free to add more resources as you see fit, in the comments! <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' title="The Best microformats Resources for Web 2.0 Developers" /> </p>
<p><strong>Updates:</strong></p>
<ol>
<li>I originally thought I was gonna list 10 resources&#8230; But it seems there are much more <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="The Best microformats Resources for Web 2.0 Developers" /> </li>
<li>More links to John Allsopp&#8217;s resources</li>
</ol>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2007/09/20/top-10-microformats-resources-for-web-20-developers/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Professional Ruby Collection: Mongrel, Rails Plugins, Rails Routing, Refactoring to REST, and Rubyisms</title>
		<link>http://www.adaruby.com/2007/08/23/professional-ruby-collection-mongrel-rails-plugins-rails-routing-refactoring-to-rest-and-rubyisms/</link>
		<comments>http://www.adaruby.com/2007/08/23/professional-ruby-collection-mongrel-rails-plugins-rails-routing-refactoring-to-rest-and-rubyisms/#comments</comments>
		<pubDate>Thu, 23 Aug 2007 18:52:24 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Praises]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://adaruby.com/2007/08/23/professional-ruby-collection-mongrel-rails-plugins-rails-routing-refactoring-to-rest-and-rubyisms/</guid>
		<description><![CDATA[
			
				
			
		
Just out from a pack of several of the world&#8217;s greatest Ruby and/on Rails programmers:  Professional Ruby Collection: Mongrel, Rails Plugins, Rails Routing, Refactoring to REST, and Rubyisms.
GET STRAIGHT TO THE LEADING EDGE WITH RUBY AND RAILS
Information that’s so hot, new, and valuable, you can’t wait for a book. This package brings together 8 [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2007%2F08%2F23%2Fprofessional-ruby-collection-mongrel-rails-plugins-rails-routing-refactoring-to-rest-and-rubyisms%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2007%2F08%2F23%2Fprofessional-ruby-collection-mongrel-rails-plugins-rails-routing-refactoring-to-rest-and-rubyisms%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Professional Ruby Collection: Mongrel, Rails Plugins, Rails Routing, Refactoring to REST, and Rubyisms" alt=" Professional Ruby Collection: Mongrel, Rails Plugins, Rails Routing, Refactoring to REST, and Rubyisms" /><br />
			</a>
		</div>
<p>Just out from a pack of several of the world&#8217;s greatest Ruby and/on Rails programmers:  <a href="http://www.amazon.com/gp/product/0132417995?ie=UTF8&amp;tag=gauldong-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0132417995" rel="nofollow" >Professional Ruby Collection: Mongrel, Rails Plugins, Rails Routing, Refactoring to REST, and Rubyisms</a>.</p>
<p><strong>GET STRAIGHT TO THE LEADING EDGE WITH RUBY AND RAILS</strong></p>
<p>Information that’s so hot, new, and valuable, you can’t wait for a book. This package brings together 8 breakthrough primers on today’s most valuable Ruby and Rails technologies &#8212; including five new digital Short Cuts worth $69.95! From RailsSpace to ActiveRecord to Mongrel, here’s new content, techniques, and code from the Ruby community’s top innovators: insider’s information that’s never been available before in one place.</p>
<p>&amp;amp;lt;br /&amp;amp;gt;On the CD-ROM: 5 brand-new digital Short Cuts&#8230;</p>
<ul>
<li>Mongrel: Serving, Deploying, and Extending Your Ruby Applications, by <a href="http://eastmedia.com/" rel="nofollow"  title="EastMedia">Matt Pelletier</a> and <a href="http://www.zedshaw.com/" rel="nofollow" >Zed Shaw</a></li>
<li>Rails Plugins: Extending Rails Beyond the Core, by James Adam</li>
<li>Rails Routing, by David A. Black</li>
<li>Rails Refactoring to Resources: Using CRUD and REST in Your Rails Application, by Trotter Cashion</li>
<li>Rubyisms in Rails, by Jacob Harris</li>
</ul>
<p><strong>PLUS, PRINTED BONUS CONTENT INCLUDES</strong></p>
<ul>
<li>Working with Active Record (from the forthcoming Addison-Wesley book The Rails Way by Obie Fernandez)</li>
<li>RESTful Blogs (from RailsSpace by Michael Hartl and Aurelius Prochazka)</li>
<li>OOP and Dynamic Features in Ruby (from The Ruby Way, Second Edition, by Hal Fulton)</li>
</ul>
<p><strong>About the Authors</strong></p>
<ul>
<li><a href="http://eastmedia.com/" rel="nofollow"  title="EastMedia"><strong>Matt Pelletier</strong></a> (<a href="http://www.workingwithrails.com/person/1363-matt-pelletier" rel="nofollow" >WorkingWithRails profile</a>) is a partner at <a href="http://eastmedia.com/" rel="nofollow" >EastMedia</a>, a software, mobile, and business development firm. He is also cofounder of NYC.rb, the New York City Ruby group.</li>
<li><a href="http://www.zedshaw.com/" rel="nofollow" ><strong>Zed Shaw</strong></a> (<a href="http://www.workingwithrails.com/person/5455-zed-shaw" rel="nofollow"  title="Zed Shaw">WorkingWithRails profile</a>) is the original and primary author of Mongrel.</li>
<li><a href="http://dablog.rubypal.com/" rel="nofollow" ><strong>David A. Black</strong></a> (<a href="http://www.workingwithrails.com/person/5747-david-a-black" rel="nofollow" >WorkingWithRails profile</a>) is Director, <a href="http://www.rubypowerandlight.com/" rel="nofollow" >Ruby Power and Light, LLC</a> and also Co-Director, Ruby Central, Inc. He is the bestselling author of Ruby for Rails.</li>
<li><a href="http://identity.eastmedia.com/identity/show/Trotter+Cashion" rel="nofollow" ><strong>Trotter Cashion</strong></a> (<a href="http://www.workingwithrails.com/person/5541-trotter-cashion" rel="nofollow" >WorkingWithRails profile</a>) is an application developer at <a href="http://motionbox.com/" rel="nofollow" >motionbox.com</a>, a Rails-based video sharing site.</li>
<li><a href="http://interblah.net/" rel="nofollow" ><strong>Dr. James Adam</strong></a> (<a href="http://www.workingwithrails.com/person/5137-james-adam" rel="nofollow" >WorkingWithRails profile</a>) is the developer behind the <a href="http://rails-engines.org/" rel="nofollow" >Engines plugin</a>.</li>
<li><a href="http://www.nimblecode.com/" rel="nofollow" ><strong>Jacob Harris</strong></a> (<a href="http://www.workingwithrails.com/person/5590-jacob-harris" rel="nofollow" >WorkingWithRails profile</a>) is a web developer for <a href="http://www.nytimes.com/" rel="nofollow" >New York Times Digital</a>.</li>
</ul>
<p>Enough said! <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Professional Ruby Collection: Mongrel, Rails Plugins, Rails Routing, Refactoring to REST, and Rubyisms" /> </p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2007/08/23/professional-ruby-collection-mongrel-rails-plugins-rails-routing-refactoring-to-rest-and-rubyisms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVK Quick Start Guide</title>
		<link>http://www.adaruby.com/2007/08/22/svk-quick-start/</link>
		<comments>http://www.adaruby.com/2007/08/22/svk-quick-start/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 16:39:36 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[Indonesia]]></category>
		<category><![CDATA[Praises]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://adaruby.com/2007/08/22/svk-quick-start/</guid>
		<description><![CDATA[
			
				
			
		
Some people asked me about SVK so here it is. Quickly written because I am a bit lazy and sleepy right now.
SVK is a distributed version control system. In other words, it allows you to mirror a Subversion repository, have local commits, pull changes from upstream, and synchronize/merge it back to the remote Subversion server [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2007%2F08%2F22%2Fsvk-quick-start%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2007%2F08%2F22%2Fsvk-quick-start%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="SVK Quick Start Guide" alt=" SVK Quick Start Guide" /><br />
			</a>
		</div>
<p>Some people asked me about SVK so here it is. Quickly written because I am a bit lazy and sleepy right now.</p>
<p><a href="http://svk.bestpractical.com/" title="http://svk.bestpractical.com/" rel="nofollow">SVK</a> is a distributed version control system. In other words, it allows you to mirror a Subversion repository, have local commits, pull changes from upstream, and synchronize/merge it back to the remote Subversion server if you want.</p>
<p><strong>English version</strong></p>
<p><strong>UPDATE:</strong> This is an <em>outdated version</em>. The most up-to-date version with newer tips and tricks is in <a href="http://wiki.ruby-id.web.id/wiki/SVK" rel="nofollow"  title="SVK version control system">wiki Ruby Indonesia: SVK</a>, which unfortunately is only available in Indonesian. <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="SVK Quick Start Guide" /> </p>
<p><strong>Method 1: Use Subversion repository, but SVK working copy</strong></p>
<p>Assumptions:</p>
<ul>
<li> Subversion repository remote: http://svn.example.com/try/</li>
<li> SVK depot: /try/</li>
</ul>
<pre>svk depot try ~/.svk/try
svk mirror /try/remote http://svn.example.com/try/
svk sync /try/remote
svk cp /try/remote /try/local</pre>
<p>Checkout &amp; working copy:</p>
<pre>svk co /try/local/trunk</pre>
<p>Commit:</p>
<pre>svk ci</pre>
<p>Push: (merge to remote)</p>
<pre>svk push</pre>
<p>Pull: (merge from remote to local)</p>
<pre>svk pull</pre>
<p><strong>Method 2: Use remote Subversion repository, local Subversion repository, and SVK to merge between those repositories </strong></p>
<p>The advantage of this approach is that you can use usual Subversion tools (<a href="http://tortoisesvn.tigris.org/" title="http://tortoisesvn.tigris.org/" rel="nofollow">TortoiseSVN</a>, or native utility from <a href="http://www.aptana.com/" title="http://www.aptana.com/" rel="nofollow">Aptana IDE</a>, <a href="http://www.netbeans.org/" title="http://www.netbeans.org/" rel="nofollow">NetBeans</a>, etc.)</p>
<p>Assumptions:</p>
<ul>
<li> Subversion repository remote: http://svn.example.com/try/</li>
<li> Subversion repository local: http://svn.mycomputer/try/</li>
<li> SVK depot: /try/</li>
</ul>
<pre>svk depot try ~/.svk/try
svk mirror /try/remote http://svn.example.com/try/
svk sync /try/remote
svk mirror /try/localsvn http://svn.mycomputer/try/
svk sync /try/localsvn
svk smerge /try/remote /try/localsvn</pre>
<p>Checkout &amp; working copy:</p>
<pre>svn co http://svn.mycomputer/try/trunk/</pre>
<p>Commit:</p>
<pre>svn ci</pre>
<p>Push: (merge to remote)</p>
<pre>svk sync /try/localsvn
svk sync /try/remote
svk smerge /try/localsvn /try/remote</pre>
<p>Pull: (merge from remote to local)</p>
<pre>svk sync /try/localsvn
svk sync /try/remote
svk smerge /try/remote /try/localsvn</pre>
<p><strong>Tip: Moving local Subversion repository history to remote Subversion server</strong></p>
<p>Assumptions:</p>
<ul>
<li> Subversion repository remote (<strong>still empty</strong>): http://svn.example.com/try/</li>
<li> Subversion repository local (<strong>has history</strong>): http://svn.mycomputer/try/</li>
<li> SVK depot: /try/</li>
</ul>
<p>In short:</p>
<pre>svk depot try ~/.svk/try
svk mirror /try/remote http://svn.example.com/try/
svk sync /try/remote
svk mirror /try/localsvn http://svn.mycomputer/try/
svk sync /try/localsvn
svk smerge --incremental --log --baseless /try/localsvn /try/remote</pre>
<p><strong>Versi Indonesia</strong></p>
<p><strong>UPDATE:</strong> Versi ini sudah <em>out-of-date</em>. Versi paling up-to-date dengan tips-tips tambahan dan edisi revisi ada di <a href="http://wiki.ruby-id.web.id/wiki/SVK" rel="nofollow"  title="SVK version control system">wiki Ruby Indonesia: SVK</a>.</p>
<p><!-- start content --><a href="http://svk.bestpractical.com/" title="http://svk.bestpractical.com/" rel="nofollow">SVK</a> adalah sistem version control terdistribusi.</p>
<p><strong>Cara 1: Pake Subversion repository, SVK working copy</strong></p>
<p>Asumsi:</p>
<ul>
<li> Subversion repository remote: <a href="http://svn.example.com/coba/" title="http://svn.example.com/coba/" rel="nofollow">http://svn.example.com/coba/</a></li>
<li> SVK depot: /coba/</li>
</ul>
<pre>svk depot coba ~/.svk/coba
svk mirror /coba/remote http://svn.example.com/coba/
svk sync /coba/remote
svk cp /coba/remote /coba/local</pre>
<p>Checkout &amp; working copy:</p>
<pre>svk co /coba/local/trunk</pre>
<p>Commit:</p>
<pre>svk ci</pre>
<p>Push: (merge ke remote)</p>
<pre>svk push</pre>
<p>Pull: (merge dari remote ke local)</p>
<pre>svk pull</pre>
<p><strong>Cara 2: Pake Subversion repository remote, Subversion repository local, dan SVK untuk merge</strong></p>
<p>Kelebihan dari cara ini adalah Anda bisa menggunakan tools Subversion seperti biasanya (<a href="http://tortoisesvn.tigris.org/" title="http://tortoisesvn.tigris.org/" rel="nofollow">TortoiseSVN</a>, maupun native utility dari <a href="http://www.aptana.com/" title="http://www.aptana.com/" rel="nofollow">Aptana IDE</a>, <a href="http://www.netbeans.org/" title="http://www.netbeans.org/" rel="nofollow">NetBeans</a>, dsb.)</p>
<p>Asumsi:</p>
<ul>
<li> Subversion repository remote: <a href="http://svn.example.com/coba/" title="http://svn.example.com/coba/" rel="nofollow">http://svn.example.com/coba/</a></li>
<li> Subversion repository local: <a href="http://svn.mycomputer/coba/" title="http://svn.mycomputer/coba/" rel="nofollow">http://svn.mycomputer/coba/</a></li>
<li> SVK depot: /coba/</li>
</ul>
<pre>svk depot coba ~/.svk/coba
svk mirror /coba/remote http://svn.example.com/coba/
svk sync /coba/remote
svk mirror /coba/localsvn http://svn.mycomputer/coba/
svk sync /coba/localsvn
svk smerge /coba/remote /coba/localsvn</pre>
<p>Checkout &amp; working copy:</p>
<pre>svn co http://svn.mycomputer/coba/trunk/</pre>
<p>Commit:</p>
<pre>svn ci</pre>
<p>Push: (merge ke remote)</p>
<pre>svk sync /coba/localsvn

svk sync /coba/remote

svk smerge /coba/localsvn /coba/remote</pre>
<p>Pull: (merge dari remote ke local)</p>
<pre>svk sync /coba/localsvn
svk sync /coba/remote
svk smerge /coba/remote /coba/localsvn</pre>
<p><strong>Tip: Mindahin history Subversion local ke remote </strong></p>
<p>Ini pertanyaan dari Marcel.</p>
<p>Asumsi:</p>
<ul>
<li> Subversion repository remote (<strong>masih kosong</strong>): <a href="http://svn.example.com/coba/" title="http://svn.example.com/coba/" rel="nofollow">http://svn.example.com/coba/</a></li>
<li> Subversion repository local (<strong>sudah berisi</strong>): <a href="http://svn.mycomputer/coba/" title="http://svn.mycomputer/coba/" rel="nofollow">http://svn.mycomputer/coba/</a></li>
<li> SVK depot: /coba/</li>
</ul>
<p>So singkatnya:</p>
<pre>svk depot coba ~/.svk/coba
svk mirror /coba/remote http://svn.example.com/coba/
svk sync /coba/remote
svk mirror /coba/localsvn http://svn.mycomputer/coba/
svk sync /coba/localsvn
svk smerge --incremental --log --baseless /coba/localsvn /coba/remote</pre>
<p><strong>Credits</strong></p>
<p>Thanks buat <a href="http://wiki.ruby-id.web.id/wiki?title=Marcel&amp;action=edit" rel="nofollow"  title="Marcel">Marcel</a> (<a href="mailto:mgozali@yahoo.com" title="mailto:mgozali@yahoo.com" rel="nofollow">[1]</a>) yang sudah menyumbang pertanyaan yang akhirnya membuat saya menulis artikel ini. Trims. &#8211;<a href="http://wiki.ruby-id.web.id/wiki/Pengguna:Ceefour" rel="nofollow"  title="Ceefour">Ceefour</a> 11:23, 22 Agustus 2007 (CDT)</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2007/08/22/svk-quick-start/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
