<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Birds on Rails, Part 3</title>
	<atom:link href="http://www.elharo.com/blog/software-development/web-development/2005/12/03/birds-on-rails-part-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.elharo.com/blog/software-development/web-development/2005/12/03/birds-on-rails-part-3/</link>
	<description>Ranting and Raving</description>
	<pubDate>Tue, 02 Dec 2008 19:46:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: home slot machine</title>
		<link>http://www.elharo.com/blog/software-development/web-development/2005/12/03/birds-on-rails-part-3/#comment-508647</link>
		<dc:creator>home slot machine</dc:creator>
		<pubDate>Fri, 29 Aug 2008 03:39:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elharo.com/blog/?p=26#comment-508647</guid>
		<description>&lt;strong&gt;home slot machine...&lt;/strong&gt;

explore.Poole!inscribing?confine ...</description>
		<content:encoded><![CDATA[<p><strong>home slot machine&#8230;</strong></p>
<p>explore.Poole!inscribing?confine &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akuma624</title>
		<link>http://www.elharo.com/blog/software-development/web-development/2005/12/03/birds-on-rails-part-3/#comment-27014</link>
		<dc:creator>akuma624</dc:creator>
		<pubDate>Sun, 17 Dec 2006 23:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elharo.com/blog/?p=26#comment-27014</guid>
		<description>Dude,

Your insightful explanation of the list view error when designating a specific view based on the table columns - saved my life.

Its people like you that make the net a indespensible tool for everyone.

Please posting on your great work and thanks again.</description>
		<content:encoded><![CDATA[<p>Dude,</p>
<p>Your insightful explanation of the list view error when designating a specific view based on the table columns - saved my life.</p>
<p>Its people like you that make the net a indespensible tool for everyone.</p>
<p>Please posting on your great work and thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus</title>
		<link>http://www.elharo.com/blog/software-development/web-development/2005/12/03/birds-on-rails-part-3/#comment-645</link>
		<dc:creator>Marcus</dc:creator>
		<pubDate>Sat, 11 Mar 2006 22:38:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elharo.com/blog/?p=26#comment-645</guid>
		<description>Hi,

thank you for writing down your approach to handle Ruby on Rails. I just reached a point with a similar problem and you gave me the right hint. 

greetings

mtk</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>thank you for writing down your approach to handle Ruby on Rails. I just reached a point with a similar problem and you gave me the right hint. </p>
<p>greetings</p>
<p>mtk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raichu</title>
		<link>http://www.elharo.com/blog/software-development/web-development/2005/12/03/birds-on-rails-part-3/#comment-29</link>
		<dc:creator>raichu</dc:creator>
		<pubDate>Sun, 04 Dec 2005 20:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elharo.com/blog/?p=26#comment-29</guid>
		<description>wow.  so this is ruby on rails "power learning".  no simple tutorials or sample cookbook applications here; just straight on porting an existing project, tacking on accumulated info about the framework as you go on.  not even a hint of rails' "scaffolding" or that weird article "rails - what goes where" by amy hoy (http://slash7.com/articles/2005/03/06/rails-what-goes-where).  not even a ruby syntax tutorial on statement termination and string concatenation!  no questions, no documentation, no pauses; just a wild ride on intuition, convention, and how-many-years of programming experience.

i'm currently doing the same thing with the python web framework turbogears and the java web framework wicket.  i can really relate; wicket has so little documentation that i can only hope i'm not reinventing anything like PageableOrderedListViews right now.  i have a lot of headaches nowadays but i love the learning experience all the same.

btw, you wrote in your initial code &lt;code&gt;&#60;% bird.genus bird.species %&#62;&lt;/code&gt;, which gave you an error.  in ruby, parentheses are optional; instead of concatenating the two as you intended, you actually called the method &lt;code&gt;bird.genus&lt;/code&gt; with the parameter &lt;code&gt;bird.species&lt;/code&gt;.  it's equivalent would be &lt;code&gt;bird.genus( bird.species )&lt;/code&gt; in java.  For example, whereas in java the syntax for a method would look like &lt;code&gt; overlay.layout( Point center, Double radius )&lt;/code&gt;, the syntax in ruby would look like &lt;code&gt; overlay.layout center, radius&lt;/code&gt;.

the &lt;strong&gt;default&lt;/strong&gt; layout of the files, when the scaffolding tool is used, mirrors the actions for that model.  for instance, if you have a set of birds, their controller would be called birds_controller, and it would have a model class called birds.  

if i want a web page that lists a bunch of birds, i can find the code in the &lt;code&gt;list&lt;/code&gt; method of &lt;code&gt;BirdsController&lt;/code&gt;, the class of which can be found in app/controllers/birds_controller.rb  i would then look for the list.rhtml page in app/views/birds directory.  if i want a web page that edits the bird's info, i can find the code in the &lt;code&gt;edit&lt;/code&gt; method of &lt;code&gt;BirdsController&lt;/code&gt;, the class of which can be found in app/controllers/birds_controller.rb  i would then look for the edit.rhtml page in app/views/birds directory.  amy hoy's cheatsheet can probably explain it better than i can (http://slash7.com/cheats/rails_files_cheatsheet.pdf).

if i were in your shoes and i wanted the default (scaffolded) way of displaying bird info, i would run "script/generate scaffold birds".  i would then go to the created app/controllers/birds_controller.rb file and make sure that its &lt;code&gt;list&lt;/code&gt; method has the line &lt;code&gt;@birds = Birds.find_all&lt;/code&gt; (or maybe write that &lt;code&gt;list&lt;/code&gt; method myself).  then i would open the file app/views/birds/list.rhtml and write my display code there, probably something similar to what you wrote.

i find rails restrictions on the placement and naming of files to be real draconian.  i find it tolerable because it's much like java's &lt;code&gt;package com.foo.bar&lt;/code&gt;; java expects the public com.foo.bar.SomeClass to be placed in a file called SomeClass.java under the directory com/foo/bar.  at times, ruby on rails philosophy seems like some weird version of some social contract: "give up your naming conventions and method idiosyncracies and rails will make your life easier.  do something that isn't our way and we'll hand you over to the mafia."</description>
		<content:encoded><![CDATA[<p>wow.  so this is ruby on rails &#8220;power learning&#8221;.  no simple tutorials or sample cookbook applications here; just straight on porting an existing project, tacking on accumulated info about the framework as you go on.  not even a hint of rails&#8217; &#8220;scaffolding&#8221; or that weird article &#8220;rails - what goes where&#8221; by amy hoy (http://slash7.com/articles/2005/03/06/rails-what-goes-where).  not even a ruby syntax tutorial on statement termination and string concatenation!  no questions, no documentation, no pauses; just a wild ride on intuition, convention, and how-many-years of programming experience.</p>
<p>i&#8217;m currently doing the same thing with the python web framework turbogears and the java web framework wicket.  i can really relate; wicket has so little documentation that i can only hope i&#8217;m not reinventing anything like PageableOrderedListViews right now.  i have a lot of headaches nowadays but i love the learning experience all the same.</p>
<p>btw, you wrote in your initial code <code>&lt;% bird.genus bird.species %&gt;</code>, which gave you an error.  in ruby, parentheses are optional; instead of concatenating the two as you intended, you actually called the method <code>bird.genus</code> with the parameter <code>bird.species</code>.  it&#8217;s equivalent would be <code>bird.genus( bird.species )</code> in java.  For example, whereas in java the syntax for a method would look like <code> overlay.layout( Point center, Double radius )</code>, the syntax in ruby would look like <code> overlay.layout center, radius</code>.</p>
<p>the <strong>default</strong> layout of the files, when the scaffolding tool is used, mirrors the actions for that model.  for instance, if you have a set of birds, their controller would be called birds_controller, and it would have a model class called birds.  </p>
<p>if i want a web page that lists a bunch of birds, i can find the code in the <code>list</code> method of <code>BirdsController</code>, the class of which can be found in app/controllers/birds_controller.rb  i would then look for the list.rhtml page in app/views/birds directory.  if i want a web page that edits the bird&#8217;s info, i can find the code in the <code>edit</code> method of <code>BirdsController</code>, the class of which can be found in app/controllers/birds_controller.rb  i would then look for the edit.rhtml page in app/views/birds directory.  amy hoy&#8217;s cheatsheet can probably explain it better than i can (http://slash7.com/cheats/rails_files_cheatsheet.pdf).</p>
<p>if i were in your shoes and i wanted the default (scaffolded) way of displaying bird info, i would run &#8220;script/generate scaffold birds&#8221;.  i would then go to the created app/controllers/birds_controller.rb file and make sure that its <code>list</code> method has the line <code>@birds = Birds.find_all</code> (or maybe write that <code>list</code> method myself).  then i would open the file app/views/birds/list.rhtml and write my display code there, probably something similar to what you wrote.</p>
<p>i find rails restrictions on the placement and naming of files to be real draconian.  i find it tolerable because it&#8217;s much like java&#8217;s <code>package com.foo.bar</code>; java expects the public com.foo.bar.SomeClass to be placed in a file called SomeClass.java under the directory com/foo/bar.  at times, ruby on rails philosophy seems like some weird version of some social contract: &#8220;give up your naming conventions and method idiosyncracies and rails will make your life easier.  do something that isn&#8217;t our way and we&#8217;ll hand you over to the mafia.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Bailey</title>
		<link>http://www.elharo.com/blog/software-development/web-development/2005/12/03/birds-on-rails-part-3/#comment-28</link>
		<dc:creator>George Bailey</dc:creator>
		<pubDate>Sun, 04 Dec 2005 04:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elharo.com/blog/?p=26#comment-28</guid>
		<description>This is great. You're like a Jerry Pournelle with skills. I think you should throw in there somewhere "remember, I go through this so you don't have to." ;-)</description>
		<content:encoded><![CDATA[<p>This is great. You&#8217;re like a Jerry Pournelle with skills. I think you should throw in there somewhere &#8220;remember, I go through this so you don&#8217;t have to.&#8221; ;-)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
