<?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>Easy Ruby On Rails Programming &#187; transactional processions</title>
	<atom:link href="http://easyrubyonrailsprogramming.com/tag/transactional-processions/feed/" rel="self" type="application/rss+xml" />
	<link>http://easyrubyonrailsprogramming.com</link>
	<description>The Place to be to Learn Ruby On Rails</description>
	<lastBuildDate>Sat, 24 Dec 2011 05:30:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Blocks for Transactions Discussed (Part 2)</title>
		<link>http://easyrubyonrailsprogramming.com/development/blocks-for-transactions-discussed-part-2/</link>
		<comments>http://easyrubyonrailsprogramming.com/development/blocks-for-transactions-discussed-part-2/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 10:01:58 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Blocks]]></category>
		<category><![CDATA[transactional processions]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/development/blocks-for-transactions-discussed-part-2/</guid>
		<description><![CDATA[After it goes through the block, the file is closed taking with it the results of the block&#8217;s transactional process. This is something that should be done with all programming languages, to have the code have their own built-in file handling system which ensures that a file once opened is closed upon exit to avoid [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oreilly.com/catalog/9780596009779/toc.html"><img src="/wp-content/uploads/scraped/31.jpg"/></a>
<p>After it goes through the block, the file is closed taking with it the results of the block&#8217;s transactional process. This is something that should be done with all programming languages, to have the code have their own built-in file handling system which ensures that a file once opened is closed upon exit to avoid destroying the contents of that file. This shows the two forms the File.open method&#8217;s behavior can be called upon, that if it is called with a block it does what it has to and then automatically closes the file. Called on without the block and it returns the file object.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/development/blocks-for-transactions-discussed-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blocks for Transactions Discussed (Part 1)</title>
		<link>http://easyrubyonrailsprogramming.com/programming-language/blocks-for-transactions-discussed-part-1/</link>
		<comments>http://easyrubyonrailsprogramming.com/programming-language/blocks-for-transactions-discussed-part-1/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 10:01:26 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Blocks]]></category>
		<category><![CDATA[transactional processions]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/programming-language/blocks-for-transactions-discussed-part-1/</guid>
		<description><![CDATA[The sample code above shows the number of techniques that can be used to maximize the use of blocks for transactional control where the takeAndDosomething method is considered a class method and that it can be called independent or without influence of any single File Object. We used it to function in the same manner [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sun.com/bigadmin/features/articles/zfs_part1.scalable.html"><img src="/wp-content/uploads/scraped/30.jpg"/></a>
<p>The sample code above shows the number of techniques that can be used to maximize the use of blocks for transactional control where the takeAndDosomething method is considered a class method and that it can be called independent or without influence of any single File Object. We used it to function in the same manner as the File.open method without consideration of any arguments. We called the File.open method, passed onto it the transaction or condition which was defined in the *args as a parameter. Shortening it all, the &#8220;openAndDosomething&#8221; transparently passes whatever conditions or parameters it gets towards the File.open method. Once the file ios open and the &#8220;openAndDosomething&#8221; calls on the yield statement passing the opened file to the block/chunk of code. </p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/programming-language/blocks-for-transactions-discussed-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blocks for Transactions</title>
		<link>http://easyrubyonrailsprogramming.com/programming-language/blocks-for-transactions/</link>
		<comments>http://easyrubyonrailsprogramming.com/programming-language/blocks-for-transactions/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 10:00:33 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Blocks]]></category>
		<category><![CDATA[transactional processions]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/programming-language/blocks-for-transactions/</guid>
		<description><![CDATA[Blocks or chunks of code that can be used for transactional control which in our example would have it open a file, process it then make sure that same file is closed after processing before exiting the code. There is an automatic function that ensures this and we will discuss it further in the following [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://homes.cerias.purdue.edu/~florian/reiser/reiserfs.php"><img src="/wp-content/uploads/scraped/29.jpg"/></a>
<p>Blocks or chunks of code that can be used for transactional control which in our example would have it open a file, process it then make sure that same file is closed after processing before exiting the code. There is an automatic function that ensures this and we will discuss it further in the following example which is a form of simple (meaning it does not take into consideration any errors whatsoever) code below.</p>
<p>class File<br />
     def File.takeAndDosomething(*args)<br />
       f=File.open(*args)<br />
       yield f<br />
       f.close()<br />
     end<br />
end</p>
<p>File.takeAndDosomething(&#8220;testfile&#8221;, &#8220;r&#8221;) do |aFile|<br />
     print while aFile.gets<br />
end</p>
<p>This sample code would give you the following output:<br />
This is line one<br />
This is line two<br />
This is line three<br />
And so on&#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p>The results will be discussed in the next post where we dissect what we have just done.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/programming-language/blocks-for-transactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

