<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>rails</title>
        <link>http://geekswithblogs.net/MattRobertsBlog/category/6537.aspx</link>
        <description>rails</description>
        <language>en-GB</language>
        <copyright>Matt Roberts</copyright>
        <managingEditor>roberts.mattroberts@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>CouchDB (with rails)</title>
            <link>http://geekswithblogs.net/MattRobertsBlog/archive/2008/10/04/couchdb-with-rails.aspx</link>
            <description>I've been playing with &lt;a href="http://incubator.apache.org/couchdb/index.html"&gt;CouchDB&lt;/a&gt; a little recently. Its a "schema-free document-oriented database", which sounds pretty weird when all you've ever known is relational databases. At work, we're considering what architecture we want to go with for a new product that needs to be very flexible - the users need to be able to add fields, remove fields, and do all sorts of crazy things with the application.&lt;br /&gt;
&lt;br /&gt;
One of the options we have, is to use something like CouchDB to be able to create an uber-flexible database that can evolve over time, and be very scalable. because our new product will be a SaaS one. Its pretty clear to see why CouchDB fits the bill.&lt;br /&gt;
&lt;br /&gt;
Anyway, its pretty cool, and I wanted to see if I could get started creating a little application in Rails using CouchDB on the back end... It was pretty slow going until I came across this fantastic &lt;a href="https://peepcode.com/products/couchdb-with-rails"&gt;PeepCode Screencast&lt;/a&gt; This screencast goes through the basics of CouchDB, and then goes on to build a nifty notes-esque web application using a CouchDB gem called &lt;a href="http://github.com/jchris/couchrest/tree/master"&gt;CouchRest&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Its a quality peepcode, and the CouchRest gem looks like its really going to help me :)&lt;br /&gt;
&lt;br /&gt;
It'll be interesting to see what kind of take up CouchDB or other schema-free cloud computing databases get in the .NET world, I don't see much happening out there at the moment.&lt;br /&gt;
&lt;br /&gt;
Anyway, watch out for my killer CouchDB-based rails application, coming soon (yeah right!) &lt;img src="http://geekswithblogs.net/MattRobertsBlog/aggbug/125637.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matt Roberts</dc:creator>
            <guid>http://geekswithblogs.net/MattRobertsBlog/archive/2008/10/04/couchdb-with-rails.aspx</guid>
            <pubDate>Sun, 05 Oct 2008 05:27:38 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MattRobertsBlog/comments/125637.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MattRobertsBlog/archive/2008/10/04/couchdb-with-rails.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/MattRobertsBlog/comments/commentRss/125637.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MattRobertsBlog/services/trackbacks/125637.aspx</trackback:ping>
        </item>
        <item>
            <title>Categories in Rails</title>
            <link>http://geekswithblogs.net/MattRobertsBlog/archive/2007/12/14/categories-in-rails.aspx</link>
            <description>&lt;p&gt;Rails makes such a nice change from coding in .NET. I mean, I do like .NET and C#, but sometimes its very bloated and can be quite cumbersome to do things. &lt;/p&gt;  &lt;p&gt;Rails, on the other hand, isn't big. Or cumbersome. In fact, its downright lean and to-the-point, unlike my blog posts (what there are of them!). &lt;/p&gt;  &lt;p&gt;Anyway, today we're talking category trees, surely one of the most exciting concepts that there is to talk about. One thing that made me smile recently was the need to list all the categories that a company was tagged to. So, this happens with code that looks like this :-&lt;/p&gt;  &lt;p&gt;&amp;lt;%for cat in @Categories %&amp;gt;    &lt;br /&gt;    &amp;lt;%= cat.name + "&amp;lt;br&amp;gt;" %&amp;gt;     &lt;br /&gt;&amp;lt;% end %&amp;gt; &lt;/p&gt;  &lt;p&gt;.. Where @Categories is a collection of categories from the controller, and is generated like this:&lt;/p&gt;  &lt;p&gt;@Categories = Company.find(params["id"]).Category.find(:all)&lt;/p&gt;  &lt;p&gt;So, this noddy code just lists all cats that the company was tagged to. After deploying this, I was asked to change it so that the full hierarchy of categories was displayed. So instead of "Cat 1", the user wants to see "Root -&amp;gt; Services -&amp;gt; Cat 1". Hmmm, I thought, perhaps I need to write a little recursive method to go and get the parent nodes of each selected category... Turns out that because I was using acts_as_tree in the model (google it!), I was able to solve this with a really simple bit of code added to the category model :-&lt;/p&gt;  &lt;p&gt;    def fullcategoryname    &lt;br /&gt;        self.ancestors().each() { |parent| fullname += parent.name + " / " }     &lt;br /&gt;        fullname += self.name     &lt;br /&gt;  end&lt;/p&gt;  &lt;p&gt;Thats nice! :) Gotta like Ruby.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/MattRobertsBlog/aggbug/117702.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matt Roberts</dc:creator>
            <guid>http://geekswithblogs.net/MattRobertsBlog/archive/2007/12/14/categories-in-rails.aspx</guid>
            <pubDate>Sat, 15 Dec 2007 00:00:46 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MattRobertsBlog/comments/117702.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MattRobertsBlog/archive/2007/12/14/categories-in-rails.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/MattRobertsBlog/comments/commentRss/117702.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MattRobertsBlog/services/trackbacks/117702.aspx</trackback:ping>
        </item>
        <item>
            <title>Ruby ruby ruby ruby! (on rails)</title>
            <link>http://geekswithblogs.net/MattRobertsBlog/archive/2007/04/18/111775.aspx</link>
            <description>I recently decided to play around a bit with Ruby on Rails, its had so much hype so I thought it would be interesting to see how it fares up against ASP.NET programming!&lt;br /&gt;
