public
Fork of rubys/mars
Description: Yet Another Planet Refactoring
Homepage: http://intertwingly.net/blog/2007/12/19/Yet-Another-Planet-Refactoring
Clone URL: git://github.com/technomancy/mars.git
mars / test / cache / entry / intertwingly.net,2004,2857
100644 27 lines (27 sloc) 4.939 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<entry xmlns:thr='http://purl.org/syndication/thread/1.0' xmlns='http://www.w3.org/2005/Atom'>
    <id>tag:intertwingly.net,2004:2857</id>
    <link href='http://intertwingly.net/blog/2008/06/16/Intertwingly-on-Rails' rel='alternate'/>
    <link href='http://intertwingly.net/blog/2857.atom' rel='replies' thr:count='9' thr:updated='2008-06-20T07:42:25-04:00'/>
    <title>Intertwingly on Rails</title>
    <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'><p>Views: <a href='http://rails.intertwingly.net/blog/'>index</a>, <a href='http://rails.intertwingly.net/blog/2008/6/14/Advertise-One-Feed-Format'>post</a>, <a href='http://rails.intertwingly.net/blog/comments.html'>comments</a>, <a href='http://rails.intertwingly.net/blog/archives/2008/06'>archives</a></p>
<p>This clearly is just modest beginnings.  A snapshot of existing data.  Read-only views at this point.  No caching.</p>
<p>Technology is Rails 2.0.2 on <a href='http://www.sqlite.org/'>SQLite3</a> using <a href='http://www.modrails.com/'>Phusion Passenger</a> on <a href='http://www.dreamhost.com/'>Dreamhost</a>.</p></div></summary>
    <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'><svg viewBox='0 0 100 100' height='100' xmlns='http://www.w3.org/2000/svg' width='100'>
  <rect x='0' y='3' rx='15' fill='#039' height='95' width='95'></rect>
  <path d='M20,56L19,35C19,30,27,20,33,21L55,21A30,30,0,0,1,20,56Z' stroke='#369' stroke-width='5px' fill='#369' stroke-linejoin='round'></path>
  <path d='M17,67A37,37,0,0,0,67,18A36,36,0,1,1,17,67' fill='#FFF'></path>
</svg>
<p>Views: <a href='http://rails.intertwingly.net/blog/'>index</a>, <a href='http://rails.intertwingly.net/blog/2008/6/14/Advertise-One-Feed-Format'>post</a>, <a href='http://rails.intertwingly.net/blog/comments.html'>comments</a>, <a href='http://rails.intertwingly.net/blog/archives/2008/06'>archives</a></p>
<p>This clearly is just modest beginnings.  A snapshot of existing data.  Read-only views at this point.  No caching.</p>
<p>Technology is Rails 2.0.2 on <a href='http://www.sqlite.org/'>SQLite3</a> using <a href='http://www.modrails.com/'>Phusion Passenger</a> on <a href='http://www.dreamhost.com/'>Dreamhost</a>.</p>
<p>Installation would have been a simple <abbr title='Secure CoPy'>scp</abbr> except for two issues: despite what it says in <a href='http://rails.dreamhosters.com/'>this list</a>, the sqlite3-ruby gem does not appear to be installed.  And the current date on the machine appears to be Feb 15, 3155.</p>
<p>For the model part, I can’t quite bear to break with the idea of flat files yet, so the model consists of two tables: posts and comments, and each contain dates and file name parts only.  The remainder of the model is populated using an after_find hook from the flat files.</p>
<p>With my current Intertwingly, I had three views that had diverged over time, as well as a “partial” which contained the navigation bar.  The <a href='http://intertwingly.net/blog/'>front page</a> (and <a href='http://intertwingly.net/blog/comments.html'>comments page</a>) are clean XHTML5, <a href='http://intertwingly.net/blog/2008/06/13/Advertise-One-Feed-Format'>individual posts</a> are XHTML1, and the <a href='http://intertwingly.net/blog/archives/'>archives</a> are based a layout that I used back when I was on Radio Userland.  In the Rails implementation, I have four views and a layout (index and comments becoming separate views).  Having a common layout encourages consistency, and you can see the difference in the archive view already.  More work needs to be done on the individual posts view.</p>
<p>The controller methods are positively pedestrian at this point.  They simply obtain the necessary information from the model, and then proceed to render the associated view.</p>
<p>This is but a modest beginning... allowing people to enter new comments, openid, implementing spam avoidance measures, automated extraction of excerpts, ... the list goes on and on.  But first, I plan to put this code under version control (probably <a href='http://git.or.cz/'>git</a>), and implement a test suite.</p></div></content>
    <updated>2008-06-16T14:53:44-04:00</updated>
  <source xmlns:planet='http://planet.intertwingly.net/'><planet:Intertwingly>http://intertwingly.net/blog/index.atom</planet:Intertwingly><link href='http://intertwingly.net/blog/index.atom' rel='self'/><id>http://intertwingly.net/blog/index.atom</id><icon>http://intertwingly.net/favicon.ico</icon><title>Sam Ruby</title><subtitle>It’s just data</subtitle><author>
    <name>Sam Ruby</name>
    <email>rubys@intertwingly.net</email>
    <uri>http://intertwingly.net/blog/</uri>
  </author><updated>2008-06-27T10:49:16-04:00</updated><link href='http://intertwingly.net/blog/' rel='alternate'/><link href='http://creativecommons.org/licenses/BSD/' rel='license'/><link href='http://intertwingly.net/blog/index.atom' rel='self'/></source></entry>