&lt;br /&gt;
Anyway, I'm only just starting out, but first impressions are very very good indeed! Ruby seems to be a very intuitive language, although I wouldn't say I preferred it to C#. However, the rails framework that deals with all the agile web framework side of things seems awesome!! Really easy to use and get a reasonably complex web site up and running. &lt;br /&gt;
&lt;br /&gt;
I'm going to waffle on a bit more about this in the future, but in the meantime if you're interested in giving it a go on a windows box, its ridiculously easy - you don't even have to "install" any software!! Just do this:&lt;br /&gt;
&lt;br /&gt;
1) Download "InstantRails". &lt;a href="http://instantrails.rubyforge.org/wiki/wiki.pl"&gt;http://instantrails.rubyforge.org/wiki/wiki.pl&lt;/a&gt;&lt;br /&gt;
From the website: &lt;span style="font-style: italic;"&gt;Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all pre-configured and ready to run. No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment.&lt;/span&gt;&lt;br /&gt;
2) Get a "development environment setup"&lt;br /&gt;
If you're used to being spoilt/abused by Visual Studio and want something all nice and integrated, then you need to get RadRails. RadRails is a free plugin for the excellent-if-sometimes-a-little-too-slow-for-me Eclipse devenv from Sun. It needs the java runtime to work. Anyway, get it from &lt;a href="http://www.radrails.org"&gt;www.radrails.org&lt;/a&gt;&lt;br /&gt;
Alternatively, use VIM with ruby plugins, or something else :)&lt;br /&gt;
3) Follow some tutorials.&lt;br /&gt;
Start here....&lt;br /&gt;
&lt;a href="http://instantrails.rubyforge.org/tutorial/index.html"&gt;instantrails.rubyforge.org/tutorial/index.html&lt;/a&gt;&lt;br /&gt;
Then here....&lt;br /&gt;
&lt;a href="http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials"&gt;www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials&lt;/a&gt; &lt;img src="http://geekswithblogs.net/MattRobertsBlog/aggbug/111775.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matt Roberts</dc:creator>
            <guid>http://geekswithblogs.net/MattRobertsBlog/archive/2007/04/18/111775.aspx</guid>
            <pubDate>Thu, 19 Apr 2007 02:58:10 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MattRobertsBlog/comments/111775.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MattRobertsBlog/archive/2007/04/18/111775.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/MattRobertsBlog/comments/commentRss/111775.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MattRobertsBlog/services/trackbacks/111775.aspx</trackback:ping>
        </item>
    </channel>
</rss>
