<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>H3RALD - Tag 'rails' (RSS Feed)</title>
    <language>en-us</language>
    <lastBuildDate>Sat, 26 Mar 2011 06:16:46 -0600</lastBuildDate>
    <ttl>40</ttl>
    <link>http://www.h3rald.com</link>
    <description/>
    <item>
      <title>Book Review: The Rails 3 Way</title>
      <description>
		&lt;section class="section"&gt;
&lt;p&gt;Obie did it, again. With the second edition of his former masterpiece, &lt;em&gt;The Rails Way&lt;/em&gt;, he managed to outdo himself delivering a new, even more useful, Rails Bible. Wether you&amp;#8217;re a Ruby on Rails professional like him or just an enthusiast, this book is pretty much everything you need to learn how to master the third release of &lt;acronym title="David Heinameier Hansson"&gt;&lt;span class="caps"&gt;DHH&lt;/span&gt;&lt;/acronym&gt;&amp;#8217;s Ruby web framework.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://tr3w.com/"&gt;The Rails 3 Way&lt;/a&gt; is no ordinary second edition. If you already own &lt;em&gt;The Rails Way&lt;/em&gt;, you&amp;#8217;ll be pleasantly surprised that this is a different, more polished book. While something had to remain the same, there&amp;#8217;s a lot of new content in its 708 pages, and even the old content has been rewritten or at least revised.&lt;/p&gt;
&lt;p&gt;It doesn&amp;#8217;t matter whether you already know Rails 2.x or you&amp;#8217;re jumping straight into the Rails 3 world, if you use Rails, you can&amp;#8217;t miss this book.&lt;/p&gt;
&lt;p&gt;I started the &lt;a href="http://www.h3rald.com/articles/the-rails-way-review/"&gt;review of the first edition&lt;/a&gt; with a quote from my fianc&#233;e (now wife) on how pointless programming books are, especially those dealing with newish technologies: they tend to go out of date fairly quickly. While this still holds true, there&amp;#8217;s not much you can do about it, except maybe purchasing a digital edition of the book instead. However, if you want to keep a good Rails reference book by your side, this has to be the one.&lt;/p&gt;




&lt;section class="section"&gt;
&lt;header&gt;&lt;h1 id="h_1"&gt;What's New&lt;/h1&gt;&lt;/header&gt;
&lt;figure style="float:left;"&gt;&lt;img src="/img/pictures/books/rails3way/compare.jpg" /&gt;&lt;figcaption&gt;The Rails Way vs. The Rails 3 Way&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If you put &lt;em&gt;The Rails 3 Way&lt;/em&gt; and the original &lt;em&gt;The Rails Way&lt;/em&gt; one next to the other, you can see that the new book is considerably shorter: about 200 pages less. This doesn&amp;#8217;t mean it contains less information, quite the opposite: the new book contains a lot more stuff with less &lt;em&gt;fluff&lt;/em&gt;. Obie managed to reduce digressions to a bare minimum and focus on providing more informative content to the readers using less text. Think of it as a &lt;em&gt;fat-free&lt;/em&gt; book.&lt;/p&gt;
&lt;p&gt;While no &lt;em&gt;What&amp;#8217;s new in Rails 3&lt;/em&gt; section is included in the book, Obie points out the new stuff when needed (but not always). An example is chapter 12, &lt;em&gt;Ajax on Rails&lt;/em&gt;, in which changes introduced by Rails 3 clearly stand out, especially the section on Unobtrusive JavaScript (&lt;span class="caps"&gt;UJS&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Although the book is divided into chapters, it can also be divided into parts (each dealing with a specific theme) simply by looking at the front edge. According to this theme-based partitioning, Active Record makes up for nearly &lt;em&gt;a quarter&lt;/em&gt; of the book (173 pages), followed by &lt;em&gt;Active Support &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/em&gt; appendix and the &lt;em&gt;All About Helpers&lt;/em&gt; chapter.&lt;/p&gt;
&lt;p&gt;Another nice addition that can really make the difference when you&amp;#8217;re in a hurry is the &lt;em&gt;Method Index&lt;/em&gt;, which is separate from the main Index. It seems to account for all the methods in all (or at least the most important) classes in Rails. I didn&amp;#8217;t check method by method, but it is pretty comprehensive nonetheless, based on some quick spot checking.&lt;/p&gt;

&lt;/section&gt;
&lt;section class="section"&gt;
&lt;header&gt;&lt;h1 id="h_2"&gt;Contents&lt;/h1&gt;&lt;/header&gt;
&lt;figure style="float:right;"&gt;&lt;img src="/img/pictures/books/rails3way/sections.jpg" /&gt;&lt;figcaption&gt;Active Record makes up for over 24% of the book&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The first thing you notice once you read the first few pages, is that this book is &lt;em&gt;even more opinioned&lt;/em&gt; than its predecessor.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Even though Rails 3 is less opinionated than early versions, in that it allows for easy reconfiguration of Rails assumptions, this book is more opinionated than ever.&lt;/p&gt;
&lt;/blockquote&gt;
	&lt;p style="margin-left: 4em"&gt;&amp;ndash; Obie Fernandez, &lt;cite&gt;Introduction to &lt;em&gt;The Rails Way&lt;/em&gt;&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;In other words, you won&amp;#8217;t find an ERb view in the whole book (Haml rulez!) and if you don&amp;#8217;t like RSpec&amp;#8230; well, you&amp;#8217;d better skip Chapter 18 altogether.&lt;/p&gt;
&lt;p&gt;The other big difference with traditional Ruby and Rails books is the amount of reference to third-party code, mainly rubygems. Rails comes with no authentication functionality? So what: &lt;a href="https://github.com/binarylogic/authlogic"&gt;Authlogic&lt;/a&gt; and &lt;a href="https://github.com/plataformatec/devise"&gt;Devise&lt;/a&gt; are great for the job, go check them out! Do you need to test your Active Mailer emails? &lt;a href="https://github.com/bmabey/email-spec"&gt;email-spec&lt;/a&gt; is all you need.&lt;/p&gt;
&lt;p&gt;I was actually surprised to find so much content not strictly related to Rails in this book: the first chapter starts off with &lt;a href="http://gembundler.com/"&gt;Bundler&lt;/a&gt; (now a Rails dependency, however), Chapter 2 (Routes) mentions &lt;a href="http://rack.rubyforge.org/"&gt;Rack&lt;/a&gt;, and so does Chapter 4 (Controllers). If you want a nice and to-the-point practical introduction to &lt;a href="http://relishapp.com/rspec"&gt;RSpec&lt;/a&gt;, the first part of Chapter 18 covers that.&lt;/p&gt;

	&lt;figure style="float:left;"&gt;&lt;img src="/img/pictures/books/rails3way/reference.jpg" /&gt;&lt;figcaption&gt;About 40% of the book is reference material&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Then there&amp;#8217;s reference material. Plenty of it, a good 40% I daresay. The good thing is that (unlike the first edition) it won&amp;#8217;t bore you to death: take Chapter 5 (Working with Active Record) for example, you&amp;#8217;ll fly through find-related methods so swiftly you&amp;#8217;ll regret when it&amp;#8217;s over. Active Support? I didn&amp;#8217;t read every line of Appendix B, but when I want to know something about inflection methods I will know exactly where to find them, and what to expect: the method signature, a few lines of text, and a short example at most.&lt;/p&gt;
&lt;p&gt;My only regret? Cheat sheets. Or better, the lack of them. More tables, please! Granted, the web is full of Rails cheat sheets, but a few of them at the end of the book or even in a separate foldable add-on like in the &lt;a href="http://www.pragprog.com/titles/tpp/the-pragmatic-programmer"&gt;Pragmatic Programmer&lt;/a&gt; can&amp;#8217;t hurt.&lt;/p&gt;
&lt;p&gt;Finally, some words about the code examples. The code/text ratio is almost 1:1, but Obie&amp;#8217;s choice of &lt;em&gt;not&lt;/em&gt; turning this book into a huge tutorial by implementing a single example application was absolutely right: The code snippets used in throughout the book are concise and relevant to the text around them and won&amp;#8217;t distrupt your reading. If you want to play with them, they&amp;#8217;re even &lt;a href="https://github.com/obie/tr3w_time_and_expenses"&gt;on GitHub&lt;/a&gt; for you to clone and fork.&lt;/p&gt;

&lt;/section&gt;
&lt;section class="section"&gt;
&lt;header&gt;&lt;h1 id="h_3"&gt;Organization and Writing Style&lt;/h1&gt;&lt;/header&gt;
&lt;figure style="float:right;"&gt;&lt;img src="/img/pictures/books/rails3way/flick.jpg" /&gt;&lt;figcaption&gt;Yes, it&amp;#8217;s a long book. But you don&amp;#8217;t&lt;br/&gt;have to read it from start to finish!&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;The Rails 3 Way&lt;/em&gt; is a book for Rails professionals. If you don&amp;#8217;t know Ruby or if you never heard of Ruby on Rails, this book is &lt;em&gt;not&lt;/em&gt; for you. It won&amp;#8217;t teach you what &lt;span class="caps"&gt;MVC&lt;/span&gt; is, it won&amp;#8217;t waste time on explaining &lt;em&gt;convention over configuration&lt;/em&gt;, it won&amp;#8217;t even describe the structure of a Rails app! If you&amp;#8217;re newcomer to Rails&amp;#8230; well, that&amp;#8217;s what &lt;a href="http://ruby.railstutorial.org/"&gt;The Rails Tutorial&lt;/a&gt; is for.&lt;/p&gt;
&lt;p&gt;To be honest, I&amp;#8217;m with Obie on this. If this book had been beginner-friendly, it would have been even longer than the previous edition, and probably more boring. Instead, by assuming that the reader has been already initiated to the world of Ruby and Rails, the author can dive into the framework straight away. Moreover, chapters are not ordered by difficulty: they don&amp;#8217;t need to be, they need to be ordered in a way that makes sense for a Rails developer.&lt;/p&gt;
&lt;p&gt;Once again, this book includes personal sidebars used to voice the opinion of one of the co-authors or Rails gurus: there are plenty of &amp;#8220;&lt;em&gt;Yehuda&lt;/em&gt; says&amp;#8221;, &amp;#8220;&lt;em&gt;Xavier&lt;/em&gt; says&amp;#8221;, &amp;#8220;&lt;em&gt;Durran&lt;/em&gt; says&amp;#8221;, and so on. Nothing new there, it&amp;#8217;s just a nice way to provide the reader with authoritative opinions on some matters.&lt;/p&gt;
&lt;p&gt;As I progressed through the book, I started noticing how Obie anticipated my questions and doubts: I found this to be a remarkable feature of this book, and an excellent way to make the readers feel they are on the same page with the author. If something should not be done because it may cause you problems, the author won&amp;#8217;t hold back. See page 214, &amp;#8220;Extra Columns on &lt;strong&gt;has_and_belongs_to_many&lt;/strong&gt; Join Tables&amp;#8221;, for example: it&amp;#8217;s a cool feature, but it can cause all sort of annoyances, and the bottom line is: use &lt;strong&gt;has_many :through&lt;/strong&gt; instead, if you need extra columns on join tables.&lt;/p&gt;

&lt;/section&gt;
&lt;section class="section"&gt;
&lt;header&gt;&lt;h1 id="h_4"&gt;Conclusion&lt;/h1&gt;&lt;/header&gt;
&lt;p&gt;&lt;em&gt;The Rails 3 Way&lt;/em&gt; remains the &lt;em&gt;de facto&lt;/em&gt; reference book for Rails. I was quite pleased to see that Obie improved it so much, compared to the first edition. Sure, it cannot be recommended to absolute beginners, but it&amp;#8217;s not a big problem: if you&amp;#8217;re new to Rails, all you have to do is browse around and read a few basic tutorials first.&lt;/p&gt;
&lt;p&gt;What I really missed was a &lt;em&gt;What&amp;#8217;s New&lt;/em&gt; section, or something like that. The new stuff that was introduced in Ruby on Rails v3 is seamlessly blended with all the rest, which is great if you&amp;#8217;re tackling the framework for the first time, but not so much when you already read tons of books on Rails 2.&amp;#215;. I would have tagged content specific to Rails 3 in some way at least, for example with labels on the side of each page. Or maybe have a short introductory chapter covering the new features, and directions on where to find them in the book.&lt;/p&gt;
&lt;p&gt;Overall, &lt;em&gt;The Rails 3 Way&lt;/em&gt; is a great book, and if you plan on using Rails 3 for your next web site, it deserves a special place on your desk.&lt;/p&gt;

&lt;/section&gt;

&lt;/section&gt;</description>
      <pubDate>Sat, 26 Mar 2011 06:16:46 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/the-rails3-way-review/</guid>
      <link>http://www.h3rald.com/articles/the-rails3-way-review/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/the-rails3-way-review/#comments</comments>
      <category>review</category>
      <category>books</category>
      <category>rails</category>
    </item>
    <item>
      <title>Book Review: The Rails Way</title>
      <description>&lt;blockquote&gt;
    &lt;p&gt;"Programming books are pointless: you buy them, you read them and you chuck them because they're already out-of-date!"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is a quote from my fianc&#233;e, who always pointed out the ephemeral nature of programming books and therefore &lt;em&gt;highly discouraged me&lt;/em&gt; from buying any more. The sad thing is that this is partly true: if you buy a new programming book it &lt;em&gt;will&lt;/em&gt; eventually become outdated pretty quickly, especially if it's about newish technologies like &lt;a href="http://rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="http://www.informit.com/store/product.aspx?isbn=0321445619"&gt;The Rails Way&lt;/a&gt;&lt;/em&gt; is no exception: Rails 2.2 has been out for a while and introduced a few new features &amp;ndash; most notably Internationalization support &amp;ndash; which are not mentioned neither in this book nor in others.&lt;/p&gt;

&lt;p&gt;That being said, &lt;em&gt;The Rails Way&lt;/em&gt; by &lt;a href="http://obiefernandez.com/"&gt;Obie Fernandez&lt;/a&gt; is still the best and most comprehensive book on Rails v2 currently on the market. It's the book you simply cannot afford to ignore, if you are using (or are planning to use) this popular Ruby web framework.&lt;/p&gt;

&lt;h3&gt;Contents&lt;/h3&gt;

&lt;div style="float:right"&gt;&lt;img src="/files/therailsway.jpeg" alt="cover" /&gt;&lt;/div&gt;

&lt;p&gt;Before proceeding any further, I'd like to point out that is probably one of the longest programming books I've ever come across. With its 910 pages, &lt;em&gt;The Rails Way&lt;/em&gt; definitely cannot fit in your pocket and you cannot take it around with you easily. It's a book made to sit on your desk constantly and remain there, ready to be accessed at the right time, when needed. 
Unlike with other books I reviewed, this time I won't even attempt to go through every chapter and every section: it would not be meaningful for the review and it will probably bore you to death. For completeness' sake, however, here's a very trimmed-down table of contents listing &lt;em&gt;only&lt;/em&gt; the first level headings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Chapter 1 - Rails Environment and Configurations  &lt;/li&gt;
&lt;li&gt;Chapter 2 - Working with Controllers  &lt;/li&gt;
&lt;li&gt;Chapter 3 - Routing  &lt;/li&gt;
&lt;li&gt;Chapter 4 - REST, Resources, and Rails  &lt;/li&gt;
&lt;li&gt;Chapter 5 - Reflecting on Rails Routing  &lt;/li&gt;
&lt;li&gt;Chapter 6 - Working with ActiveRecord  &lt;/li&gt;
&lt;li&gt;Chapter 7 - ActiveRecord Associations  &lt;/li&gt;
&lt;li&gt;Chapter 8 - ActiveRecord Validations  &lt;/li&gt;
&lt;li&gt;Chapter 9 - Advanced ActiveRecord  &lt;/li&gt;
&lt;li&gt;Chapter 10 - ActionView  &lt;/li&gt;
&lt;li&gt;Chapter 11 - All About Helpers  &lt;/li&gt;
&lt;li&gt;Chapter 12 - Ajax on Rails  &lt;/li&gt;
&lt;li&gt;Chapter 13 - Session Management  &lt;/li&gt;
&lt;li&gt;Chapter 14 - Login and Authentication  &lt;/li&gt;
&lt;li&gt;Chapter 15 - XML and ActiveResource  &lt;/li&gt;
&lt;li&gt;Chapter 16 - ActionMailer  &lt;/li&gt;
&lt;li&gt;Chapter 17 - Testing  &lt;/li&gt;
&lt;li&gt;Chapter 18 - RSpec on Rails  &lt;/li&gt;
&lt;li&gt;Chapter 19 - Extending Rails with Plugins  &lt;/li&gt;
&lt;li&gt;Chapter 20 - Rails Production Configurations  &lt;/li&gt;
&lt;li&gt;Chapter 21 - Capistrano  &lt;/li&gt;
&lt;li&gt;Chapter 22 - Background Processing  &lt;/li&gt;
&lt;li&gt;Appendix A ActiveSupport API Reference&lt;/li&gt;
&lt;li&gt;Appendix B Rails Essentials&lt;/li&gt;
&lt;li&gt;Afterword What Is the Rails Way (To You)?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you already know &lt;em&gt;Rails&lt;/em&gt;, these titles will be self-explanatory to you. If not, you'll just have to trust my words when I say that this book covers every possible aspect of the framework, and 99% of the notions you need to know to start developing almost any Rails-powered web application.&lt;/p&gt;

&lt;p&gt;What really pleased me were chapters 17 through 22, i.e. something &lt;em&gt;not&lt;/em&gt; strictly related to Rails Core. Normally, books about Ruby and Ruby on Rails don't deal with anything even a little bit outside their scope: as a result, topics such as Rubygems, RSpec and Capistrano are often not mentioned at all, or if they are, they are relegated to one or two pages at maximum, leaving the reader to look on the Internet for more information. 
By contrast, &lt;em&gt;The Rails Way&lt;/em&gt; covers these ancillary but still very important topics very in-depth. Sure, you won't know the inside-out of RSpec after reading this book (although a whole chapter is devoted to it), but you will certanly know your way around it &lt;em&gt;enough&lt;/em&gt; to use it properly.&lt;/p&gt;

&lt;p&gt;What's missing in this book then? Maybe a &lt;em&gt;Chapter 0&lt;/em&gt; to guide the absolute beginner through the very basics of Rails and Ruby. Probably this goes beyond the scope of the book though, as the author clearly states that the book _"[...] is not a tutorial or basic introduction to Ruby or Rails. It is meant as a day-to-day
reference for the full-time Rails developer. "_. 
Still, 100 pages about the Magic of Scaffolding &amp;amp; other tricks to astonish the children wouldn't have damaged the book, especially considering that Chapter 1 starts at page &lt;em&gt;60&lt;/em&gt; after a lot of &lt;em&gt;pages intentionally left blank&lt;/em&gt;, Introduction, Foreward, Acknowledgements and similar padding material.&lt;/p&gt;

&lt;h3&gt;Organization and writing style&lt;/h3&gt;

&lt;blockquote&gt;
    &lt;p&gt;"Before going on, I should mention that part of what makes Rails exceptional is that it is opinionated software, written by opinionated programmers. Likewise, this is an opinionated book, written by opinionated writers."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This sentence in the &lt;em&gt;Introduction&lt;/em&gt; sounded very familiar. Almost an echo of Zed Shaw's own words in the &lt;em&gt;&lt;a href="http://www.h3rald.com/articles/mongrel-shortcut-review"&gt;Mongrel Digital Shortcut&lt;/a&gt;&lt;/em&gt;. After all this book is part of the &lt;em&gt;&lt;a href="http://www.informit.com/imprint/series_detail.aspx?ser=2124042"&gt;Addison-Wesley Professional Ruby Series&lt;/a&gt;&lt;/em&gt;, of which Obie is the Series Editor.
Like the other books in the series, this book contains all the stylistic conventions and distinctive features which make them very enjoyable to read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Informal, almost personal style&lt;/em&gt; &amp;ndash; reading this book is almost like hearing Obie telling you what &lt;em&gt;he&lt;/em&gt; thinks about Rails, and sharing with you his own tips and tricks.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Honest, even humble at times&lt;/em&gt; &amp;ndash; This book doesn't glorify Rails or Ruby: on the contrary, pitfalls are acknowledged and dealt with. Rails lacks an inbuilt authentication system? No problem, a whole chapter is devoted to the &lt;em&gt;act_as_authenticated&lt;/em&gt; plugin. You almost feel it's part of the core itself.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"[Person] says" sidebars&lt;/em&gt; &amp;ndash; The book's co-authors occasionally have their saying in special sidebars, all throughout the book. A way to evaluate different opinions and take a break from the book's main flow.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Code snippets&lt;/em&gt; &amp;ndash; Not too many, not too few, just about the right amount. Granted, you won't find any sample application in this book, but the snippets provided are more than enough to get to the point.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although this book is meant to be a reference, this doesn't mean it only contains reference material, it means that if you don't know about a particular feature of Rails or its satellites (Capistrano, RSpec, testing in general, etc.) you can open the book at any chapter and read through an in-depth discussion which will, most likely, answer all your questions.  &lt;/p&gt;

&lt;p&gt;Even if what you're looking for is not strictly related to Rails but can just &lt;em&gt;be used with it&lt;/em&gt;, you'll find it in the book. Some examples include a 23-page-long exhaustive dissertation on &lt;a href="http://www.prototypejs.org/"&gt;Prototype&lt;/a&gt;, a whole Chapter on RSpec, another on Capistrano and even information on XML parsing through REXML.&lt;/p&gt;

&lt;p&gt;What you won't find in the book, unfortunately, is how to get something which was not meant to be seamless integrated with Rails to work, like &lt;a href="http://jquery.com/"&gt;JQuery&lt;/a&gt;, for example. But again, this is understandable, as such topics would have made the book three times longer, at least.&lt;/p&gt;

&lt;h3&gt;Some constructive criticism&lt;/h3&gt;

&lt;p&gt;As a technical writer, I was somehow unhappy of the way reference material was presented in the book, i.e. more or less as ordinary chunks of text:&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;&lt;code&gt;execute(sql_statement)&lt;/code&gt;&lt;br/&gt;
    Executes the SQL statement provided in the context of this connection. This method is abstract in the DatabaseStatements module and is overridden by specific database adapter implementations. As such, the return type is a result set object cor-
    responding to the adapter in use.&lt;/p&gt;
    
    &lt;p&gt;&lt;code&gt;insert(sql_statement)&lt;/code&gt;&lt;br/&gt;
    Executes an SQL INSERT statement and returns the last autogenerated ID from the affected table.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You'll find plenty of pages like this in the book. Although all essential the information about each specific method is there, it is not organized properly. When I'm coding and I want to look up something quick, chances are that I can just hop over to &lt;a href="http://apidock.com/rails"&gt;APIdock&lt;/a&gt; or other similar services and query Rails documentation in a much more efficient way.&lt;br/&gt;
On the other end, if reference material was added for completeness' sake, it would have been much better included at the end of the book, more succinctly, through some carefully constructed reference tables. If the aim was instead to help the reader memorize all the method he &lt;em&gt;must&lt;/em&gt; know to work productively with Rails everyday, the author should have included some diagrams or any other type of visual aid.&lt;/p&gt;

&lt;p&gt;Similarly, the &lt;em&gt;Stack Checklist&lt;/em&gt; included in Chapter 20 is not actually a list at all, but rather a sequence of titled paragraphs which is definitely a good read &lt;em&gt;the first time&lt;/em&gt;, but it won't be as useful when you need to just refresh your memory.&lt;/p&gt;

&lt;p&gt;I admit, I noticed these things because part of my daily job as Technical Writer consists in making sure that reference material is well presented in the most minimalist, direct and useful way to the reader. Maybe a year ago I wouldn't have thought anything of it, but now I felt compelled to point this out hoping the next edition of the book will deal also with this aspect of the book. &lt;/p&gt;

&lt;p&gt;Since the book came out in 2007, the organization and presentation of Rails Documentation has been significantly improved by third-party services: I hope the authors and editors will try to make sure, next time, that the reference material is more &lt;em&gt;usable&lt;/em&gt; by the readers.&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;Overall, the book is a good read. It's even possible to read it sequentially (even if the author discourages this practice) and still get the most out of it &amp;ndash; a rare trait in programming books nowadays.&lt;br/&gt;
No other book will go so in-depth about Rails or about everything you need to know to get your site up and running in a&lt;em&gt;real&lt;/em&gt; production environment. That's the reason why &lt;em&gt;The Rails Way&lt;/em&gt;is the perfect companion for web development professionals who must ensure their applications are tuned up to perform and scale well.&lt;/p&gt;

&lt;p&gt;This doesn't mean that beginners should be discouraged from reading this book, quite the opposite. This is actually the only book newcomers to Rails need once they are done reading all those awesome beginner-oriented tutorials freely available on the Internet. Everyone interested in Rails, at some point, has to follow &lt;em&gt;The Rails Way&lt;/em&gt;.&lt;/p&gt;</description>
      <pubDate>Sun, 04 Jan 2009 01:03:00 -0700</pubDate>
      <guid>http://www.h3rald.com/articles/the-rails-way-review/</guid>
      <link>http://www.h3rald.com/articles/the-rails-way-review/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/the-rails-way-review/#comments</comments>
      <category>rails</category>
      <category>books</category>
      <category>review</category>
    </item>
    <item>
      <title>Rails-powered Open Source Killer Apps, Anyone?</title>
      <description>&lt;p&gt;Lately I&amp;#8217;ve been meandering around the web to find a good &lt;span class="caps"&gt;CMS&lt;/span&gt; for a family site I&amp;#8217;d like to set up. &lt;br /&gt;
Why a &lt;span class="caps"&gt;CMS&lt;/span&gt;? Well, for a few simple reasons:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;I don&amp;#8217;t have enough free time to fiddle with Rails and make my own (I&amp;#8217;m an &lt;em&gt;Hobbyist Programmer&amp;#8482;&lt;/em&gt;: I code for fun and enlightment, not for money)&lt;/li&gt;
	&lt;li&gt;Even if I had the time, I&amp;#8217;m &lt;em&gt;sure&lt;/em&gt; there are plenty of CMSes out there which suits my needs.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It turns out that reason #2 is not really applicable in this case, especially if we restrict the field to Ruby + Rails/Merb/&amp;lt;insert cool &lt;span class="caps"&gt;DRY&lt;/span&gt; framework here&amp;gt;.h3. Rails-powered CMSes&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Name a Rails-powered &lt;span class="caps"&gt;CMS&lt;/span&gt;, quick!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Easy: &lt;a href="http://radiantcms.org/"&gt;Radiant&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hmm, no. As much as I do like Radiant, it really cannot be considered a general-purpose &lt;span class="caps"&gt;CMS&lt;/span&gt;, can it? When it comes to build nearly-static sites in a clean and neat way I&amp;#8217;d pick it any day, but it lacks quite a lot of community features like comments, ability to create forums, etc. etc. It does, however, support multilingual content in a rudimentary, yet effective way: create each translated page manually and use consistent &lt;span class="caps"&gt;URL&lt;/span&gt; conventions (/en/about, /it/about, etc.).&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not saying that there aren&amp;#8217;t enough CMSes built on Rails, just that there&amp;#8217;s no &amp;#8220;killer app&amp;#8221; in the pack. A &amp;#8220;killer&amp;#8221; &lt;span class="caps"&gt;CMS&lt;/span&gt; would be something as powerful as Drupal, but easier to use and more modular.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s an incomplete list of the Rails CMSes I&amp;#8217;m currently aware of:&lt;/p&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;th&gt;Name &lt;/th&gt;
		&lt;th&gt;First Impressions/Comments &lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://radiantcms.org/"&gt;Radiant&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Mature, suitable for administering static sites &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://www.typosphere.org/"&gt;Typo&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Mature, one of the best blogging engines out there (my opinion is slightly biased though) &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://mephistoblog.com/"&gt;Mephisto&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Mature, blogging engine &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://rubricks.org/index_en.html"&gt;Rubricks&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Under development, basic features if compared to other non-Rails solutions &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://slateinfo.blogs.wvu.edu/"&gt;Slate&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Missing a lot of features if compared to competitors &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://beast.caboo.se"&gt;Beast&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Forum engine, extremely ligtweight &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://www.railfrog.com/"&gt;RailFrog&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Not sure if it&amp;#8217;s still being updated, not so many features &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://zenadmin.org/en"&gt;Zena&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Alpha, looks promising although it doesn&amp;#8217;t offer many features &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://simplelog.net/"&gt;simplelog&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Yet another blogging engine. Simple and easy to use &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://rcms.oopen.de/"&gt;oooopen rcms&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Early development stage (dead?), minimal feature set &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;a href="http://www.geegocms.com/"&gt;Geego&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; Multilingual, not so many out-of-the-box features &lt;/td&gt;
&lt;/table&gt;
&lt;p&gt;&lt;em&gt;[Psst, if you know any other Rails &lt;span class="caps"&gt;CMS&lt;/span&gt; I missed out, mention it in a comment and I&amp;#8217;ll update this table!]&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Developing Proprietary Web Applications with Rails&lt;/h3&gt;
&lt;p&gt;What&amp;#8217;s wrong with all of these? Normally one of three things: either they are mature, production-ready but focused on only one particular function (blog, forum, etc.), or they are still too new to be used seriously or they are slowly heading towards oblivion.&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s going on here? Rails is a damn fine framework which offers all the modularity and power you need to build sites! Why isn&amp;#8217;t there a fully fledged &lt;span class="caps"&gt;CMS&lt;/span&gt; to rival Drupal? &lt;br /&gt;
I think that part of the problem is that Rails is &lt;em&gt;too&lt;/em&gt; good. &lt;strong&gt;Why build a &lt;span class="caps"&gt;CMS&lt;/span&gt; from scratch when you can develop a web site from scratch much more easily, tailored to your customer?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Rails has been used to build a few &amp;#8220;mainstream&amp;#8221; sites like Twitter (no bashing please!), Basecamp, GitHub and many more. What do these sites have in common? &lt;em&gt;They are not open source&lt;/em&gt;. You cannot deploy your own Twitter on your server (You can with &lt;a href="http://laconi.ca/trac/"&gt;Laconica&lt;/a&gt;, though), you cannot deploy your own Basecamp to your server (you can with &lt;a href="http://www.projectpier.org/"&gt;ProjectPier&lt;/a&gt;, an open source fork of &lt;a href="http://www.activecollab.com/"&gt;ActiveCollab&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;It feels like that even though Rails itself is open source, &lt;strong&gt;there aren&amp;#8217;t that many open source Rails-powered projects after all&lt;/strong&gt;. Maybe there are, but they do not really compare with similar alternatives offered in other languages. This is the reason why, despite its utter ugliness, &lt;span class="caps"&gt;PHP&lt;/span&gt; is still the &lt;em&gt;Open Source King of the Web&lt;/em&gt;, and that&amp;#8217;s very, very sad in my opinion.&lt;/p&gt;
&lt;h3&gt;Dreams on Rails&lt;/h3&gt;
&lt;p&gt;The annoying thing is that Rails &lt;em&gt;is suitable&lt;/em&gt; to build CMSes, and good ones, too! Take Radiant and Typo, for example: they both excel in their own ways, &lt;em&gt;in their own worlds&lt;/em&gt;.&lt;br /&gt;
Theorethically speaking, &lt;strong&gt;there&amp;#8217;s no reason why someone couldn&amp;#8217;t develop a modular system to glue different components together&lt;/strong&gt;: you&amp;#8217;d need common user administration and common workflow, a few hooks, and a solid set of conventions on how to build third-party components.&lt;br /&gt;
Hell guys, the folks at Drupal developed a huge (and successful) product with a million different ways to extend it &lt;em&gt;in &lt;span class="caps"&gt;PHP&lt;/span&gt;&lt;/em&gt;. Even without using &lt;span class="caps"&gt;OOP&lt;/span&gt;! Every damn hook in the core is a &lt;em&gt;function&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;What does it take to do something like this using Rails, o Merb, or whatever else you like? You already have a very solid and consistent framework to build on (Rails), a way to automate tasks (Rake) and a language which lets you do everything you want, in a very elegant and organized way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rails lacks successful open source projects, in particular CMSes&lt;/strong&gt;. I wish someone could fix this: not by coding the &lt;em&gt;n^th^&lt;/em&gt; &lt;span class="caps"&gt;CMS&lt;/span&gt; with the only two or three features you need, but by developing an &lt;em&gt;high level application framework&lt;/em&gt; to build complex, dynamic and interactive web sites. Don&amp;#8217;t even develop the whole damn thing: just come up with a set of conventions on how to extend a very basic core, and tell people how they can contribute, or even integrate existing applications into it.&lt;/p&gt;
&lt;p&gt;The community will do the rest, hopefully&amp;#8230; Or maybe are you too busy trying to roll out your newest, closed source startup?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If someone decides to develop such a powerful, high-level framework and is determined to keep it user-friendly and open source, I hereby promise to write the documentation for it&lt;/strong&gt;, articles, and books. And I&amp;#8217;m not kidding.&lt;/p&gt;
&lt;h3&gt;[&lt;span class="caps"&gt;UPDATED&lt;/span&gt;] A Glimpse of Hope&lt;/h3&gt;
&lt;p&gt;A few of the commenters of this article brought up a few interesting points and actually gave me a little bit of hope. &lt;a href="http://salesforceonrails.com/"&gt;Luigi Montanez&lt;/a&gt; pointed out that Rails was built to help developers build web sites. For now, Rails deployment isn&amp;#8217;t as seamless as end users would like it, so there&amp;#8217;s no point creating a killer app for such users if they can&amp;#8217;t even get it to run on their $2/month shared hosting environment.&lt;br /&gt;
Nevertheless, there seems to be at least &lt;em&gt;three&lt;/em&gt; different open source &amp;#8220;social network engines&amp;#8221; powered by Rails:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://portal.insoshi.com/"&gt;Insoshi&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.communityengine.org/"&gt;Community Engine&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://lovdbyless.com/"&gt;Lovd By Less&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are not CMSes &lt;em&gt;in the early 2000&amp;#8217;s sense&lt;/em&gt;, obviously, but they do provide the basis to effectively build a late Web 2.0-ish community web site. Each one of these project seems stable and mature enough to be used in production, but surely not as well-known as many other &lt;span class="caps"&gt;PHP&lt;/span&gt;-based solutions.&lt;/p&gt;
&lt;p&gt;On the other hand, &lt;a href="http://priit.mx.ee/"&gt;Priit Tamboom&lt;/a&gt; mentioned &lt;a href="http://adva-cms.org/"&gt;adva cms&lt;/a&gt;, a project still in alpha stage which aims to be more traditional and site-agnostic:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;[&amp;#8230;] Different from other Rails applications the all-engines approach of adva cms allows you to build your own applications on top of it. It also makes it very flexible and extensible: our plan is to make it possible to only pick those engines/features that you really need for your application and omit the rest. As they are still all designed to work together seemlessly and reuse each others functionality the whole plattform feels much more consistent to a collection of similar but separate Rails applications. [&amp;#8230;]&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This sounds &lt;em&gt;exactly&lt;/em&gt; like what I was hoping would come out from the Rails community: something in between a web development framework and an high-level &lt;span class="caps"&gt;CMS&lt;/span&gt;. &lt;br /&gt;
I&amp;#8217;m definitely going to try it out (it&amp;#8217;s an ideal weekend project) and I&amp;#8217;ll report back once I know more about it.&lt;/p&gt;</description>
      <pubDate>Sun, 02 Nov 2008 02:41:00 -0700</pubDate>
      <guid>http://www.h3rald.com/articles/rails-os-killer-apps/</guid>
      <link>http://www.h3rald.com/articles/rails-os-killer-apps/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/rails-os-killer-apps/#comments</comments>
      <category>rails</category>
      <category>ruby</category>
      <category>writing</category>
      <category>rant</category>
    </item>
    <item>
      <title>Introducing H3RALD.com v7.1</title>
      <description>&lt;p&gt;I finally decided to redesign my web site. About 2 years passed since last time and I think this was long overdue: a lot of people liked the black &lt;em&gt;Nitefall&lt;/em&gt; theme, but a lot of people found a bit too dark for their liking.&lt;/p&gt;
&lt;p&gt;I decided to go for something more &lt;del&gt;boring&lt;/del&gt; traditional this time: white background and only black header and footer. I think the new design improves the overall readability of the site, also because this time I kept thing simple:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;No more sidebars &amp;ndash; Who needs them anyway? Who wants to see my &lt;a href="http://www.delicious.com/h3rald"&gt;delicious bookmarks&lt;/a&gt; on &lt;em&gt;every single page&lt;/em&gt;? Who wants to see that annoying Web 2.0-ish tag cloud listing all the tags I&amp;#8217;ve ever used from 2006 onwards? I suddently realized that the right column was nothing more than wasted space, so I removed it altogether.&lt;/li&gt;
	&lt;li&gt;No more differentiation between &lt;em&gt;articles&lt;/em&gt; and &lt;em&gt;blog posts&lt;/em&gt; &amp;ndash; As a matter of fact, I&amp;#8217;m not posting little pointless tidbits everyday, it&amp;#8217;s more likely just once a week or even once a month. When I post though, I tend to make it worthwhile both for me and the readers by writing about something which may interest people, for a change. In short: this may not be a &amp;#8220;traditional blog&amp;#8221; anymore, just a publishing platform for my articles.&lt;/li&gt;
	&lt;li&gt;No more &amp;#8220;previews&amp;#8221; &amp;ndash; From now on, only the title of each articles is displayed in the home page, in the archives and even when searching. If you want to read an article, all you have to do is click on its title. No more &amp;#8220;Read More&amp;#8221; links.&lt;/li&gt;
	&lt;li&gt;Just three main pages: &lt;a href=""&gt;Home&lt;/a&gt;, &lt;a href="/archives"&gt;Archives&lt;/a&gt;, and &lt;a href="/about"&gt;About&lt;/a&gt;. Although there may be some more for special projects, at some point.&lt;/li&gt;
	&lt;li&gt;Use the &lt;a href="/archives"&gt;Archives&lt;/a&gt; to find my articles. There you&amp;#8217;ll find a list of the 20 most used tags, a search form, and a timeline listing &lt;em&gt;all&lt;/em&gt; my articles from 2006 onwards.&lt;/li&gt;
	&lt;li&gt;Use the tiny palette on the left side of each page to perform common actions like bookmarking, scroll up and down, etc. You can read more about it on the &lt;a href="/about"&gt;About&lt;/a&gt; page.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I hope you like the new design, or at least I hope it makes my articles more readable. However, I&amp;#8217;m open to suggestions, as usual.&lt;/p&gt;
&lt;p&gt;P.S.: I dropped with Internet Explorer 6 compatibility According to my stats, less than 5% of my visitors use it, so it&amp;#8217;s not worth the extra hassle.&lt;/p&gt;</description>
      <pubDate>Sun, 26 Oct 2008 22:29:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/h3rald-71/</guid>
      <link>http://www.h3rald.com/articles/h3rald-71/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/h3rald-71/#comments</comments>
      <category>website</category>
      <category>rails</category>
    </item>
    <item>
      <title>Rails-Doc.org - A First Look</title>
      <description>&lt;p&gt;When you decided to learn Ruby on Rails (if you did, that is), chances are that you bought a book. I did, too, actually: there are a lot of very interesting and fairly comprehensive books out there after all.&lt;/p&gt;
&lt;p&gt;I actually never bought a book to learn &lt;span class="caps"&gt;PHP&lt;/span&gt;, in the past though. Why&amp;#8217;s that? Well, for two simple reasons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The &lt;a href="http://www.php.net/manual/en/"&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; manual&lt;/a&gt; can easily be searched and provides enough documentation, in most cases.&lt;/li&gt;
	&lt;li&gt;When the documentation is not enough, there&amp;#8217;s always plenty of comments by experienced developers to save your day.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That being said, &lt;span class="caps"&gt;PHP&lt;/span&gt; is still an awfully disorganized language, but believe it or not, coming from &lt;span class="caps"&gt;PHP&lt;/span&gt; I didn&amp;#8217;t find &lt;a href="http://api.rubyonrails.org/"&gt;Rails documentation&lt;/a&gt; useful enough simply because it didn&amp;#8217;t have these two simple but very powerful features.&lt;/p&gt;
&lt;p&gt;Sure, there&amp;#8217;s the &lt;a href="http://www.railsdocumentation.org/"&gt;Rails Documentation Project&lt;/a&gt; which provides more organized docs, and &lt;a href="http://www.noobkit.com/"&gt;Noobkit&lt;/a&gt; does a nice job with its search-as-you-type feature&amp;#8230; but still is not quite enough: you&amp;#8217;d expect something much better than that for something like Rails!h3. Introducing Rails-Doc.org&lt;/p&gt;
&lt;p style="float:right;"&gt;&lt;img src="/files/railsdoc_logo_sm.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rails-doc.org"&gt;Rails-Doc.org&lt;/a&gt; focuses on providing a better interface to Rails documentation by offering two key features:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A powerful, fast and useful document search&lt;/li&gt;
	&lt;li&gt;The possibility to add notes to Rails documentation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When the app went live, I immediately registered (it&amp;#8217;s free of course) and started playing with it&amp;#8230;&lt;/p&gt;
&lt;h4&gt;Search as you type&amp;#8230;&lt;/h4&gt;
&lt;p&gt;The first thing I did was trying the search features, of course. I started typing &amp;#8220;rout&amp;#8221; for Routing, and I was immediately shown a list of matches:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/rails-doc_search.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;It took a small fraction of a second to load the matches, which makes me think that definitely they have all the names indexed somewhere. Nevertheless, it was a pleasant surprise: normally, these search-as-you-type utilities are not that refined!&lt;/p&gt;
&lt;p&gt;All you need to do is start typing at least three letters, and you get results, if any. &lt;br /&gt;
if you press &lt;span class="caps"&gt;ENTER&lt;/span&gt;, you get automatically redirected to the first result. This can be good, but maybe it would have been nicer to load a &amp;#8220;traditional&amp;#8221; list of results, but it depends on your taste, really.&lt;/p&gt;
&lt;h4&gt;&amp;#8230;or browse through the namespaces&lt;/h4&gt;
&lt;p&gt;Alternatively, it is possible to browse the docs in the more traditional way, i.e. according to their class or module: the &lt;strong&gt;Browse&lt;/strong&gt; page does just that: it lists &lt;em&gt;all&lt;/em&gt; Rails classes and modules, regardless of the nesting. But there&amp;#8217;s more: a little roundy icon precedes each class name, to indicate whether the documentation is present, and to what degree:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/rails-doc_icons.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;This is an interesting concept: in this way, in theory, people should contribute to the documentation where it&amp;#8217;s more needed.&lt;/p&gt;
&lt;p&gt;Each reference page is very neatly re-formatted: you can hardly imagine it&amp;#8217;s actually the same content included in Rails&amp;#8217; RDoc pages!&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/rails-doc_document.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Finally, another nice addition is the &lt;strong&gt;Related&lt;/strong&gt; column, which lists links to other items which are related to the current topic:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/rails-doc-related.gif" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Contribute, contribute, contribute!&lt;/h3&gt;
&lt;p&gt;You have to register for something, don&amp;#8217;t you? Yes. If you register, you can post notes to any document. Simple enough, all you have to do is to click the &lt;strong&gt;Add Note&lt;/strong&gt; button and a form will slide down for you to fill in:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/rails-doc_note1.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;As you start typing, you&amp;#8217;ll notice that a preview of the note is displayed instantly: as you can use SimpleMarkup to write notes, exactly like in RDoc, this feature can be very handy:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/rails-doc_note2.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;What if there&amp;#8217;s no documentation for a particular class or method? You&amp;#8217;ll get a warning like this one:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/rails-doc_nodoc.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The idea behind this is that, if you provide some useful insights, they&amp;#8217;ll eventually end up in Rails core documentation.&lt;/p&gt;
&lt;h3&gt;An Short Interview with Mikael Roos, from Nodeta&lt;/h3&gt;
&lt;p&gt;Before the application went live, I was lucky enough to get Mikael Roos to answer to some of my questions. Here&amp;#8217;s the full interview&amp;#8230;&lt;/p&gt;
&lt;h4&gt;What are you actually trying to do on Rails-Doc.org?&lt;/h4&gt;
&lt;p&gt;The initial goal of the project is to provide the existing documentation in a more accessible way, most importantly to provide a lightning fast search feature that gives weighted results based on the&lt;br /&gt;
quality and amount of documentation. This we have already accomplished, and all remaining issues are related to browser compatibility. Another initial goal is to present a smooth interface for creating inline notes to&lt;br /&gt;
the documentation so that Rails developers can post notes about certain methods etc. for themselves and others to draw knowledge from.&lt;/p&gt;
&lt;p&gt;Our longer-term goal (N.B. we are an agile project, so long-term means, say, three months) is to provide a way for the active members of the Rails community to improve the existing documentation based on the posted notes&lt;br /&gt;
to create an extended documentation that could optimally even be made in to a patch and would find its way back into the actual Rails source.&lt;/p&gt;
&lt;p&gt;Another clear and obvious goal is to keep improving the service steadily as we progress toward the goals that I mentioned above.&lt;/p&gt;
&lt;h4&gt;Could you spend a few words on the &amp;#8220;development process&amp;#8221; followed by your company to develop this app? Did I read the word &amp;#8220;Scrum&amp;#8221; somewhere? Am I correct?&lt;/h4&gt;
&lt;p&gt;Yes, our development process of choice is Scrum. The core team is only three members, one backend developer, one backed/frontend develope and one frontend developer/UI specialist. I feel the team is optimal in many ways.&lt;br /&gt;
The team also has a few more experienced developers who are primarily active in other projects to ask questions from, one of whom is also the acting product owner on the Rails-doc project (that&amp;#8217;s me!).&lt;/p&gt;
&lt;h4&gt;Did you develop it in three months, or&amp;#8230;?&lt;/h4&gt;
&lt;p&gt;The first release was developed in three &lt;span class="caps"&gt;SPRINTS&lt;/span&gt;, not months &amp;#8211; so what I&amp;#8217;m saying is the first release was developed in five weeks (first sprint was mostly introductory and lasted a week, the next two sprints, first&lt;br /&gt;
development and then stabilization, were two weeks each). However, it is a &lt;span class="caps"&gt;FIRST&lt;/span&gt; &lt;span class="caps"&gt;RELEASE&lt;/span&gt;, which means the app is by all means not complete, but since we make software in a very agile way, it&amp;#8217;a all about &amp;#8220;Ship, ship, ship!&amp;#8221;.&lt;/p&gt;
&lt;h4&gt;What is &lt;a href="http://www.nodeta.fi"&gt;Nodeta&lt;/a&gt;, exactly? My Finnish is a bit rusty nowadays&amp;#8230;&lt;/h4&gt;
&lt;p&gt;Nodeta is a software development company that focuses on web software. We employ a highly agile and effective process. We have worked both on light independent projects and in the environment of large global enterprises.&lt;br /&gt;
There are currently 10 Nodetans.&lt;/p&gt;
&lt;p&gt;Rails-Doc.org is a pilot project for your new shiny app, ApiDock. Is it an open source app?&lt;/p&gt;
&lt;p&gt;Unfortunately, I cannot go into details about APIdoc yet. What I can tell is that it is developed with Rails and that it won&amp;#8217;t be open source, but rather it would optimally be offered as a service, which after all is what&lt;br /&gt;
the word &amp;#8220;app&amp;#8221; on the web means these days. Open source projects could however use it for free, sort of in the spirit of GitHub.&lt;/p&gt;
&lt;p&gt;It will also most likely be separately targeted to larger companies.&lt;/p&gt;
&lt;h4&gt;Can you give me more technical details about the way keyword search is performed? Are you indexing/tagging documentation beforehand?&lt;/h4&gt;
&lt;p&gt;There will probably be a blog post on the &lt;a href="http://blog.nodeta.fi"&gt;Nodeta blog&lt;/a&gt; about the search and how it works after the first release comes out.&lt;/p&gt;
&lt;h4&gt;What about the social side of it: you&amp;#8217;re hoping people will contribute with notes, which will then be collected and integrated in the documentation correct? Do you have any moderation or anti-spam precaution?&lt;/h4&gt;
&lt;p&gt;The quality of notes is judged in a social way. Notes can be thanked by other users and notes that get many thanks are showed in a more prominent way. Registration will be required in order to post notes and the registration will feature a captcha.&lt;/p&gt;
&lt;h4&gt;Will contributors be credited somehow? Who can contribute and at what level?&lt;/h4&gt;
&lt;p&gt;Anybody can post notes and good notes get thanks and thus so do their posters. Users that get lots of thanks will be later asked to become core users that can alter the extended documentation (not in the first&lt;br /&gt;
release.)&lt;/p&gt;
&lt;h4&gt;You want to blow out competition and that you don&amp;#8217;t want to fail: sounds a good plan! How is Rails-Docs different from other similar apps?&lt;/h4&gt;
&lt;p&gt;We think that our app is the first that is serious about making things happen. We think about users first and above all at this stage our search feature is frankly unparallelled.&lt;/p&gt;
&lt;h4&gt;Do you have DHH&amp;#8217;s seal of approval? Will you? Is there any copyright issue with your domain name?&lt;/h4&gt;
&lt;p&gt;Time will tell what &lt;span class="caps"&gt;DHH&lt;/span&gt; thinks. We did contact him just a few days ago to ask what his thoughts about all this are and are waiting for his comments. I doubt there is any wrinkles with copyright as Rails-doc itself is a completely non-profit project.&lt;/p&gt;
&lt;h4&gt;What about doing something similar for the whole Ruby language? Ruby docs may also be easier, in a way&amp;#8230;&lt;/h4&gt;
&lt;p&gt;It is possible that we might do just that but right now it&amp;#8217;s all about Rails.&lt;/p&gt;
&lt;h3&gt;The Bottom Line&lt;/h3&gt;
&lt;p&gt;Rails-Doc.org is definitely an interesting project, which has all the potential to become a powerful, Rails-powered service. Sure, it&amp;#8217;s not open source and this can be a bit of a letdown for some: but after all people flocked to GitHub when it opened, didn&amp;#8217;t they?&lt;/p&gt;
&lt;p&gt;The search capabilities of Rails-Doc.org are definitely a very important step forward in making Rails documentation more accessible and easier to use, but the killer feature is definitely the possibility to add notes, if used wisely.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll be watching this project closely and I&amp;#8217;ll pay particular attention on what happens to the community&amp;#8217;s contributions: will it really be useful? Will it really help creating documentation patches to Rails core? Only time will tell, of course.&lt;/p&gt;</description>
      <pubDate>Wed, 18 Jun 2008 23:30:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/rails-doc-first-look/</guid>
      <link>http://www.h3rald.com/articles/rails-doc-first-look/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/rails-doc-first-look/#comments</comments>
      <category>rails</category>
      <category>ruby</category>
      <category>writing</category>
      <category>review</category>
    </item>
    <item>
      <title>Beware of sudden upgrades!</title>
      <description>&lt;p&gt;Yesterday I got a rather annoying early Christmas present: when visiting my site, I noticed that the raw source code of my dispatch.fcgi file (yes, I&amp;#8217;m on shared hosting with FastCGI, for now) was displayed &amp;#8220;as it is&amp;#8221; instead of being interpreted.&lt;/p&gt;
&lt;p&gt;After the initial moment of anger and stress (I immediately realized it was BlueHost&amp;#8217;s fault, not mine), I opened two tickets and went to bed, hoping to see everything solved in the morning.&lt;/p&gt;
&lt;p&gt;Unluckily it wasn&amp;#8217;t the case, so I posted on BlueHost forum trying to be as polite as possible complaining because the issue wasn&amp;#8217;t being dealt with. It turns out that for such issues you&amp;#8217;re supposed to use the &amp;#8220;Live Chat&amp;#8221; feature instead of the tickets, so that&amp;#8217;s what I did.&lt;/p&gt;
&lt;p&gt;After a quick chat with &amp;#8220;Christian&amp;#8221;, it turns out that BlueHost decided to perform a server upgrade &amp;#8220;silently&amp;#8221; upgrading to Apache2, PHP5, MySQL4.1, etc. etc.&lt;br /&gt;
Cool, pity that nobody told me that!&lt;/p&gt;
&lt;p&gt;I was expecting some sort of &lt;span class="caps"&gt;PHP&lt;/span&gt; upgrade (not that I care like that), which was supposed to happen according to the last BlueHost newsletter:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;#8220;To alleviate any issues in the future with certain scripts that only run on one&lt;br /&gt;
version of &lt;span class="caps"&gt;PHP&lt;/span&gt; we have developed the ability to run PHP4 and PHP5 on the same server&lt;br /&gt;
simultaneously. This will be rolled out to all users in the next couple of weeks. Some&lt;br /&gt;
servers already have this ability while most will see it in the next two weeks.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But&amp;#8230; hang on? Does it say anything about migrating to Apache2? I don&amp;#8217;t think so! What&amp;#8217;s worse, is that quite a few things changed with Apache2, in particular the way FastCGI handlers are declared:&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt;&lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;# Apache 1.3:
&lt;span class="line-numbers"&gt;&lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;AddHandler fastcgi-script .fcgi
&lt;span class="line-numbers"&gt;&lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;# Apache 2:
&lt;span class="line-numbers"&gt;&lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;AddHandler fcgid-script .fcgi
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;See? Different. This is due to the fact that &lt;a href="http://wiki.rubyonrails.org/rails/pages/Debian+mod_fastcgi+Notes"&gt;&lt;code&gt;mod_fcgid&lt;/code&gt; is used instead of &lt;code&gt;mod_fastcgi&lt;/code&gt; on Apache 2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The fix was easy, of course, and now my site is up and running again (and actually running faster)&amp;#8230; but, I wonder, why the hell wasn&amp;#8217;t I informed? Is it acceptable? It sounds like I might end up on a &lt;span class="caps"&gt;VPS&lt;/span&gt; sooner than expected, unless BlueHost doesn&amp;#8217;t roll out some new exciting feature soon, as I think it might&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Wed, 19 Dec 2007 23:41:00 -0700</pubDate>
      <guid>http://www.h3rald.com/articles/apache2-upgrade/</guid>
      <link>http://www.h3rald.com/articles/apache2-upgrade/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/apache2-upgrade/#comments</comments>
      <category>website</category>
      <category>rails</category>
    </item>
    <item>
      <title>Book Review: Mongrel Digital Shortcut</title>
      <description>&lt;p&gt;If you ever considered about developing an deploying a Rails application in the last year or so, you must have heard of &lt;a href="http://mongrel.rubyforge.org/index.html"&gt;Mongrel&lt;/a&gt; before. If you didn&amp;#8217;t, I&amp;#8217;d recommend you learn more about it because up to now it proved to be one of the few essential ingredients for deploying &lt;em&gt;scalable&lt;/em&gt; Rails applications.&lt;/p&gt;
&lt;p&gt;Mongrel is a creation of &lt;a href="http://www.zedshaw.com/"&gt;Zed Shaw&lt;/a&gt; who started writing a replacement for FastCGI to use with Rails, and ended up creating a brand new, &lt;span class="caps"&gt;HTTP&lt;/span&gt; web server who turned out to be one of the best things the Rails community ever saw happening.&lt;/p&gt;
&lt;p&gt;It was created to be simple to use and configure, nevertheless it &lt;em&gt;does&lt;/em&gt; require some skill to set it up and tune it. Documentation is there, along with plenty of blog posts, but there&amp;#8217;s also an interesting &lt;a href="http://www.informit.com/store/product.aspx?isbn=0321483502&amp;amp;rl=1"&gt;book&lt;/a&gt; from &lt;a href="http://www.awprofessional.com/"&gt;Addison Wesley Professional&lt;/a&gt; which is definetely worth a read.&lt;/p&gt;
&lt;p style="float:right;"&gt;&lt;img src="/files/mongrel_shortcut.jpeg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;#8220;Mongrel: Serving, Deploying, and Extending Your Ruby Applications&amp;#8221; &amp;ndash; that&amp;#8217;s the title of the book. A &lt;em&gt;Digital Shortcut&lt;/em&gt;, 100-odd pages long, in &lt;em&gt;landscape&lt;/em&gt; format to make it easier to read on a computer, straight to the point with no added sugar for just 15$ (&lt;span class="caps"&gt;PDF&lt;/span&gt; only). I must say Addison Wesley got it right: the book&amp;#8217;s format is, as a matter of fact, &lt;em&gt;optimized for web developers&lt;/em&gt;, especially those who can&amp;#8217;t afford to read a 500-pages book covering everything about a subject just to find that one thing they don&amp;#8217;t know about.&lt;br /&gt;
This &lt;em&gt;shortcut&lt;/em&gt; can be seen, essentially, as an expanded cheatsheet which will teach you the basics about Mongrel and also give you plenty of advice on how to learn more about it.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s have a closer look at it.&lt;/p&gt;
&lt;h3&gt;Overview, Introduction &amp;amp; Getting Started&lt;/h3&gt;
&lt;p&gt;The first three &lt;del&gt;chapters&lt;/del&gt; sections (there are no chapters, just &lt;em&gt;sections&lt;/em&gt;) of the book are meant to be a gentle introduction to Mongrel and its world. The main author is &lt;a href="http://www.informit.com/authors/bio.aspx?a=0260912e-6ed8-4ed1-882a-c357e644feec"&gt;Matt Pelletier&lt;/a&gt;, but Zed Show&amp;#8217;s contributions are definitely one of the book&amp;#8217;s best selling points. &lt;br /&gt;
Zed&amp;#8217;s thoughts are scattered here and there in many &lt;em&gt;sidebars&lt;/em&gt; throughout the book (there&amp;#8217;s at least one in each section): you&amp;#8217;ll see an odd-looking face (Zed&amp;#8217;s self-caricature) with some text next to it; when you read it, you&amp;#8217;ll notice that they are &lt;em&gt;actually&lt;/em&gt; Zed&amp;#8217;s own thoughts, straight from his mind, with no editorial filter whatsoever in-between. &lt;br /&gt;
Be warned: the text included within the &lt;strong&gt;Zed Sez&lt;/strong&gt; sidebars is highly opinionated, that&amp;#8217;s precisely what Zed &lt;em&gt;feels&lt;/em&gt; to say about something, and he&amp;#8217;ll just say it: just the plain, simple thoughts of an experienced programmer. As the author explains in &lt;strong&gt;Section 1&lt;/strong&gt;: &lt;em&gt;&amp;#8220;[&amp;#8230;] You may not agree with everything he says, but you probably should.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Section 2&lt;/strong&gt; is a general introduction about Mongrel. It explains &lt;em&gt;what&lt;/em&gt; it is, &lt;em&gt;when&lt;/em&gt; and &lt;em&gt;why&lt;/em&gt; it was made, and &lt;em&gt;how&lt;/em&gt; it works. There&amp;#8217;s nothing new to learn if you already used Mongrel before, probably, but it&amp;#8217;s definitely the first thing to show to someone who&amp;#8217;s new to Mongrel and its world, and possibly a bit skeptical about it. &lt;br /&gt;
The last subsection &lt;em&gt;&amp;#8220;What can Mongrel do for me&amp;#8221;&lt;/em&gt; is an attempt to &lt;del&gt;brainwash&lt;/del&gt; persuade you to fully embrace Mongrel and its philosophy, whether you are a developer, a sysadmin or even a manager: assertions like &lt;em&gt;&amp;#8220;Mongrel is pretty damned secure.&amp;#8221;&lt;/em&gt; and &lt;em&gt;&amp;#8220;Mongrel&amp;#8217;s license is capitalist-friendly.&amp;#8221;&lt;/em&gt; will definitaly make some of you (managers) happy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Section 3&lt;/strong&gt; is slightly more juicy than the previous one, as it explains how to install and use Mongrel. Basically that&amp;#8217;s what everyone who ever used it already knows, but it&amp;#8217;s still necessary for the book&amp;#8217;s consistency, after all. After reading this section, you&amp;#8217;ll probably have your first Mongrel up and running and serving your little Rails application&amp;#8217;s pages, and you&amp;#8217;ll begin to wonder why the hell you need to keep reading this book now that everything seems to work already&amp;#8230;&lt;/p&gt;
&lt;h3&gt;Section 4: Configurations&lt;/h3&gt;
&lt;p&gt;&amp;#8230;aka &amp;#8220;a truly useful Mongrel cheatsheet&amp;#8221;. This section dives deep(er) into Mongrel&amp;#8217;s configuration by explaining what each start parameter does in detail. The parameters are presented in tabular form in a very well-organized way. As you would expect from an high-quality cheatsheet.&lt;/p&gt;
&lt;p&gt;Then the author will explore a few commonly used deployment scenarios, in particular:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Standalone&lt;/strong&gt; &amp;ndash; The simplest configuration possible, with just one Mongrel instance serving both static and dynamic pages.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;mongrel&amp;#95;cluster&lt;/strong&gt; &amp;ndash; How to use &lt;em&gt;&amp;#8220;a pack of mongrels&amp;#8221;&lt;/em&gt; together to handle more traffic.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Behind a static web server&lt;/strong&gt; &amp;ndash; The most common (and most scalable) option, used to serve static content faster using a front-end server and use Mongrel only to handle Ruby pages.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Towards the end of the section, for the developer&amp;#8217;s delight, the author will discuss two common, useful scenarios where Mongrel can be used:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Apache 2 + mod_proxy_balancer + mongrel&amp;#95;cluster&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Nginx + mongrel&amp;#95;cluster&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The difference here is that detailed instructions are provided on how to setup and configure each server, including example file sources. This can be particularly useful for the Nginx example, as most of the documentation for this fantastic, lightweight Mongrel fron-end is scattered around the web (or written in Russian in a &lt;a href="http://sysoev.ru/nginx/"&gt;well known place&lt;/a&gt;).&lt;/p&gt;
&lt;h3&gt;Section 5: Production Deployment&lt;/h3&gt;
&lt;p&gt;This section introduces one of the most important part of the life cycle of a Rails application: the deployment on a production server. The author is pretty honest about the whole subject:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;#8220;You will not do this in a day. If you are expecting to code until 1 minute before your deadline and then simply point and click and have an instant server then you need to take some kind of&lt;br /&gt;
medication because you are violently hallucinating. You will need at least a week of 8 hours days to make sure your first deployment works and to have the time to do it right.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sounds terribly true. Especially for larger projects demanding good performance under heavy traffic. Scared? Probably, if you never deployed a Rails application &amp;#8220;properly&amp;#8221; before, but at least the book comes to the rescue by providing an overview of what you need to perform a deployment and why it is such a complex and delicate process.&lt;/p&gt;
&lt;p&gt;Not only this, but also a &amp;#8220;Best Practices Rubric&amp;#8221; is also provided for the developer&amp;#8217;s own private enjoyement. It&amp;#8217;s written as a list of questions like:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;11. Do you have a shared location where you can document the deployment, such as a Wiki or &lt;span class="caps"&gt;CMS&lt;/span&gt;?&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;12. Do you know how to use httperf or ab and know what the statistics mean?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;After these 13 questions, the author provides the key to give a meaning to your answers:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;For each question you answer with &amp;#8220;NO&amp;#8221;, add 10 hours to your time estimate for completion. This may seem unrealistic, since saying &amp;#8220;NO&amp;#8221; to everything means it&amp;#8217;ll take 190 hours (about one&lt;br /&gt;
month), but this estimate is actually low according to most first deployment experiences.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you answered &amp;#8220;NO&amp;#8221; too many times to these questions, you may want to read on through the next subsection which states 17 &amp;#8220;worst practices&amp;#8221;: an invaluable read for beginners!&lt;/p&gt;
&lt;p&gt;But after all this section is not only about stating the obvious (&amp;#8230;right?): a full example scenario is describedand examined throughly to give you an idea of how a deployment &lt;em&gt;should&lt;/em&gt; be made, using three different machines:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;One for Apache (as a front-end to Mongrel)&lt;/li&gt;
	&lt;li&gt;One for the Mongrel cluster and the Rails application&lt;/li&gt;
	&lt;li&gt;One for the database&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Maybe something you&amp;#8217;ll never do if you just want to run your grandma&amp;#8217;s site on Rails, but certainly something you may want to start looking at if your grandma becomes really popular and your small server gets grounded by several thousands of visitors per day.&lt;/p&gt;
&lt;p&gt;The last part of the section will give you a brief introduction on monitoring your applications and on which tools you should be using, although it does not discuss the subject in detail at all, it&amp;#8217;s just meant to point you to the right direction.&lt;/p&gt;
&lt;h3&gt;Section 6: Extending Mongrel&lt;/h3&gt;
&lt;p&gt;This section digs deeper into the software code internals and describes &lt;em&gt;how to teach new tricks to your Mongrel&lt;/em&gt;, i.e. how to extend its functionality.&lt;/p&gt;
&lt;p&gt;Before you begin, though, don&amp;#8217;t forget what Zed himself has to say about Mongrel&amp;#8217;s simplicity:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;#8220;I&amp;#8217;ve always had a different aesthetic sense when I write my software. I value simplicity and directness and try to write software that follows this approach. I jokingly call it the Shibumi School of Software Structure. All I do is apply this rule: When given two possible designs with equal end results, pick the simpler one. I then ruthlessly strip the solution down to its finest elements, but no more.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Mongrel&amp;#8217;s architecture is not that complex, and this section is sufficient to get you started by providing an overview of the main classes involved (HttpServer, HttpRequest, HttpResponse, HttpHandler, URIClassifier), and how they work together.&lt;br /&gt;
Note that the book won&amp;#8217;t describe anything about the APIs of these classes. but after all, the project&amp;#8217;s &lt;a href="http://mongrel.rubyforge.org/rdoc/files/README.html"&gt;RDoc documentation&lt;/a&gt; should cover all the details you need.&lt;/p&gt;
&lt;p&gt;The rest of the section focuses on how to extend Mongrel, by:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Writing custom handlers in Ruby&lt;/li&gt;
	&lt;li&gt;Creating custom filters to perform security checks, clean up requests and preliminary file processing&lt;/li&gt;
	&lt;li&gt;Creating plugins and distributing them as rubygems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Two working examples are also provided:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;An example handler to deflate content (if the browser supports deflate)&lt;/li&gt;
	&lt;li&gt;An example &amp;#8220;duck&amp;#8221; plugin, to make Mongrel quack like a duck when it&amp;#8217;s started (not the most useful thing in the world, but serves the purpose)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Debugging, Performance &amp;amp; Security&lt;/h3&gt;
&lt;p&gt;The last three sections deals with other important aspects concerning the deployment of your application, how to debug, how to improve performance and how to secure your application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Section 7&lt;/strong&gt; introduces two debugging modes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Dash-Bee logging (-B)&lt;/li&gt;
	&lt;li&gt;USR1 logging (lighter)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And also gives you an idea on what to look for when debugging an application. Nothing too detailed, granted, but enough to make sure you are pointed in the right direction.&lt;/p&gt;
&lt;p&gt;Again, Zed&amp;#8217;s wisdom and wit are remarkable:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;#8220;These people&amp;#8217;s problem is they suffer from Potpourri Turd Syndrome&#8212;a belief that their you-know-what don&amp;#8217;t stink and smells like fine dew on freshly cut grass. Whenever there&amp;#8217;s a bug, they go&lt;br /&gt;
running like kids in a candy store to other people&amp;#8217;s code trying to find fault and just assume that it&amp;#8217;s nothing they wrote.&lt;br /&gt;
[&amp;#8230;]&lt;br /&gt;
When you run into a problem with your application, always assume it&amp;#8217;s your fault first. Mongrel&amp;#8217;s not perfect, but its code is minuscule compared to the size of Rails and most likely even your own appli-cation code. Mongrel also powers many large and medium deployments without any problems. If there&amp;#8217;s an error, the evidence already says it&amp;#8217;s in your code, so bite the bullet and start investigating it as if it&amp;#8217;s your problem.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Similarly, &lt;strong&gt;Section 8&lt;/strong&gt; is a short but useful overview on performance tips and tricks and deployment tuning. The most useful thing is probably the checklist of the &amp;#8220;tuning process&amp;#8221;, which illustrates the simple steps to take to tune your application.&lt;/p&gt;
&lt;p&gt;Finally, &lt;strong&gt;Section 9&lt;/strong&gt; addresses some common security concerns and clarifies how Mongrel deals with them. The answer is normally &amp;#8220;Mongrel strictly does this&amp;#8221; or &amp;#8220;Mongrel doesn&amp;#8217;t support this feature&amp;#8221;. After all, you should have understood by now that Mongrel is an example of simplicity and that it deliberately does not aim to offer all the feature you&amp;#8217;d expect by a server like Apache:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;As you probably see, Mongrel say, &amp;#8220;No&amp;#8221; in many places where most Web servers say, &amp;#8220;Yes, OK.&amp;#8221; Sometimes this is because no one using Mongrel has needed it yet, sometimes it&amp;#8217;s because there&amp;#8217;s a&lt;br /&gt;
better, simpler way to accomplish the same goal. Mongrel is a different kind of Web server, and frequently you can solve your problem with a different solution.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;If Mongrel is opinionated software, this is definitely an opinionated book which fully embraces the project&amp;#8217;s philosopy of simplicity above everything else. It&amp;#8217;s an interesting read and it won&amp;#8217;t bore you to death by deliberately skipping long and potentially tedious subjects and adding interesting insights instead (like the Zed Sez sidebars). Perhaps it is a bit too direct towards certain people, who may get even get offended (as planned) by some of the author&amp;#8217;s assertions.&lt;/p&gt;
&lt;p&gt;Despite being a 100-pages book, this &lt;em&gt;shortcut&lt;/em&gt; covers pretty much everything you need to know &lt;strong&gt;about Mongrel&lt;/strong&gt;. It will &lt;em&gt;not&lt;/em&gt; teach you everything about deployment, security, performance tweaks and debugging though: as the authors often state throughout the book, a lot of (big) books are available on those subject, and it wouldn&amp;#8217;t make sense to even attempt to discuss them in this shortcut.&lt;/p&gt;
&lt;p&gt;Similarly, you won&amp;#8217;t find complex examples either, but that&amp;#8217;s acceptable because simple examples are often the only thing you need to grasp the basics of a concept or feature, and then use them as a &amp;#8220;scaffold&amp;#8221; for your own code.&lt;/p&gt;
&lt;p&gt;Globally, the book is well balanced and &lt;em&gt;optimized&lt;/em&gt; for its size: lightweight introductory sections at first, then the &amp;#8220;real juice&amp;#8221; in the middle, and a few overview sections on advanced topics towards the end. You can read it easily in a few hours, perhaps less, and whenever you need to look something up in a hurry it will be fairly easy to locate.&lt;/p&gt;
&lt;p&gt;A good read, and a &lt;em&gt;must&lt;/em&gt; for everyone who wants to learn more about Mongrel or Rails deployment.&lt;/p&gt;</description>
      <pubDate>Fri, 14 Dec 2007 19:42:00 -0700</pubDate>
      <guid>http://www.h3rald.com/articles/mongrel-shortcut-review/</guid>
      <link>http://www.h3rald.com/articles/mongrel-shortcut-review/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/mongrel-shortcut-review/#comments</comments>
      <category>review</category>
      <category>books</category>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Text Link Ads sidebar for Typo</title>
      <description>&lt;p&gt;I thought it would be nice to share the code of the sidebar I created to display &lt;a href="http://www.text-links-ads.com"&gt;Text Link Ads&lt;/a&gt; sponsor links on my Typo powered blog.&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s actually another &lt;a href="http://blog.nanorails.com/articles/2006/10/01/a-new-rails-plugin-for-textlinkads-including-support-for-feedvertising"&gt;plugin&lt;/a&gt; which was made for Typo 2.6, but unfortunately it doesn&amp;#8217;t work with Typo 4.1.1.&lt;/p&gt;
&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;Just unzip it inside your vendor/plugins directory. The new sidebar should appear in the list of your available sidebars in the Typo&amp;#8217;s administration area.&lt;/p&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;p&gt;In Typo&amp;#8217;s administration area, configure the following settings for this sidebar:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Title&lt;/strong&gt;: The title of the sidebar&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;&lt;span class="caps"&gt;KEY&lt;/span&gt;&lt;/strong&gt;: Your TLA&amp;#8217;s &lt;span class="caps"&gt;XML&lt;/span&gt; key&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Affiliate ID&lt;/strong&gt;: Your TLA&amp;#8217;s affiliate ID&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Advertise Here&lt;/strong&gt;: A message shown when no links are displayed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="/files/textlinkads_sidebar_v0.2.zip"&gt;Download Text Links Ads Sidebar v0.2&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 16 Nov 2007 20:47:00 -0700</pubDate>
      <guid>http://www.h3rald.com/articles/textlinkads_sidebar_v01/</guid>
      <link>http://www.h3rald.com/articles/textlinkads_sidebar_v01/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/textlinkads_sidebar_v01/#comments</comments>
      <category>rails</category>
      <category>opensource</category>
    </item>
    <item>
      <title>To REST or not to REST?</title>
      <description>&lt;p&gt;Lately I&amp;#8217;ve been reading quite a bit about Rails&amp;#8217; &lt;span class="caps"&gt;REST&lt;/span&gt; approach, and to be totally honest I&amp;#8217;m not 100% convinced it can always be a good idea. The purpose of this post is to re-evaluate the situation, and ask other people their opinion on the matter.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s see&amp;#8230;&lt;/p&gt;
&lt;h3&gt;Key Benefits&lt;/h3&gt;
&lt;p&gt;To cut a long story short, from my understanding &lt;span class="caps"&gt;REST&lt;/span&gt; can be a good thing because:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;It introduces the powerful concept of &amp;#8220;resources&amp;#8221;, which is independent from the presentation. This basically means that you can have your &amp;#8220;resources&amp;#8221; represented in &lt;span class="caps"&gt;HTML&lt;/span&gt;. &lt;span class="caps"&gt;XML&lt;/span&gt; etc. etc. &amp;#8220;for free&amp;#8221;. If you are making an extensive use of web services, this is truly a bless.&lt;/li&gt;
	&lt;li&gt;Each &lt;span class="caps"&gt;CRUD&lt;/span&gt; action is carried out using a different &lt;span class="caps"&gt;HTTP&lt;/span&gt; command (get, post, put and delete). At present, because most browsers don&amp;#8217;t understand &lt;span class="caps"&gt;PUT&lt;/span&gt; or &lt;span class="caps"&gt;DELETE&lt;/span&gt; requested, this is somehow simulated by Rails.&lt;/li&gt;
	&lt;li&gt;By thinking and modeling your application in terms of resources, everything should always be &amp;#8220;in the right place&amp;#8221;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Downsides?&lt;/h3&gt;
&lt;p&gt;Let&amp;#8217;s now try to summarize what made me think more carefully this approach&amp;#8230;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;While I really like Rails&amp;#8217; convention over configuration philosophy, this sounds a tiny bit too extreme for me. In the end it could be good, but it requires developers to completely re-think the way they develop their application in order to be 100% RESTful.&lt;/li&gt;
	&lt;li&gt;URLs aren&amp;#8217;t that pretty anymore. While &lt;a href="http://themysteriouswaysofruby.blogspot.com/2007/04/pretty-restful-urls-in-rails.html"&gt;someone&lt;/a&gt; suggested a way to improve the way RESTful URLs look, that sounds like extra hassle to me. It&amp;#8217;s subjective, I know, but I really don&amp;#8217;t like using IDs in the url&amp;#8230; I&amp;#8217;d rather go for an univocal code any day (check out this site&amp;#8230; I don&amp;#8217;t even like dates in my blog).&lt;/li&gt;
	&lt;li&gt;Sometimes, it may take quite a bit to figure out how to model some functionality using resources. While it is straightforward when you want to perform &lt;span class="caps"&gt;CRUD&lt;/span&gt; operations, modeling a search action or authentication may be a bit tricky and may also feel a bit forced. Again, maybe it&amp;#8217;s just me.&lt;/li&gt;
	&lt;li&gt;It may be a bit too early to take full advantage of this approach. &lt;span class="caps"&gt;PUT&lt;/span&gt; and &lt;span class="caps"&gt;DELETE&lt;/span&gt; are simulated, and this doesn&amp;#8217;t sound right &amp;#8212; agreed, that&amp;#8217;s the only way for now, but it still sounds like a forceful workaround. Browsers are not RESTful (yet)!&lt;/li&gt;
	&lt;li&gt;All resources are virtually accessible by a &lt;span class="caps"&gt;URL&lt;/span&gt;. I&amp;#8217;m not a security expert, but this scares me a bit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here are some posts which made me think a bit:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://gilesbowkett.blogspot.com/2007/04/looking-for-good-argument-against-rest.html"&gt;Looking for a good argument against &lt;span class="caps"&gt;REST&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.ipbabble.com/2007/07/restful_myths.html"&gt;RESTful Myths: Unraveling the Confusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://blog.livollmers.net/index.php/2007/06/26/why-cant-web-apps-be-rest-ful/"&gt;Why Can&#8217;t Web Apps Be &lt;span class="caps"&gt;REST&lt;/span&gt;-ful?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The bottom line is: is &lt;span class="caps"&gt;REST&lt;/span&gt; really worth the hassle? Especially for small and simple applications like a blog, is it really worthwhile to coerce myself to adopt a RESTful approach when I could accomplish exactly the same things with much less hassle?&lt;/p&gt;
&lt;p&gt;In other words, is &lt;span class="caps"&gt;REST&lt;/span&gt; really the answer to everything or in &lt;em&gt;some cases&lt;/em&gt; it is just &lt;em&gt;not necessary&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;And also (OK, this may sound harsh and impolite): does it really make sense to push people to adopt a RESTful approach no matter what? Sometimes someone may get the feeling that Rails is all about &lt;span class="caps"&gt;REST&lt;/span&gt; now. Is that true, or is there still room for &lt;del&gt;freedom&lt;/del&gt; other views?&lt;/p&gt;
&lt;p&gt;Looking forward to hear your comments, but please be nice and civilized!&lt;/p&gt;</description>
      <pubDate>Sun, 23 Sep 2007 21:48:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/to-rest-or-not-to-rest/</guid>
      <link>http://www.h3rald.com/articles/to-rest-or-not-to-rest/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/to-rest-or-not-to-rest/#comments</comments>
      <category>rails</category>
    </item>
    <item>
      <title>Simply On Rails - Part 4: Quick and Easy Default Data Migrations</title>
      <description>&lt;p&gt;In the &lt;a href="http://www.h3rald.com/blog/simply-on-rails-3-shared-controller"&gt;last post&lt;/a&gt; of this series I tried to find a &lt;acronym title="Don&amp;#39;t Repeat Yourself"&gt;&lt;span class="caps"&gt;DRY&lt;/span&gt;&lt;/acronym&gt; solution to deal with tables storing &amp;#8220;ancillary&amp;#8221; data, i.e. names of user roles, predefined categories, page state names and other similar things.&lt;br /&gt;
I personally chose to put this kind of data to make my application more dynamic, although I could have decided to use ENUMs or simply ordinary varchar fields &amp;#8212; that would have been easier, but less flexible. For now, I&amp;#8217;m sticking with my original choice.&lt;/p&gt;
&lt;p&gt;The data in these tables is kind of a prerequisite for the application to run: I must be able to have a status to assign to a user when creating it, and the same applies to roles. Sure, I could spend 20 minutes populating these tables manually, but it would be nice if there was a less tedious way, wouldn&amp;#8217;t it?&lt;/p&gt;
&lt;p&gt;There is indeed. The inspiration came from a technique described in the book (which I highly recommend) &lt;em&gt;Agile Web Development With Rails&lt;/em&gt;, in which the author outlines how it would be possible to use Rails&amp;#8217; fixtures and migrations to load data in the database automatically from &lt;span class="caps"&gt;YAML&lt;/span&gt; files. &lt;br /&gt;
All you have to do is create a migration to load the specified &lt;span class="caps"&gt;YAML&lt;/span&gt; files and you&amp;#8217;re all set.&lt;/p&gt;
&lt;p&gt;I wanted to take a little step further, allowing the migration to load data from &lt;em&gt;all &lt;span class="caps"&gt;YAML&lt;/span&gt; files in a specific directory&lt;/em&gt;, automatically.Let&amp;#8217;s start creating the &lt;span class="caps"&gt;YAML&lt;/span&gt; files then and place them all in one directory of the application like &lt;code&gt;/db/migrate/defaults&lt;/code&gt;. Here&amp;#8217;s the one I used for user roles, for example:&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="key"&gt;visitor&lt;/span&gt;:
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;id&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;1&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;name&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;Visitor&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;level&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;0&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;&lt;span class="key"&gt;user&lt;/span&gt;:
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;id&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;2&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;name&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;User&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;level&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;10&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n10" name="n10"&gt;10&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n11" name="n11"&gt;11&lt;/a&gt;&lt;/span&gt;&lt;span class="key"&gt;contributor&lt;/span&gt;:
&lt;span class="line-numbers"&gt;&lt;a href="#n12" name="n12"&gt;12&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;id&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;3&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n13" name="n13"&gt;13&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;name&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;Contributor&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n14" name="n14"&gt;14&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;level&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;20&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n15" name="n15"&gt;15&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n16" name="n16"&gt;16&lt;/a&gt;&lt;/span&gt;&lt;span class="key"&gt;provider&lt;/span&gt;:
&lt;span class="line-numbers"&gt;&lt;a href="#n17" name="n17"&gt;17&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;id&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;4&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n18" name="n18"&gt;18&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;name&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;Provider&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n19" name="n19"&gt;19&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;level&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;50&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n20" name="n20"&gt;20&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n21" name="n21"&gt;21&lt;/a&gt;&lt;/span&gt;&lt;span class="key"&gt;operator&lt;/span&gt;:
&lt;span class="line-numbers"&gt;&lt;a href="#n22" name="n22"&gt;22&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;id&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;5&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n23" name="n23"&gt;23&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;name&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;Operator&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n24" name="n24"&gt;24&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;level&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;100&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n25" name="n25"&gt;25&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n26" name="n26"&gt;26&lt;/a&gt;&lt;/span&gt;&lt;span class="key"&gt;administrator&lt;/span&gt;:
&lt;span class="line-numbers"&gt;&lt;a href="#n27" name="n27"&gt;27&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;id&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;6&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n28" name="n28"&gt;28&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;name&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;Administrator&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n29" name="n29"&gt;29&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;level&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;500&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n30" name="n30"&gt;30&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n31" name="n31"&gt;31&lt;/a&gt;&lt;/span&gt;&lt;span class="key"&gt;webmaster&lt;/span&gt;:
&lt;span class="line-numbers"&gt;&lt;a href="#n32" name="n32"&gt;32&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;id&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;7&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n33" name="n33"&gt;33&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;name&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;Webmaster&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n34" name="n34"&gt;34&lt;/a&gt;&lt;/span&gt;&lt;span class="error"&gt;  &lt;/span&gt;&lt;span class="key"&gt;level&lt;/span&gt;: &lt;span class="string"&gt;&lt;span class="content"&gt;1000&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The important thing to remember is to provide a unique string to identify each record, before specifying each fiels. The other files look similar, so I won&amp;#8217;t bother listing them here.&lt;/p&gt;
&lt;p&gt;And here&amp;#8217;s the simple code for the migration:&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;require &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;active_record/fixtures&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class="class"&gt;LoadDefaults&lt;/span&gt; &amp;lt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;::&lt;span class="constant"&gt;Migration&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="predefined-constant"&gt;self&lt;/span&gt;.&lt;span class="function"&gt;up&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;    down
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;    models = &lt;span class="predefined-constant"&gt;self&lt;/span&gt;.default_models
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;    models.each &lt;span class="keyword"&gt;do&lt;/span&gt; |m|   
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;      &lt;span class="constant"&gt;Fixtures&lt;/span&gt;.create_fixtures(&lt;span class="predefined-constant"&gt;self&lt;/span&gt;.default_directory, m)
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n10" name="n10"&gt;10&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n11" name="n11"&gt;11&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n12" name="n12"&gt;12&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n13" name="n13"&gt;13&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="predefined-constant"&gt;self&lt;/span&gt;.&lt;span class="function"&gt;down&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n14" name="n14"&gt;14&lt;/a&gt;&lt;/span&gt;    models = &lt;span class="predefined-constant"&gt;self&lt;/span&gt;.default_models
&lt;span class="line-numbers"&gt;&lt;a href="#n15" name="n15"&gt;15&lt;/a&gt;&lt;/span&gt;    models.each &lt;span class="keyword"&gt;do&lt;/span&gt; |m|
&lt;span class="line-numbers"&gt;&lt;a href="#n16" name="n16"&gt;16&lt;/a&gt;&lt;/span&gt;      eval(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="inline"&gt;&lt;span class="inline-delimiter"&gt;#{&lt;/span&gt;m.singularize.capitalize&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="content"&gt;.delete_all&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)
&lt;span class="line-numbers"&gt;&lt;a href="#n17" name="n17"&gt;17&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n18" name="n18"&gt;18&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n19" name="n19"&gt;19&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n20" name="n20"&gt;20&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="predefined-constant"&gt;self&lt;/span&gt;.&lt;span class="function"&gt;default_directory&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n21" name="n21"&gt;21&lt;/a&gt;&lt;/span&gt;    &lt;span class="constant"&gt;File&lt;/span&gt;.join(&lt;span class="constant"&gt;File&lt;/span&gt;.dirname(&lt;span class="predefined-constant"&gt;__FILE__&lt;/span&gt;), &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="content"&gt;defaults&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; )
&lt;span class="line-numbers"&gt;&lt;a href="#n22" name="n22"&gt;22&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n23" name="n23"&gt;23&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n24" name="n24"&gt;24&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="predefined-constant"&gt;self&lt;/span&gt;.&lt;span class="function"&gt;default_models&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n25" name="n25"&gt;25&lt;/a&gt;&lt;/span&gt;    files, names = &lt;span class="constant"&gt;Dir&lt;/span&gt;.glob(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="inline"&gt;&lt;span class="inline-delimiter"&gt;#{&lt;/span&gt;&lt;span class="predefined-constant"&gt;self&lt;/span&gt;.default_directory&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="content"&gt;/*.yml&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;), []
&lt;span class="line-numbers"&gt;&lt;a href="#n26" name="n26"&gt;26&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;unless&lt;/span&gt; files.blank?
&lt;span class="line-numbers"&gt;&lt;a href="#n27" name="n27"&gt;27&lt;/a&gt;&lt;/span&gt;      files.each { |f| names &amp;lt;&amp;lt; &lt;span class="constant"&gt;File&lt;/span&gt;.basename(f, &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;.yml&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;) }
&lt;span class="line-numbers"&gt;&lt;a href="#n28" name="n28"&gt;28&lt;/a&gt;&lt;/span&gt;      names
&lt;span class="line-numbers"&gt;&lt;a href="#n29" name="n29"&gt;29&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n30" name="n30"&gt;30&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;      []
&lt;span class="line-numbers"&gt;&lt;a href="#n31" name="n31"&gt;31&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n32" name="n32"&gt;32&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n33" name="n33"&gt;33&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n34" name="n34"&gt;34&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Basically the migration will look in a directory named &amp;#8220;defaults&amp;#8221; for some &lt;span class="caps"&gt;YAML&lt;/span&gt; files named after a particular database table, and it will attempt to load all the records defined in each one of them. &lt;br /&gt;
The &lt;code&gt;down&lt;/code&gt; method of the migration &lt;em&gt;deletes all the data in the specified tables&lt;/em&gt;, so use with care&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Sat, 15 Sep 2007 05:10:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/simply-on-rails-4-default-data-migrations/</guid>
      <link>http://www.h3rald.com/articles/simply-on-rails-4-default-data-migrations/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/simply-on-rails-4-default-data-migrations/#comments</comments>
      <category>rails</category>
      <category>ruby</category>
      <category>databases</category>
    </item>
    <item>
      <title>Simply on Rails - Part 3: LiteController</title>
      <description>&lt;p&gt;Enough with concepts, ideas and diagrams: it&amp;#8217;s time to start coding something. Everyone knows what&amp;#8217;s the first step when creating a Rails applications, but anyhow, here it is:&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt;&lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;rails italysimply
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Then I create a new development database, load it up with the schema I &lt;a href="/blog/simply-on-rails-2-database-design"&gt;previously&lt;/a&gt; prepared and modify the &lt;code&gt;config/database.yml&lt;/code&gt; to be able to connect to it. Nothing new here.&lt;br /&gt;
I actually had to modify the schema a little bit:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;I changed all the names for the foreign keys to something more evocative than &amp;#8220;has_many&amp;#8221; or &amp;#8220;has_one&amp;#8221;&lt;/li&gt;
	&lt;li&gt;I added a &lt;em&gt;level&lt;/em&gt; column to the &lt;em&gt;states&lt;/em&gt;, &lt;em&gt;availabilities&lt;/em&gt; and &lt;em&gt;conditions&lt;/em&gt; table&lt;/li&gt;
	&lt;li&gt;I removed the &lt;em&gt;description&lt;/em&gt; column from the categories table&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Great, but&amp;#8230; hang on: now some of the database tables look awfully similar with each other:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;statuses&lt;/li&gt;
	&lt;li&gt;states&lt;/li&gt;
	&lt;li&gt;roles&lt;/li&gt;
	&lt;li&gt;types&lt;/li&gt;
	&lt;li&gt;tags&lt;/li&gt;
	&lt;li&gt;conditions&lt;/li&gt;
	&lt;li&gt;availabilities&lt;/li&gt;
	&lt;li&gt;categories&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They all have a name column, some of them have a name column as well, they&amp;#8217;ll hold only a relative small number of records which will hardly ever be deleted. In fact, I was tempted to use Enums for some of those things&amp;#8230;&lt;br /&gt;
Anyhow, I&amp;#8217;ll still have to add and modify data in those tables, so it looks like I kinda need to create 8 controllers, 8 models and about four views for each one of them. No way. Fair enough for the controllers and models, but I&amp;#8217;m not going to create 32 views which all look exactly the same. Rails should be smarter than that!And it is, luckily. Derek Sivers &amp;amp; C. came out with an interesting &lt;a href="http://dereksivers.com/rails-shared-controller.html"&gt;Shared Controller&lt;/a&gt; concept, which could be just what I&amp;#8217;m looking for in this case. Actually I need something really simple in this case:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Put all the &lt;span class="caps"&gt;CRUD&lt;/span&gt; logic into one controller&lt;/li&gt;
	&lt;li&gt;Create only one set of views&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&amp;#8217;s the controller:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:red;"&gt;&lt;strong&gt;app/controllers/admin/lite_controller.rb&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class="class"&gt;Admin::LiteController&lt;/span&gt; &amp;lt; &lt;span class="constant"&gt;ApplicationController&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;  layout &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;admin&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;  before_filter &lt;span class="symbol"&gt;:prepare&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;  
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;prepare&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;@item_name&lt;/span&gt; = model.to_s
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n10" name="n10"&gt;10&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;  
&lt;span class="line-numbers"&gt;&lt;a href="#n11" name="n11"&gt;11&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;index&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n12" name="n12"&gt;12&lt;/a&gt;&lt;/span&gt;    list
&lt;span class="line-numbers"&gt;&lt;a href="#n13" name="n13"&gt;13&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n14" name="n14"&gt;14&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n15" name="n15"&gt;15&lt;/a&gt;&lt;/span&gt;  verify &lt;span class="symbol"&gt;:method&lt;/span&gt; =&amp;gt; &lt;span class="symbol"&gt;:post&lt;/span&gt;, &lt;span class="symbol"&gt;:only&lt;/span&gt; =&amp;gt; [ &lt;span class="symbol"&gt;:destroy&lt;/span&gt;, &lt;span class="symbol"&gt;:create&lt;/span&gt;, &lt;span class="symbol"&gt;:update&lt;/span&gt; ],
&lt;span class="line-numbers"&gt;&lt;a href="#n16" name="n16"&gt;16&lt;/a&gt;&lt;/span&gt;         &lt;span class="symbol"&gt;:redirect_to&lt;/span&gt; =&amp;gt; { &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="symbol"&gt;:list&lt;/span&gt; }
&lt;span class="line-numbers"&gt;&lt;a href="#n17" name="n17"&gt;17&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n18" name="n18"&gt;18&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;list&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n19" name="n19"&gt;19&lt;/a&gt;&lt;/span&gt;    ordering = model.column_names.include?(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;level&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;) ? &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;level ASC&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt; : &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;name ASC&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n20" name="n20"&gt;20&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;@items&lt;/span&gt; = model.find(&lt;span class="symbol"&gt;:all&lt;/span&gt;, &lt;span class="symbol"&gt;:order&lt;/span&gt; =&amp;gt; ordering)  
&lt;span class="line-numbers"&gt;&lt;a href="#n21" name="n21"&gt;21&lt;/a&gt;&lt;/span&gt;    render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;lite/list&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;)
&lt;span class="line-numbers"&gt;&lt;a href="#n22" name="n22"&gt;22&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n23" name="n23"&gt;23&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n24" name="n24"&gt;24&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;show&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n25" name="n25"&gt;25&lt;/a&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;@item&lt;/span&gt; = model.find(params[&lt;span class="symbol"&gt;:id&lt;/span&gt;])
&lt;span class="line-numbers"&gt;&lt;a href="#n26" name="n26"&gt;26&lt;/a&gt;&lt;/span&gt;    render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;lite/show&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;)
&lt;span class="line-numbers"&gt;&lt;a href="#n27" name="n27"&gt;27&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n28" name="n28"&gt;28&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n29" name="n29"&gt;29&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;new&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n30" name="n30"&gt;30&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;@item&lt;/span&gt; = model.new
&lt;span class="line-numbers"&gt;&lt;a href="#n31" name="n31"&gt;31&lt;/a&gt;&lt;/span&gt;    render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;lite/new&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;)
&lt;span class="line-numbers"&gt;&lt;a href="#n32" name="n32"&gt;32&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n33" name="n33"&gt;33&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n34" name="n34"&gt;34&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;create&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n35" name="n35"&gt;35&lt;/a&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;@item&lt;/span&gt; = model.new(params[&lt;span class="symbol"&gt;&lt;span class="symbol"&gt;:&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="inline"&gt;&lt;span class="inline-delimiter"&gt;#{&lt;/span&gt;&lt;span class="instance-variable"&gt;@item_name&lt;/span&gt;.downcase&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])
&lt;span class="line-numbers"&gt;&lt;a href="#n36" name="n36"&gt;36&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="instance-variable"&gt;@item&lt;/span&gt;.save
&lt;span class="line-numbers"&gt;&lt;a href="#n37" name="n37"&gt;37&lt;/a&gt;&lt;/span&gt;      flash[&lt;span class="symbol"&gt;:notice&lt;/span&gt;] = &lt;span class="instance-variable"&gt;@item_name&lt;/span&gt;+&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt; was successfully created.&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n38" name="n38"&gt;38&lt;/a&gt;&lt;/span&gt;      redirect_to &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;list&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n39" name="n39"&gt;39&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n40" name="n40"&gt;40&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;      render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;lite/new&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;)
&lt;span class="line-numbers"&gt;&lt;a href="#n41" name="n41"&gt;41&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n42" name="n42"&gt;42&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n43" name="n43"&gt;43&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n44" name="n44"&gt;44&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;edit&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n45" name="n45"&gt;45&lt;/a&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;@item&lt;/span&gt; = model.find(params[&lt;span class="symbol"&gt;:id&lt;/span&gt;])
&lt;span class="line-numbers"&gt;&lt;a href="#n46" name="n46"&gt;46&lt;/a&gt;&lt;/span&gt;    render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;lite/edit&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;)
&lt;span class="line-numbers"&gt;&lt;a href="#n47" name="n47"&gt;47&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n48" name="n48"&gt;48&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n49" name="n49"&gt;49&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;update&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n50" name="n50"&gt;50&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;     &lt;span class="instance-variable"&gt;@item&lt;/span&gt; = model.find(params[&lt;span class="symbol"&gt;:id&lt;/span&gt;])
&lt;span class="line-numbers"&gt;&lt;a href="#n51" name="n51"&gt;51&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="instance-variable"&gt;@item&lt;/span&gt;.update_attributes(params[&lt;span class="symbol"&gt;&lt;span class="symbol"&gt;:&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="inline"&gt;&lt;span class="inline-delimiter"&gt;#{&lt;/span&gt;&lt;span class="instance-variable"&gt;@item_name&lt;/span&gt;.downcase&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])
&lt;span class="line-numbers"&gt;&lt;a href="#n52" name="n52"&gt;52&lt;/a&gt;&lt;/span&gt;      flash[&lt;span class="symbol"&gt;:notice&lt;/span&gt;] = &lt;span class="instance-variable"&gt;@item_name&lt;/span&gt;+&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt; was successfully updated.&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n53" name="n53"&gt;53&lt;/a&gt;&lt;/span&gt;      redirect_to &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;list&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n54" name="n54"&gt;54&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n55" name="n55"&gt;55&lt;/a&gt;&lt;/span&gt;      render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;lite/edit&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;)
&lt;span class="line-numbers"&gt;&lt;a href="#n56" name="n56"&gt;56&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n57" name="n57"&gt;57&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n58" name="n58"&gt;58&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;&lt;br /&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class="class"&gt;Admin::LiteController&lt;/span&gt; &amp;lt; &lt;span class="constant"&gt;ApplicationController&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;  layout &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;admin&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;  before_filter &lt;span class="symbol"&gt;:prepare&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;  &lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;prepare&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;&lt;code&gt;item_name&amp;lt;/span&amp;gt; = model.to_s
&amp;lt;span class="line-numbers"&amp;gt; &amp;lt;a href="#n9" name="n9"&amp;gt;9&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  &amp;lt;span class="keyword"&amp;gt;end&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;a href="#n10" name="n10"&amp;gt;10&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;  
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n11" name="n11"&amp;gt;11&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  &amp;lt;span class="keyword"&amp;gt;def&amp;lt;/span&amp;gt; &amp;lt;span class="function"&amp;gt;index&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n12" name="n12"&amp;gt;12&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;    list
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n13" name="n13"&amp;gt;13&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  &amp;lt;span class="keyword"&amp;gt;end&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n14" name="n14"&amp;gt;14&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n15" name="n15"&amp;gt;15&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  verify &amp;lt;span class="symbol"&amp;gt;:method&amp;lt;/span&amp;gt; =&amp;amp;gt; &amp;lt;span class="symbol"&amp;gt;:post&amp;lt;/span&amp;gt;, &amp;lt;span class="symbol"&amp;gt;:only&amp;lt;/span&amp;gt; =&amp;amp;gt; [ &amp;lt;span class="symbol"&amp;gt;:destroy&amp;lt;/span&amp;gt;, &amp;lt;span class="symbol"&amp;gt;:create&amp;lt;/span&amp;gt;, &amp;lt;span class="symbol"&amp;gt;:update&amp;lt;/span&amp;gt; ],
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n16" name="n16"&amp;gt;16&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;         &amp;lt;span class="symbol"&amp;gt;:redirect_to&amp;lt;/span&amp;gt; =&amp;amp;gt; { &amp;lt;span class="symbol"&amp;gt;:action&amp;lt;/span&amp;gt; =&amp;amp;gt; &amp;lt;span class="symbol"&amp;gt;:list&amp;lt;/span&amp;gt; }
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n17" name="n17"&amp;gt;17&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n18" name="n18"&amp;gt;18&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  &amp;lt;span class="keyword"&amp;gt;def&amp;lt;/span&amp;gt; &amp;lt;span class="function"&amp;gt;list&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n19" name="n19"&amp;gt;19&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;    ordering = model.column_names.include?(&amp;lt;span class="string"&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;span class="content"&amp;gt;level&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;) ? &amp;lt;span class="string"&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;span class="content"&amp;gt;level ASC&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; : &amp;lt;span class="string"&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;span class="content"&amp;gt;name ASC&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;a href="#n20" name="n20"&amp;gt;20&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;    &amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;items&lt;/span&gt; = model.find(&lt;span class="symbol"&gt;:all&lt;/span&gt;, &lt;span class="symbol"&gt;:order&lt;/span&gt; =&amp;gt; ordering)  &lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n21" name="n21"&gt;21&lt;/a&gt;&lt;/span&gt;    render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;lite/list&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;)&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n22" name="n22"&gt;22&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n23" name="n23"&gt;23&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n24" name="n24"&gt;24&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;show&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n25" name="n25"&gt;25&lt;/a&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;&lt;code&gt;item&amp;lt;/span&amp;gt; = model.find(params[&amp;lt;span class="symbol"&amp;gt;:id&amp;lt;/span&amp;gt;])
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n26" name="n26"&amp;gt;26&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;    render(&amp;lt;span class="string"&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;span class="content"&amp;gt;lite/show&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;)
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n27" name="n27"&amp;gt;27&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  &amp;lt;span class="keyword"&amp;gt;end&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n28" name="n28"&amp;gt;28&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n29" name="n29"&amp;gt;29&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  &amp;lt;span class="keyword"&amp;gt;def&amp;lt;/span&amp;gt; &amp;lt;span class="function"&amp;gt;new&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;a href="#n30" name="n30"&amp;gt;30&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;    &amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item&lt;/span&gt; = model.new&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n31" name="n31"&gt;31&lt;/a&gt;&lt;/span&gt;    render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;lite/new&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;)&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n32" name="n32"&gt;32&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n33" name="n33"&gt;33&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n34" name="n34"&gt;34&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;create&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n35" name="n35"&gt;35&lt;/a&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;&lt;code&gt;item&amp;lt;/span&amp;gt; = model.new(params[&amp;lt;span class="symbol"&amp;gt;&amp;lt;span class="symbol"&amp;gt;:&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;&amp;amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class="inline"&amp;gt;&amp;lt;span class="inline-delimiter"&amp;gt;#{&amp;lt;/span&amp;gt;&amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item_name&lt;/span&gt;.downcase&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n36" name="n36"&gt;36&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="instance-variable"&gt;&lt;code&gt;item&amp;lt;/span&amp;gt;.save
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n37" name="n37"&amp;gt;37&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;      flash[&amp;lt;span class="symbol"&amp;gt;:notice&amp;lt;/span&amp;gt;] = &amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item_name&lt;/span&gt;&lt;ins&gt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt; was successfully created.&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n38" name="n38"&gt;38&lt;/a&gt;&lt;/span&gt;      redirect_to &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;list&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n39" name="n39"&gt;39&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n40" name="n40"&gt;40&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;      render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;lite/new&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;)&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n41" name="n41"&gt;41&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n42" name="n42"&gt;42&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n43" name="n43"&gt;43&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n44" name="n44"&gt;44&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;edit&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n45" name="n45"&gt;45&lt;/a&gt;&lt;/span&gt;    &lt;span class="instance-variable"&gt;&lt;code&gt;item&amp;lt;/span&amp;gt; = model.find(params[&amp;lt;span class="symbol"&amp;gt;:id&amp;lt;/span&amp;gt;])
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n46" name="n46"&amp;gt;46&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;    render(&amp;lt;span class="string"&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;span class="content"&amp;gt;lite/edit&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;)
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n47" name="n47"&amp;gt;47&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  &amp;lt;span class="keyword"&amp;gt;end&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n48" name="n48"&amp;gt;48&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;a href="#n49" name="n49"&amp;gt;49&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  &amp;lt;span class="keyword"&amp;gt;def&amp;lt;/span&amp;gt; &amp;lt;span class="function"&amp;gt;update&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;a href="#n50" name="n50"&amp;gt;50&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;     &amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item&lt;/span&gt; = model.find(params[&lt;span class="symbol"&gt;:id&lt;/span&gt;])&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n51" name="n51"&gt;51&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="instance-variable"&gt;&lt;code&gt;item&amp;lt;/span&amp;gt;.update_attributes(params[&amp;lt;span class="symbol"&amp;gt;&amp;lt;span class="symbol"&amp;gt;:&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;&amp;amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class="inline"&amp;gt;&amp;lt;span class="inline-delimiter"&amp;gt;#{&amp;lt;/span&amp;gt;&amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item_name&lt;/span&gt;.downcase&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n52" name="n52"&gt;52&lt;/a&gt;&lt;/span&gt;      flash[&lt;span class="symbol"&gt;:notice&lt;/span&gt;] = &lt;span class="instance-variable"&gt;@item_name&lt;/span&gt;&lt;/ins&gt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt; was successfully updated.&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n53" name="n53"&gt;53&lt;/a&gt;&lt;/span&gt;      redirect_to &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;list&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n54" name="n54"&gt;54&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n55" name="n55"&gt;55&lt;/a&gt;&lt;/span&gt;      render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;lite/edit&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;)&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n56" name="n56"&gt;56&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n57" name="n57"&gt;57&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n58" name="n58"&gt;58&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/notextile&gt;&lt;/p&gt;
&lt;p&gt;Then all I need to do is create eight controllers with just a few lines of code in each:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:red;"&gt;&lt;strong&gt;app/controllers/admin/statuses_controller.rb&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt;&lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class="class"&gt;Admin::StatusesController&lt;/span&gt; &amp;lt; &lt;span class="constant"&gt;Admin&lt;/span&gt;::&lt;span class="constant"&gt;LiteController&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;model&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;    &lt;span class="constant"&gt;Status&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;&lt;br /&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt;&lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class="class"&gt;Admin::StatusesController&lt;/span&gt; &amp;lt; &lt;span class="constant"&gt;Admin&lt;/span&gt;::&lt;span class="constant"&gt;LiteController&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;model&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;    &lt;span class="constant"&gt;Status&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/notextile&gt;&lt;/p&gt;
&lt;p&gt;Basically, I just need to specify which model the specific controller takes care of, Ruby&amp;#8217;s inheritance does the rest. The model name will be passed to the views like this:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:red;"&gt;&lt;strong&gt;app/controllers/admin/lite_controller.rb&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt;&lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;prepare&lt;/span&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;  &lt;span class="instance-variable"&gt;@item_name&lt;/span&gt; = model.to_s
&lt;span class="line-numbers"&gt;&lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;&lt;br /&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt;&lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;prepare&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;  &lt;span class="instance-variable"&gt;@item_name&lt;/span&gt; = model.to_s&lt;br /&gt;
&lt;span class="line-numbers"&gt;&lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/notextile&gt;&lt;/p&gt;
&lt;p&gt;And each method uses the &lt;code&gt;model&lt;/code&gt; method to access the model, like this:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:red;"&gt;&lt;strong&gt;app/controllers/admin/lite_controller.rb&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;create&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;  &lt;span class="instance-variable"&gt;@item&lt;/span&gt; = model.new(params[&lt;span class="symbol"&gt;&lt;span class="symbol"&gt;:&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="inline"&gt;&lt;span class="inline-delimiter"&gt;#{&lt;/span&gt;&lt;span class="instance-variable"&gt;@item_name&lt;/span&gt;.downcase&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="instance-variable"&gt;@item&lt;/span&gt;.save
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;    flash[&lt;span class="symbol"&gt;:notice&lt;/span&gt;] = &lt;span class="instance-variable"&gt;@item_name&lt;/span&gt;+&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt; was successfully created.&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;    redirect_to &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;list&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;    render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;lite/new&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;)
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;&lt;br /&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class="function"&gt;create&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;  &lt;span class="instance-variable"&gt;&lt;code&gt;item&amp;lt;/span&amp;gt; = model.new(params[&amp;lt;span class="symbol"&amp;gt;&amp;lt;span class="symbol"&amp;gt;:&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;&amp;amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class="inline"&amp;gt;&amp;lt;span class="inline-delimiter"&amp;gt;#{&amp;lt;/span&amp;gt;&amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item_name&lt;/span&gt;.downcase&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="instance-variable"&gt;&lt;code&gt;item&amp;lt;/span&amp;gt;.save
&amp;lt;span class="line-numbers"&amp;gt; &amp;lt;a href="#n4" name="n4"&amp;gt;4&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;    flash[&amp;lt;span class="symbol"&amp;gt;:notice&amp;lt;/span&amp;gt;] = &amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item_name&lt;/span&gt;+&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt; was successfully created.&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;    redirect_to &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;list&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;    render(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;lite/new&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;)&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/notextile&gt;&lt;/p&gt;
&lt;p&gt;Note how the params are collected:&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt;&lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="instance-variable"&gt;@item&lt;/span&gt; = model.new(params[&lt;span class="symbol"&gt;&lt;span class="symbol"&gt;:&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="inline"&gt;&lt;span class="inline-delimiter"&gt;#{&lt;/span&gt;&lt;span class="instance-variable"&gt;@item_name&lt;/span&gt;.downcase&lt;span class="inline-delimiter"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;code&gt;params[:"#{&lt;/code&gt;item_name.downcase}&amp;quot;]@ at runtime becomes &lt;code&gt;params[:status]&lt;/code&gt; or &lt;code&gt;params[:role]&lt;/code&gt; etc. etc., depending on which controller is called. Sweet.&lt;/p&gt;
&lt;p&gt;The views? Modified accordingly:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:red;"&gt;&lt;strong&gt;app/views/lite/edit.rb&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&amp;lt;h1&amp;gt;&lt;span class="constant"&gt;Editing&lt;/span&gt; &amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;%=&lt;/span&gt;&lt;span class="content"&gt; @item_name %&amp;gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;% form_tag :action &lt;/span&gt;&lt;span class="delimiter"&gt;=&lt;/span&gt;&lt;/span&gt;&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;update&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="symbol"&gt;:id&lt;/span&gt; =&amp;gt; &lt;span class="instance-variable"&gt;@item&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="content"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;  &amp;lt;%= render :partial =&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;lite/form&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt; %&amp;gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;  &amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;%=&lt;/span&gt;&lt;span class="content"&gt; submit_tag 'Edit' %&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;% end %&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;%&lt;/span&gt;&lt;span class="delimiter"&gt;=&lt;/span&gt;&lt;/span&gt; link_to &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;Show&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;show&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="symbol"&gt;:id&lt;/span&gt; =&amp;gt; &lt;span class="instance-variable"&gt;@item&lt;/span&gt; %&amp;gt; |
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;&amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;%=&lt;/span&gt;&lt;span class="content"&gt; link_to 'Back', :action &lt;/span&gt;&lt;span class="delimiter"&gt;=&lt;/span&gt;&lt;/span&gt;&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;list&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt; %&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;&lt;br /&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&amp;lt;h1&amp;gt;&lt;span class="constant"&gt;Editing&lt;/span&gt; &amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;%=&lt;/span&gt;&lt;span class="content"&gt; &lt;code&gt;item_name %&amp;amp;gt;&amp;amp;lt;/h1&amp;amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt; &amp;lt;a href="#n2" name="n2"&amp;gt;2&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class="string"&amp;gt;&amp;lt;span class="content"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt; &amp;lt;a href="#n3" name="n3"&amp;gt;3&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class="string"&amp;gt;&amp;lt;span class="content"&amp;gt;&amp;amp;lt;% form_tag :action &amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;amp;gt; &amp;lt;span class="string"&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;span class="content"&amp;gt;update&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;'&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;, &amp;lt;span class="symbol"&amp;gt;:id&amp;lt;/span&amp;gt; =&amp;amp;gt; &amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="content"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;  &amp;lt;%= render :partial =&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;lite/form&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt; &lt;span&gt;&amp;gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;  &amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&lt;/span&gt;=&lt;/span&gt;&lt;span class="content"&gt; submit_tag &amp;#8216;Edit&amp;#8217; &lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;&lt;/span&gt; end &lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="delimiter"&gt;=&lt;/span&gt;&lt;/span&gt; link_to &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;Show&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;, &lt;span class="symbol"&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;show&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;, &lt;span class="symbol"&gt;:id&lt;/span&gt; =&amp;gt; &lt;span class="instance-variable"&gt;@item&lt;/span&gt; &lt;span&gt;&amp;gt; |&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;&amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&lt;/span&gt;=&lt;/span&gt;&lt;span class="content"&gt; link_to &amp;#8216;Back&amp;#8217;, :action &lt;/span&gt;&lt;span class="delimiter"&gt;=&lt;/span&gt;&lt;/span&gt;&amp;gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;list&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt; %&amp;gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/notextile&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:red;"&gt;&lt;strong&gt;app/views/lite/_form.rb&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;%=&lt;/span&gt;&lt;span class="content"&gt; error_messages_for 'item' %&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;!--[form:lite]--&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;p&amp;gt;&amp;lt;label for&lt;/span&gt;&lt;span class="delimiter"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="content"&gt;&amp;lt;%= @item_name.downcase %&amp;gt;_name&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&amp;gt;&lt;span class="constant"&gt;Name&lt;/span&gt;: &amp;lt;&lt;span class="regexp"&gt;&lt;span class="delimiter"&gt;/&lt;/span&gt;&lt;span class="content"&gt;label&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;&lt;span class="regexp"&gt;&lt;span class="content"&gt;&amp;lt;%= text_field @item_name.downcase, 'name',  {:value =&amp;gt; @item.name} %&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="delimiter"&gt;/&lt;/span&gt;&lt;/span&gt;p&amp;gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;&amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;% &lt;/span&gt;&lt;span class="content"&gt;if&lt;/span&gt;&lt;span class="delimiter"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="instance-variable"&gt;@item&lt;/span&gt;.methods.include?(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;level&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;) &lt;span class="keyword"&gt;then&lt;/span&gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="content"&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;  &amp;lt;p&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&amp;lt;label &lt;span class="keyword"&gt;for&lt;/span&gt;=&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="content"&gt;&amp;lt;%= @item_name.downcase %&amp;gt;_level&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&amp;gt;&lt;span class="constant"&gt;Level&lt;/span&gt;: &amp;lt;&lt;span class="regexp"&gt;&lt;span class="delimiter"&gt;/&lt;/span&gt;&lt;span class="content"&gt;label&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;&lt;span class="regexp"&gt;&lt;span class="content"&gt;  &amp;lt;%= text_field @item_name.downcase, 'level',  {:value =&amp;gt; @item.level} %&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="delimiter"&gt;/&lt;/span&gt;&lt;/span&gt;p&amp;gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;&amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;% &lt;/span&gt;&lt;span class="content"&gt;end&lt;/span&gt;&lt;span class="delimiter"&gt; &lt;/span&gt;&lt;/span&gt;%&amp;gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;&amp;lt;!--[eoform&lt;span class="symbol"&gt;:lite&lt;/span&gt;]--&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="CodeRay"&gt;&lt;br /&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;%=&lt;/span&gt;&lt;span class="content"&gt; error_messages_for &amp;#8216;item&amp;#8217; &lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;!&amp;#8212;[form:lite]&amp;#8212;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;&amp;lt;p&amp;gt;&amp;lt;label for&lt;/span&gt;&lt;span class="delimiter"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="content"&gt;&amp;lt;&lt;/span&gt;= &lt;code&gt;item_name.downcase %&amp;amp;gt;_name&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;&amp;amp;quot;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;amp;gt;&amp;lt;span class="constant"&amp;gt;Name&amp;lt;/span&amp;gt;: &amp;amp;lt;&amp;lt;span class="regexp"&amp;gt;&amp;lt;span class="delimiter"&amp;gt;/&amp;lt;/span&amp;gt;&amp;lt;span class="content"&amp;gt;label&amp;amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class="line-numbers"&amp;gt; &amp;lt;a href="#n4" name="n4"&amp;gt;4&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class="regexp"&amp;gt;&amp;lt;span class="content"&amp;gt;&amp;amp;lt;%= text_field @item_name.downcase, 'name',  {:value =&amp;amp;gt; @item.name} %&amp;amp;gt;&amp;amp;lt;&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt;/&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;p&amp;amp;gt;
&amp;lt;span class="line-numbers"&amp;gt; &amp;lt;a href="#n5" name="n5"&amp;gt;5&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;amp;lt;&amp;lt;span class="string"&amp;gt;&amp;lt;span class="delimiter"&amp;gt;% &amp;lt;/span&amp;gt;&amp;lt;span class="content"&amp;gt;if&amp;lt;/span&amp;gt;&amp;lt;span class="delimiter"&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class="instance-variable"&amp;gt;&lt;/code&gt;item&lt;/span&gt;.methods.include?(&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="content"&gt;level&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;) &lt;span class="keyword"&gt;then&lt;/span&gt; &lt;span class="string"&gt;&lt;span class="delimiter"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="content"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="content"&gt;  &amp;lt;p&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&amp;lt;label &lt;span class="keyword"&gt;for&lt;/span&gt;=&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;span class="content"&gt;&amp;lt;%= @item_name.downcase &lt;span&gt;&amp;gt;_level&lt;/span&gt;&lt;span class="delimiter"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&amp;gt;&lt;span class="constant"&gt;Level&lt;/span&gt;: &amp;lt;&lt;span class="regexp"&gt;&lt;span class="delimiter"&gt;/&lt;/span&gt;&lt;span class="content"&gt;label&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;&lt;span class="regexp"&gt;&lt;span class="content"&gt;  &amp;lt;&lt;/span&gt;= text_field @item_name.downcase, &amp;#8216;level&amp;#8217;,  {:value =&amp;gt; @item.level} &lt;span&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="delimiter"&gt;/&lt;/span&gt;&lt;/span&gt;p&amp;gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;&amp;lt;&lt;span class="string"&gt;&lt;span class="delimiter"&gt;&lt;/span&gt; &lt;/span&gt;&lt;span class="content"&gt;end&lt;/span&gt;&lt;span class="delimiter"&gt; &lt;/span&gt;&lt;/span&gt;%&amp;gt;&lt;br /&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;&amp;lt;!&amp;#8212;[eoform&lt;span class="symbol"&gt;:lite&lt;/span&gt;]&amp;#8212;&amp;gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/notextile&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 21 Jul 2007 22:03:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/simply-on-rails-3-shared-controller/</guid>
      <link>http://www.h3rald.com/articles/simply-on-rails-3-shared-controller/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/simply-on-rails-3-shared-controller/#comments</comments>
      <category>rails</category>
    </item>
    <item>
      <title>An Interview with the creator of the Akelos Framework</title>
      <description>&lt;p&gt;I &lt;a href="http://www.h3rald.com/blog/34"&gt;already&lt;/a&gt; &lt;a href="http://www.h3rald.com/blog/38"&gt;covered&lt;/a&gt; the Akelos &lt;span class="caps"&gt;PHP&lt;/span&gt; framework in the past, but for those who don&amp;#8217;t know it, Akelos seems to be one of the few &lt;a href="http://www.h3rald.com/articles/rails-inspired-php-frameworks"&gt;Rails-inspired &lt;span class="caps"&gt;PHP&lt;/span&gt; frameworks&lt;/a&gt; still worth mentioning, besides CakePHP and Symphony of course.&lt;/p&gt;
&lt;p&gt;I recently has a look at their recently-relaunched &lt;a href="http://www.akelos.org/"&gt;community website&lt;/a&gt; and I noticed this phrase:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;Being port of Ruby on Rails to &lt;span class="caps"&gt;PHP&lt;/span&gt; Akelos is also optimized for programmer happiness and sustainable productivity&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Bermi Ferrer, Akelos creator, openly admits the framework is a port of Ruby on Rails to &lt;span class="caps"&gt;PHP&lt;/span&gt;, an attempt to help &lt;em&gt;&amp;#8220;Ruby on Rails developers who need to code in &lt;span class="caps"&gt;PHP&lt;/span&gt;&amp;#8221;&lt;/em&gt;, among others. Of course Akelos is not Rails, simply because Ruby is (thank God for that!) not &lt;span class="caps"&gt;PHP&lt;/span&gt;, however I decided to find out more, and I asked Bermi a few questions, which he promptly answered.&lt;h4&gt;&lt;em&gt;There are a lot of frameworks for &lt;span class="caps"&gt;PHP&lt;/span&gt;, perhaps too many: why did you decide to create Akelos rather than using one of the existing ones?&lt;/em&gt;&lt;/h4&gt;&lt;/p&gt;
&lt;p&gt;I started coding &lt;a href="http://www.akelos.org/"&gt;Akelos&lt;/a&gt; back in 2004 for our internal developments.  At that time I only found very few frameworks out there like &lt;a href="http://www.mojavi.org/"&gt;Mojavi&lt;/a&gt; and &lt;a href="http://ez.no/"&gt;eZ Publish&lt;/a&gt;. These frameworks were not my ideal of an &lt;a href="http://en.wikipedia.org/wiki/Agile_software_development"&gt;Agile development&lt;/a&gt; environment, so I decided to brew my own solution.&lt;/p&gt;
&lt;p&gt;After reading &lt;a href="http://www.martinfowler.com/books.html"&gt;Patterns of Enterprise Application Architecture&lt;/a&gt; it was clear to me the kind of framework I wanted &lt;a href="http://www.akelos.org/"&gt;Akelos&lt;/a&gt; to become,  so I started to implement some of the design patterns from the book into Akelos.&lt;/p&gt;
&lt;p&gt;During the summer of 2005 I had a look into other &lt;span class="caps"&gt;PHP&lt;/span&gt; frameworks like &lt;a href="http://www.cakephp.org/"&gt;CakePHP&lt;/a&gt;, &lt;a href="http://phpontrax.com/"&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; on Trax&lt;/a&gt;, and &lt;a href="http://www.bennolan.com/biscuit/"&gt;Biscuit&lt;/a&gt; but none of them was more complete or easier to use than what Akelos was already at that time.&lt;/p&gt;
&lt;p&gt;Then I used &lt;a href="http://www.rubyonrails.org/"&gt;Rails&lt;/a&gt; for one small personal project and immediately found that &lt;a href="http://www.akelos.org/"&gt;Akelos&lt;/a&gt; interfaces, conventions and philosophy were close to the Rails approach. &lt;a href="http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html"&gt;Rails ActiveRecord&lt;/a&gt; implementation was impressive, better than mine and much much better than other existing &lt;span class="caps"&gt;PHP&lt;/span&gt; implementations, so I first ported the ActiveRecord code using &lt;a href="http://adodb.sourceforge.net/"&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; AdoDB&lt;/a&gt; as the database abstraction layer.&lt;/p&gt;
&lt;p&gt;After that point, whenever I had a problem to solve while coding my customers applications I turned to Rails and they usually had the most elegant solution available. So I did like the idea of digging into Rails code to learn more Ruby and bringing Rails magic to the &lt;span class="caps"&gt;PHP&lt;/span&gt; world. It also helped the fact that Rails inline documentation is excellent so it could be easily adapted for Akelos.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;What&amp;#8217;s new since last time I posted about Akelos?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;The biggest change is the direction that the project has taken. Until now we have not dedicated time to promote Akelos, we just used it for our internal projects and we have been adding features as needed without a fixed roadmap or advocacy.&lt;/p&gt;
&lt;p&gt;Now this has changed. More and more developers are using Akelos and contributing functionalities they miss from Rails. After some serious contribution proposals and many developers telling us how much they like Akelos, we decided to take the time to build a nice community site which includes &lt;a href="http://forum.akelos.org/"&gt;forums&lt;/a&gt;, a &lt;a href="http://wiki.akelos.org/"&gt;wiki&lt;/a&gt;, a new &lt;a href="http://www.akelos.org/docs/tutorials/booklink"&gt;tutorial&lt;/a&gt; and &lt;a href="http://www.akelos.org/screencasts"&gt;a screen-cast&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are also some improvements like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sintags, now accepts ruby-like calls to helper methods from the views.&lt;/li&gt;
&lt;li&gt;Action Webservice, a component for creating and consuming Web Services easily.&lt;/li&gt;
&lt;li&gt;Action Mailer, which allows you to receive and send (directly or in delayed mode) emails from within your application. (this is almost ready to ship)&lt;/li&gt;
&lt;li&gt;Acts as tree behavior for Models.&lt;/li&gt;
&lt;li&gt;Many performance improvements.&lt;/li&gt;
&lt;li&gt;Many small contributions and bug fixes.&lt;/li&gt;
&lt;li&gt;Code base reduced from 16MB to 9MB.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;&lt;em&gt;From the new site, it seems that Akelos is &amp;#8211; or aims to be &amp;#8211; a port of Rails for &lt;span class="caps"&gt;PHP&lt;/span&gt;. Is that true? Do you aim to target Rails developers as possible users of the framework in situations in which &amp;#8220;they have no choice&amp;#8221; but to use &lt;span class="caps"&gt;PHP&lt;/span&gt; instead of Ruby?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;Akelos has ported many Ruby on Rails components keeping their interfaces and functionality whenever it was feasible to port the Ruby code to &lt;span class="caps"&gt;PHP&lt;/span&gt;. It might be considered a port in the sense of functionality, but there are some Rails strengths that rely on the Ruby language and that are impossible to port to &lt;span class="caps"&gt;PHP&lt;/span&gt;. However, Ruby developers will find that Akelos is the &lt;span class="caps"&gt;PHP&lt;/span&gt; framework with is the closest to Rails.&lt;/p&gt;
&lt;p&gt;On the other hand, many &lt;span class="caps"&gt;PHP&lt;/span&gt; developers have moved to Ruby because &lt;span class="caps"&gt;PHP&lt;/span&gt; lacked a hyper-productive and fun-to-use framework like Rails for building complex applications. That is no longer the case, and those who excel at &lt;span class="caps"&gt;PHP&lt;/span&gt; can start being productive from day one by using Akelos. In this way, Akelos target users are those who already know &lt;span class="caps"&gt;PHP&lt;/span&gt; and need to build complex applications that can run on almost any cheap shared hosting using a solid foundation based on good coding practices and widely accepted conventions.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;What Rails features are missing in Akelos?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;A standalone webserver like WebBrick, &lt;span class="caps"&gt;RJS&lt;/span&gt;, has and belongs to many through associations, string/number/date extensions and Active Resource.&lt;/p&gt;
&lt;p&gt;Ruby-powered features like modules, runtime class overriding and blocks will never be available in Akelos.&lt;/p&gt;
&lt;p&gt;Scaffolds in Akelos work by generating code, I found quite useless to enable $scaffold = true; and have magic functionality that you can&amp;#8217;t modify, so I decided not to invest my time on that one.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;I noticed quite a few generators available for Akelos, do they work as a Rails developer may expect them to work?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;The ones that are available do pretty much the same as in RoR.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;How does Akelos compare to other similar &lt;span class="caps"&gt;PHP&lt;/span&gt; frameworks like, say, CakePHP? What features does Akelos offer which Cake doesn&amp;#8217;t offer and vice-versa?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;I&amp;#8217;m not aware of Cake&amp;#8217;s functionalities. At the time I started porting Rails my feelings about CakePHP were that they missed the simplicity point in favor of architectural discussions that lead to confusing code, but that was long ago.&lt;/p&gt;
&lt;p&gt;Akelos (and Rails) do not implement &lt;span class="caps"&gt;ACL&lt;/span&gt; like Cake does, as that is a business logic component that varies too much from one case to other, it has no place inside the framework.&lt;/p&gt;
&lt;p&gt;Akelos is built with internationalization in its core. You can even internationalize your Models by prefixing the column name with the locale.&lt;/p&gt;
&lt;p&gt;I think that Cake only has an act_as_tree behavior on models while Akelos has Tree, Nested Set, and List. Akelos also implements handy features from Rails like &lt;a href="http://en.wikipedia.org/wiki/Optimistic_concurrency_control"&gt;optimistic locking&lt;/a&gt;, &lt;a href="http://www.martinfowler.com/eaaCatalog/lazyLoad.html"&gt;lazy loading&lt;/a&gt;, &lt;a href="http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html"&gt;table inheritance&lt;/a&gt;, counters, automatic transactions, really powerful validations, calculations&amp;#8230;, and I think most of these advanced features are still missing on Cake, but maybe I&amp;#8217;m wrong.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;Did you include unit tests for all the framework classes?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;The main components are fully unit tested, and no new code or patch gets into the trunk without unit tests.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;Did you or someone do any performance test or benchmarks on Akelos already?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;During the last month a lot of code was refactored to improve performance with the help of &lt;a href="http://xdebug.org/"&gt;Xdebug&lt;/a&gt;, &lt;a href="http://kcachegrind.sourceforge.net/"&gt;Kcachegrind&lt;/a&gt; and &lt;a href="http://httpd.apache.org/docs/2.0/programs/ab.html"&gt;ab&lt;/a&gt;. We significantly improved the performance in one of our most complex intranet applications, a &lt;a href="http://www.basecamphq.com/"&gt;basecamp&lt;/a&gt;-like system.&lt;/p&gt;
&lt;p&gt;Akelos also implements caching at many levels, so it&amp;#8217;s very easy to increase performance as we did with a new &lt;span class="caps"&gt;CMS&lt;/span&gt; that can handle +200 requests per second using &lt;a href="http://www.apache.org/"&gt;Apache&lt;/a&gt; in a cheap shared server environment.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;Why should a &lt;span class="caps"&gt;PHP&lt;/span&gt; developer choose Akelos over another &lt;span class="caps"&gt;PHP&lt;/span&gt; framework?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://www.akelos.org/docs/tutorials/booklink#mvc"&gt;Akelos &lt;span class="caps"&gt;MVC&lt;/span&gt; implementation&lt;/a&gt; and &lt;a href="http://www.akelos.org/docs/tutorials/booklink#workflow"&gt;workflow&lt;/a&gt; are really easy to understand.&lt;/p&gt;
&lt;p&gt;In Akelos all the methods and interfaces are thoroughly selected, so whenever you need to do something you just need to type what you think. Default options are selected with care so you don&amp;#8217;t need to set any  configuration unless you want to modify the default behavior.&lt;/p&gt;
&lt;p&gt;Coding multilingual applications, building complex relationships within models, distributing databases changes within your development team, building Ajax interfaces, unit testing your code and many other common tasks for &lt;span class="caps"&gt;PHP&lt;/span&gt; developers are really simple to accomplish when using Akelos.&lt;/p&gt;
&lt;p&gt;Akelos is designed to work on PHP4 and PHP5 and it comes with an easy web installer you can adapt for your application. It has functions for working with files and directories in common situations when the web server runs as a different user.&lt;/p&gt;
&lt;p&gt;And one of the main reasons for choosing Akelos is that it makes coding fun and lets you focus on solving user problems rather than wasting your time in repetitive technical annoyances. When coding with other developers the &lt;em&gt;convention over configuration philosophy&lt;/em&gt; helps everybody to understand  exactly how everything works and where to find things.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;Is there any website using Akelos already?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;a href="http://www.thechemicalbrothers.com/"&gt;Chemical Brothers&lt;/a&gt; new website which has been developed by &lt;a href="http://www.3ev.com/"&gt;3rd Eye Vision (3ev)&lt;/a&gt; is using Akelos. &lt;/p&gt;
&lt;p&gt;The &lt;a href="http://www.akelos.org/"&gt;Akelos.org&lt;/a&gt; site is running a &lt;span class="caps"&gt;CMS&lt;/span&gt; named Editam which we will release as Open Source in a near future.&lt;/p&gt;
&lt;p&gt;Some small websites like &lt;a href="http://www.fundaciocaixacarlet.com/"&gt;Fundacio Caixa Carlet&lt;/a&gt; and many intranet/extranet sites that we&amp;#8217;ve been coding during the last 2 years.&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;What are your future plans for Akelos? Anything new on the way?&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;A new manual, and a better &lt;span class="caps"&gt;API&lt;/span&gt; interface are the main priorities right now.&lt;/p&gt;
&lt;p&gt;Continuing bringing Rails functionality as needed.&lt;/p&gt;
&lt;p&gt;Releasing our sister project Editam &lt;span class="caps"&gt;CMS&lt;/span&gt; which will help developers who need to add functionality on the top of a &lt;span class="caps"&gt;CMS&lt;/span&gt; using a solid &lt;span class="caps"&gt;MVC&lt;/span&gt; framework like Akelos.&lt;/p&gt;</description>
      <pubDate>Wed, 18 Jul 2007 21:02:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/akelos-interview/</guid>
      <link>http://www.h3rald.com/articles/akelos-interview/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/akelos-interview/#comments</comments>
      <category>php</category>
      <category>rails</category>
      <category>cakephp</category>
      <category>frameworks</category>
    </item>
    <item>
      <title>Simply on Rails - Part 2: Database Design</title>
      <description>&lt;p&gt;This week I attended a course for work on how to &lt;em&gt;Implement Databases with Microsoft &lt;span class="caps"&gt;SQL&lt;/span&gt; Server 2005&lt;/em&gt;. An interesting course indeed, which made me realize how feature-rich Bill&amp;#8217;s product is, compared to the Open Source alternatives like MySQL. It also made me realize how nice it is to implement database-related logic (read: Models) using a &lt;em&gt;proper&lt;/em&gt; programming language rather than using triggers, stored procedures, functions and other goodies offered by Transact-&lt;span class="caps"&gt;SQL&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s all a matter of taste and of necessities: using MS &lt;span class="caps"&gt;SQL&lt;/span&gt; Server for one of my website is simply not going to happen anytime soon, and I&amp;#8217;m more than happy to have a database which can be used &lt;em&gt;just&lt;/em&gt; as a database and a programming language (Ruby, in this case) which can do wonders, rather than a procedural-only surrogate.&lt;/p&gt;
&lt;p&gt;Anyhow, back to our weekly series. After creating a &lt;a href="/blog/simply-on-rails-1-concepts-map"&gt;concept map&lt;/a&gt;, it&amp;#8217;s time of &lt;em&gt;get real&lt;/em&gt; and try to figure out a database architecture. The tool of choice this week is obviously the widely popular &lt;a href="http://fabforce.net/dbdesigner4/"&gt;DbDesigner 4&lt;/a&gt;. It&amp;#8217;s free, it&amp;#8217;s easy to use, and the results are pretty enough. There:&lt;/p&gt;
&lt;p&gt;&lt;a href="/files/italysimply_database-architecture.png"&gt;&lt;img src="/files/italysimply_database-architecture_thumb.png" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s amazing how a relatively simple concept map can lead to such a complex database architecture, isn&amp;#8217;t it?&lt;br /&gt;
Well, it&amp;#8217;s normal. One of the reasons of this is that I totally forgot about geographical information about the houses which will be featured on the site, or better, I thought about it as a &lt;em&gt;strings&lt;/em&gt; typed in by the administrators, whereas it would be much better having dropdown boxes.&lt;/p&gt;
&lt;p&gt;Countries, regions, privinces, areas and cities will be added to the database only once, rather than having to type them in every time a house is added. Obvious, but this lead to five tables more and nine (!) relationships more.&lt;/p&gt;
&lt;p&gt;The other reason of why the number of tables is higher than the number of entities in the domain model is that I decided &lt;em&gt;not&lt;/em&gt; to use the &lt;span class="caps"&gt;ENUM&lt;/span&gt; type. Firstly because &lt;a href="http://wiki.rubyonrails.org/rails/pages/HowtoUseSetAndEnumColumns"&gt;it&amp;#8217;s not handled very well by Rails&lt;/a&gt;&lt;br /&gt;
 and also because there&amp;#8217;s &lt;a href="http://blog.arabx.com.au/?p=87"&gt;a number of reasons&lt;/a&gt; why ENUMs should not be used.&lt;/p&gt;
&lt;p&gt;The only problem now is that whenever I load a house, I&amp;#8217;ll have to get data from a lot of tables at once (and this means a lot of joins underneath the model layer) or &amp;#8211; worse &amp;#8211; a lot of queries in case I decide to load related data &amp;#8220;on the fly&amp;#8221;. It looks like I&amp;#8217;ll have to do a bit of &lt;a href="http://railsexpress.de/blog/articles/2005/11/06/the-case-for-piggy-backed-attributes"&gt;piggy-backing&lt;/a&gt; here and there. &lt;a href="http://railsexpress.de/blog/articles/2006/05/29/simpler-piggy-backing"&gt;Someone&lt;/a&gt; already thought about a way of doing this in a more &amp;#8220;Model-friendly&amp;#8221; way. Perhaps I&amp;#8217;ll give it a shot.&lt;/p&gt;</description>
      <pubDate>Sat, 14 Jul 2007 03:27:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/simply-on-rails-2-database-design/</guid>
      <link>http://www.h3rald.com/articles/simply-on-rails-2-database-design/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/simply-on-rails-2-database-design/#comments</comments>
      <category>rails</category>
      <category>databases</category>
    </item>
    <item>
      <title>Rails to Italy 2007</title>
      <description>&lt;p&gt;So it looks like there will be a &amp;#8220;Rails conference in Italy&amp;#8221;, after all. In Pisa as well, and that&amp;#8217;s maybe even less than 2 hours drive from where I live (Genoa)!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Sounds cool!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Well, the entrance fee put me off a bit, I daresay (&#8364;89 if you book before August 1st, more otherwise), but it would be great to go there.&lt;br /&gt;
They are actually looking for speakers too, pity that at the moment I don&amp;#8217;t have anything prepared, but who knows&amp;#8230; There&amp;#8217;s free entrance (and beer) for speakers, apparently, which it wouldn&amp;#8217;t be bad, but unfortunately my girlfriend would have to pay though, of course.&lt;/p&gt;
&lt;p&gt;We&amp;#8217;ll see what happens, for now I&amp;#8217;m just going to promote the thing on my site (see the banner on the side).&lt;/p&gt;</description>
      <pubDate>Sat, 07 Jul 2007 05:15:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/rails-to-italy/</guid>
      <link>http://www.h3rald.com/articles/rails-to-italy/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/rails-to-italy/#comments</comments>
      <category>rails</category>
      <category>italy</category>
    </item>
    <item>
      <title>Simply on Rails - Part 1: Concepts and Bubbles</title>
      <description>&lt;p&gt;The first thing I do when I start developing a new application is write down some ideas.&lt;/p&gt;
&lt;p&gt;Pen and paper normally do the job, but nowadays there are some valid online and offline applications which work as good if not (probably) better.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve never been a fan of &lt;a href="http://en.wikipedia.org/wiki/Mind_Mapping"&gt;Mind Mapping&lt;/a&gt;. I&amp;#8217;ve been to a seminar on problem solving and creativity and they were showing how mind mapping can unleash your creativity, but it didn&amp;#8217;t really work for me. I found the concept-idea-concept-idea sequences a bit too restrictive for my liking.&lt;/p&gt;
&lt;p&gt;So I decided to try something different: bubbles! &lt;a href="http://www.bubbl.us/"&gt;Bubbl.us&lt;/a&gt; is an interesting online flash application which lets you create bubbles. You can create bubbles and relationships between them, change their color, their dimensions etc. And above all it&amp;#8217;s absolutely fun to use. I created two bubble sheets, the first one to define how content will be organized in the next version of ItalySimply:&lt;/p&gt;
&lt;p&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="450" height="340" id="bblviewer"&gt;&lt;br /&gt;
&lt;param name="movie" value="http://bubbl.us/sys/view.swf?sid=26306&amp;pw=yaeyI.megNtZcMTh3azVsVjhwVEt0TQ" /&gt;&lt;br /&gt;
&lt;param name="quality" value="high" /&gt;&lt;br /&gt;
&lt;param name="SeamlessTabbing" value="false" /&gt;&lt;br /&gt;
&lt;param name="AllowScriptAccess" value="always" /&gt;&lt;br /&gt;
&lt;param name="FlashVars" value="_sid=26306&amp;_title=ItalySimply%20v3%20-%20Content&amp;_z=75&amp;_pw=yaeyI.megNtZcMTh3azVsVjhwVEt0TQ" /&gt;&lt;br /&gt;
&lt;embed src="http://bubbl.us/sys/view.swf?sid=26306&amp;pw=yaeyI.megNtZcMTh3azVsVjhwVEt0TQ" FlashVars="_sid=26306&amp;_title=ItalySimply%20v3%20-%20Content&amp;_z=75&amp;_pw=yaeyI.megNtZcMTh3azVsVjhwVEt0TQ" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="340" allowscriptaccess="always" SeamlessTabbing="false" name="bblviewer"&gt;&lt;/embed&gt;&lt;br /&gt;
&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;The diagram identifies three main types of content:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Houses &amp;#8211; basically what the site is about: house listing with information and pictures about houses for sale or rent.&lt;/li&gt;
	&lt;li&gt;Links &amp;#8211; Either swapped with partners or suggested by users.&lt;/li&gt;
	&lt;li&gt;Pages &amp;#8211; Static content.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;which will be organized in three different ways:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Tags&lt;/li&gt;
	&lt;li&gt;Categories&lt;/li&gt;
	&lt;li&gt;An internal search engine, allowing people to filter houses according to some criteria.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The other sheet focuses on relationships between content and users.&lt;/p&gt;
&lt;p&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="450" height="340" id="bblviewer"&gt;&lt;br /&gt;
&lt;param name="movie" value="http://bubbl.us/sys/view.swf?sid=26307&amp;pw=yaeyI.megNtZcMTgxeUw0S0FSNzhFNg" /&gt;&lt;br /&gt;
&lt;param name="quality" value="high" /&gt;&lt;br /&gt;
&lt;param name="SeamlessTabbing" value="false" /&gt;&lt;br /&gt;
&lt;param name="AllowScriptAccess" value="always" /&gt;&lt;br /&gt;
&lt;param name="FlashVars" value="_sid=26307&amp;_title=ItalySimply%20v3%20-%20Communication&amp;_z=75&amp;_pw=yaeyI.megNtZcMTgxeUw0S0FSNzhFNg" /&gt;&lt;br /&gt;
&lt;embed src="http://bubbl.us/sys/view.swf?sid=26307&amp;pw=yaeyI.megNtZcMTgxeUw0S0FSNzhFNg" FlashVars="_sid=26307&amp;_title=ItalySimply%20v3%20-%20Communication&amp;_z=75&amp;_pw=yaeyI.megNtZcMTgxeUw0S0FSNzhFNg" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="340" allowscriptaccess="always" SeamlessTabbing="false" name="bblviewer"&gt;&lt;/embed&gt;&lt;br /&gt;
&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;At the far sides we have users and administrators, and in the middle how they interact between themselves or with content, in particular:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Users will be able to access house feeds and be notified automatically of new additions&lt;/li&gt;
	&lt;li&gt;Users will be able to ask questions or comments to each house (they&amp;#8217;ll be moderated, of course).&lt;/li&gt;
	&lt;li&gt;Users will be able to suggest links, or contact administrators using a &amp;#8220;House Preferences&amp;#8221; form or a more generic contact form.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Bubbles are fun, but while I was creating these two diagrams, I felt I absolutely needed to name the relationships between each entity or concept, so I spend some time trying to find a tool who would let me do so in an easy and fast way.&lt;/p&gt;
&lt;p&gt;Yep, I needed to create a &lt;a href="http://en.wikipedia.org/wiki/Domain_model"&gt;domain model&lt;/a&gt; to move a bit closer to create the database architecture of the site.&lt;br /&gt;
It turns out that this magic tool exists, and it&amp;#8217;s free for non-commercial use: &lt;a href="http://cmap.ihmc.us/download/"&gt;CmapTools&lt;/a&gt;.&lt;br /&gt;
It&amp;#8217;s not web based, and it&amp;#8217;s a 59MB Java desktop application which can be used to create &lt;a href="http://en.wikipedia.org/wiki/Concept_map"&gt;Concept Maps&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Within minutes I was able to create a simple but pretty and functional enough domain model for my site:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/ItalySimply-v3_domain-model.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Basically all the concepts I used are going to become models, and all the named relationships will become model associations in Rails.&lt;/p&gt;
&lt;p&gt;Next step: database architecture.&lt;/p&gt;</description>
      <pubDate>Fri, 06 Jul 2007 23:43:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/simply-on-rails-1-concepts-map/</guid>
      <link>http://www.h3rald.com/articles/simply-on-rails-1-concepts-map/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/simply-on-rails-1-concepts-map/#comments</comments>
      <category>rails</category>
      <category>website</category>
      <category>web20</category>
    </item>
    <item>
      <title>Simply on Rails?</title>
      <description>&lt;p&gt;So finally my site is back up, I don&amp;#8217;t have to worry about coding anymore: just writing about whatever I like, no more Cake, no more &lt;span class="caps"&gt;MVC&lt;/span&gt;, no more frameworks&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What do you mean no coding anymore? You&amp;#8217;ve been bragging about how this Rails thing is fast, how you can develop things easily, and this, and that&amp;#8230; You &lt;strong&gt;know&lt;/strong&gt; what you have to do now&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;^&lt;/sup&gt; That was my fianc&amp;eacute;e, actually, and she&amp;#8217;s right: my web development days are far from being over, actually. I admit I tried to get away from it, but she kindly reminded me (and she can be &lt;em&gt;very&lt;/em&gt; persuasive) that now I have to fix &lt;a href="http://www.italysimply.com/"&gt;ItalySimply&lt;/a&gt;, the site I created a while a go (4 years?) with a mixture of Mambo (the &lt;span class="caps"&gt;CMS&lt;/span&gt;, now Joomla) and spaghetti &lt;span class="caps"&gt;PHP&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;A sort-of-real-estate thingie visited by people who want to move to Italy or simply buy a house here. And it&amp;#8217;s due a makeover, to be honest.&lt;/p&gt;
&lt;p&gt;How am I gonna manage this? Let&amp;#8217;s see&amp;#8230;&lt;/p&gt;
&lt;h3&gt;&lt;span class="caps"&gt;COW&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span class="caps"&gt;COW&lt;/span&gt; \- Code On Week-ends. my web development methodology: simple, effective, basically my only choice. Actually the full name is &lt;span class="caps"&gt;COW&lt;/span&gt; (&lt;span class="caps"&gt;IYL&lt;/span&gt;): Code On Week-ends &lt;em&gt;If You&amp;#8217;re Lucky&lt;/em&gt;, i.e.: if we&amp;#8217;re not going out, if there&amp;#8217;s nothing better to do, if I feel like it. No deadlines (almost), no plans to follow, nothing.&lt;/p&gt;
&lt;p&gt;No, I&amp;#8217;m not terribly motivated to take on this project, but I already thought about two things to get me going:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Get &lt;a href="http://www.pragmaticprogrammer.com/titles/rails/"&gt;Agile Web Development with Rails&lt;/a&gt;&lt;/strong&gt; \- I read bits of the first edition, and that&amp;#8217;s what got me started with Rails, now it&amp;#8217;s time to buy the real thing.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Blog about it&lt;/strong&gt; \- I&amp;#8217;ll &lt;em&gt;try&lt;/em&gt; to keep a diary of my coding efforts and share the most juicy bits with the rest of the world. In this way I&amp;#8217;ll also have content for my site and the three people who read this blog will have something (hopefully) interested to read.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;The Cunning Plan&lt;/h3&gt;
&lt;p&gt;Instead of getting out of troubles by simply tidying up some &lt;span class="caps"&gt;PHP&lt;/span&gt; code or migrate the site to Joomla, I&amp;#8217;d like to re-code the whole thing from scratch using Rails. Ideally I&amp;#8217;d like to migrate quite a bit of the content (including the hundreds of houses with pictures which were published over the years), but at the moment I&amp;#8217;m not thinking about it: after all, in the end the site will be so addictive and easy to use that adding hundreds of houses back on will be just so much fun! Right? Yeah, right&amp;#8230;&lt;/p&gt;
&lt;p&gt;First of all I&amp;#8217;ll spend quite a bit of time planning the application and what has to be done, then I&amp;#8217;ll have  to practice a little bit with Rails, and then, eventually, I&amp;#8217;ll end up writing some code. Of course, suggestions and ideas will be more than welcome throughout all the process.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s see how it goes&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Fri, 29 Jun 2007 22:00:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/simply-on-rails-intro/</guid>
      <link>http://www.h3rald.com/articles/simply-on-rails-intro/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/simply-on-rails-intro/#comments</comments>
      <category>rails</category>
      <category>web20</category>
    </item>
    <item>
      <title>Back on Track...</title>
      <description>&lt;p&gt;&amp;#8230;or better, on &lt;a href="http://www.rubyonrails.org"&gt;Rails&lt;/a&gt;_. &lt;br /&gt;
Yep, this 7th (!) version of the H3RALD website is powered by the overly-popular Ruby web framework &lt;em&gt;and&lt;/em&gt; by the &lt;a href="http://www.typosphere.org"&gt;Typo&lt;/a&gt; blogging platform.&lt;/p&gt;
&lt;p&gt;Nope, I decided not to re-develop my website entirely from scratch this time, although I was tempted to, for three simple reasons:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;My &amp;#8220;coding time&amp;#8221; is close to non-existent nowadays, and even with a framework like Rails re-developing a site from scratch would have taken at least &lt;em&gt;some&lt;/em&gt; time, which at the moment I don&amp;#8217;t have.&lt;/li&gt;
	&lt;li&gt;Typo is a fairly robust and feature-rich blogging platform, and after learning a little bit of Rails I could customize it to my needs straight away. URLs didn&amp;#8217;t break thanks to Rails&amp;#8217; routing system, migration was easy enough, and developing the missing bits (like a rudimentary BBCode parser and a TextLinkAds sidebar) wasn&amp;#8217;t hard at all.&lt;/li&gt;
	&lt;li&gt;I wanted to take a break from my site, not code it again.&lt;br /&gt;
&lt;em&gt;Fair enough, but why the new site anyway?&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Again, there&amp;#8217;s more than one answer:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Lately I didn&amp;#8217;t feel comfortable sporting a Cake-powered website \- that makes sense, to an extent, right? Good.&lt;/li&gt;
	&lt;li&gt;I got fed up with spam. I wanted to re-open comments but I didn&amp;#8217;t want to implement spam protection for the old site.&lt;/li&gt;
	&lt;li&gt;To be totally honest, I got fed up with &lt;span class="caps"&gt;PHP&lt;/span&gt; itself as well, after trying out Ruby for a few days and ordering  and reading the 2nd edition of the &lt;a href="http://www.pragmaticprogrammer.com/titles/ruby/"&gt;PickAxe&lt;/a&gt;, which I &lt;em&gt;highly&lt;/em&gt; recommend.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;#8230;But let&amp;#8217;s say something about what&amp;#8217;s new in this new release, shall we?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A new, black (and red) theme. Something completely different. Probably not that good, but quite useful: Every day I check my site from my laptop at work, and if it looks like a big black blob I know that I have to regulate my monitor. I showed it to my parents on their old monitor, and they realized that perhaps it&amp;#8217;s time to buy an &lt;span class="caps"&gt;LCD&lt;/span&gt; one&amp;#8230;&lt;/li&gt;
	&lt;li&gt;Comments, trackbacks, desktop client support, theme support, a cool admin area and everything else Typo offers.&lt;/li&gt;
	&lt;li&gt;Full &lt;span class="caps"&gt;RSS&lt;/span&gt; feeds. With no ads. So you don&amp;#8217;t need to see this black blob anymore, if you really don&amp;#8217;t like it.&lt;/li&gt;
	&lt;li&gt;No projects or bookmarks, just my blog and my articles. Let&amp;#8217;s keep it simple.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More to come&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Fri, 22 Jun 2007 06:38:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/h3rald-v7-overview/</guid>
      <link>http://www.h3rald.com/articles/h3rald-v7-overview/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/h3rald-v7-overview/#comments</comments>
      <category>website</category>
      <category>rails</category>
    </item>
    <item>
      <title>Ruby on Rails &amp; CakePHP</title>
      <description>&lt;p&gt;This article is an attempt to port a famous Ruby on Rails tutorial to &lt;span class="caps"&gt;PHP&lt;/span&gt; using an emerging &lt;span class="caps"&gt;PHP&lt;/span&gt; &lt;span class="caps"&gt;MVC&lt;/span&gt; framework, CakePHP. CakePHP was inspired by Rails&amp;#8217; philosophy of Rapid Application Development. It implements a lot of the features and concepts that made Ruby on Rails popular in a very short time. Although Ruby&amp;#8217;s syntax and way of doing things is known to be much more elegant than other programming languages, there is yet hope for &lt;span class="caps"&gt;PHP&lt;/span&gt; to get more organized and effi cient. This tutorial will follow its Rails counterpart step-by-step, covering the essential steps to create a simple, yet fully functional, web application.&lt;br /&gt;
Register on the &lt;a href="http://www.php-mag.net/magphpde/psecom,id,20,archive,2,noeid,20,.html"&gt;International &lt;span class="caps"&gt;PHP&lt;/span&gt; Magazine&lt;/a&gt; to read the full article.&lt;br /&gt;
&lt;img src="/img/thumbs/phpmag0706.gif" alt="" /&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 07 Jul 2006 01:52:28 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/ror-and-cakephp/</guid>
      <link>http://www.h3rald.com/articles/ror-and-cakephp/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/ror-and-cakephp/#comments</comments>
      <category>cakephp</category>
      <category>rails</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Rails-inspired PHP frameworks</title>
      <description>&lt;p&gt;There are various articles online examining many &lt;span class="caps"&gt;PHP&lt;/span&gt; frameworks, providing short reviews or comparative charts, but I could not find yet an article  examining the so called &lt;em&gt;&amp;#8220;Rails-inspired frameworks&amp;#8221;&lt;/em&gt; anywhere on the web, so I decided to write my own&amp;#8230;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;IMPORTANT&lt;/span&gt; &lt;span class="caps"&gt;UPDATE&lt;/span&gt;:&lt;/strong&gt; I do no longer recommend the CakePHP framework anymore due to the &lt;a href="http://www.h3rald.com/blog/42"&gt;unprofessionalism of some member of its development team&lt;/a&gt;. My site is now powered by Ruby on Rails and I totally lost interest in &lt;span class="caps"&gt;PHP&lt;/span&gt; and any &lt;span class="caps"&gt;PHP&lt;/span&gt; framework. If you are looking for a decent web framework, try &lt;a href="http://www.rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; (for Ruby), &lt;a href="http://www.djangoproject.com/"&gt;Django&lt;/a&gt; (for Python) or &lt;a href="http://catalyst.perl.org/"&gt;Catalyst&lt;/a&gt; (for Perl).&lt;br /&gt;
I&amp;#8217;m talking about those &lt;span class="caps"&gt;PHP&lt;/span&gt; frameworks who give at least part of their success to Ruby on Rails&lt;sup class="footnote" id="fnr2"&gt;&lt;a href="#fn2"&gt;2&lt;/a&gt;&lt;/sup&gt;, but don&amp;#8217;t call them &lt;em&gt;clones&lt;/em&gt; or &lt;em&gt;ports&lt;/em&gt; as some of their creators may get offended.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style="float:left;"&gt;&lt;img src="/img/pictures/rails.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Since Rails shocked the world with an easy-to-use, powerful and semi-sentient web development framework, web development is not the same anymore: everything must be done efficiently, quickly and you &lt;em&gt;have&lt;/em&gt; to produce a Web 2.0 compliant public beta after X days/weeks/months or your work is simply not useful to anybody. Try doing that with the traditional &lt;span class="caps"&gt;PHP&lt;/span&gt; spaghetti code: you can&amp;#8217;t, it&amp;#8217;s too much, it will be too tangled up and in the end you&amp;#8217;ll lose your mind trying to find that &lt;em&gt;small insignificant bug&lt;/em&gt; which makes your web application completely useless.&lt;/p&gt;
&lt;p&gt;Yes, you could use Rails, but maybe you don&amp;#8217;t know or don&amp;#8217;t want to learn Ruby, your host doesn&amp;#8217;t support it, your boss loves &lt;span class="caps"&gt;PHP&lt;/span&gt; etc. etc. If you&amp;#8217;re in this situation or you simply would like to know what&amp;#8217;s going on at the &lt;span class="caps"&gt;PHP&lt;/span&gt; front of the Rails Clone War, you should keep reading this article.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;d like to introduce &amp;#8211; briefly &amp;#8211; six Rails-inspired &lt;span class="caps"&gt;PHP&lt;/span&gt; frameworks and compare them with each other, to point out their features, their pros and cons.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; I&amp;#8217;m a CakePHP&lt;sup class="footnote" id="fnr3"&gt;&lt;a href="#fn3"&gt;3&lt;/a&gt;&lt;/sup&gt; fan, this site has been built with CakePHP and I even wrote something&lt;sup class="footnote" id="fnr4"&gt;&lt;a href="#fn4"&gt;4&lt;/a&gt;&lt;/sup&gt; about it in the past. This makes me inevitably partial and more familiar with this particular framework, but I&amp;#8217;ll try my very best to provide a relatively objective analysis. Obviously frameworks which are not based on the &lt;span class="caps"&gt;MVC&lt;/span&gt; architechture and that weren&amp;#8217;t inspired by Ruby on Rails have not been included, so forget things like &lt;span class="caps"&gt;PRADO&lt;/span&gt;, Qcodo, eZComponents, or even Mojavi: it&amp;#8217;s not that they are &amp;#8220;bad&amp;#8221;, they&amp;#8217;ve just been left out because they are not pertinent to this article&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;CakePHP&lt;/h3&gt;
&lt;p style="float:right;"&gt;&lt;img src="/img/pictures/CakePHP_1.0.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="http://www.cakephp.org/"&gt;www.cakephp.org&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; version:&lt;/strong&gt; PHP4 and PHP5&lt;br /&gt;
&lt;strong&gt;License:&lt;/strong&gt; &lt;span class="caps"&gt;MIT&lt;/span&gt;&lt;sup class="footnote" id="fnr5"&gt;&lt;a href="#fn5"&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;br /&gt;
&lt;strong&gt;Download size (.tar.gz):&lt;/strong&gt; 184KB&lt;br /&gt;
&lt;strong&gt;Supported Databases:&lt;/strong&gt; MySQL, PostgreSQL, SQlite, MS &lt;span class="caps"&gt;SQL&lt;/span&gt; + any other supported by ADOdb or &lt;span class="caps"&gt;PEAR&lt;/span&gt;::DB database abstraction layers&lt;br /&gt;
&lt;strong&gt;Beginner&amp;#8217;s Tutorial&lt;/strong&gt;: &lt;a href="http://wiki.cakephp.org/tutorials:blog_tutorial_-_1"&gt;Blog Tutorial&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Official Description:&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;&amp;#8220;Cake is a rapid development framework for &lt;span class="caps"&gt;PHP&lt;/span&gt; which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and &lt;span class="caps"&gt;MVC&lt;/span&gt;. Our primary goal is to provide a structured framework that enables &lt;span class="caps"&gt;PHP&lt;/span&gt; users at all levels to rapidly develop robust web applications, without any loss to flexibility.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PROs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Lightweight, not bloated, containing only essential code&lt;/li&gt;
	&lt;li&gt;Runs both on PHP4 and PHP5&lt;/li&gt;
	&lt;li&gt;No configuration needed &amp;#8211; except for a stupidly short database configuration file and a few constants which &lt;em&gt;can&lt;/em&gt; be modified. You can literally start baking in less than five minutes&lt;/li&gt;
	&lt;li&gt;Extended table association support, allowing the creation of complex database architechtures&lt;/li&gt;
	&lt;li&gt;Extremely logical and functional directory structure: better than Rails, if you ask me.&lt;/li&gt;
	&lt;li&gt;Enhanced &lt;span class="caps"&gt;AJAX&lt;/span&gt; support through the &lt;span class="caps"&gt;AJAX&lt;/span&gt; and Javascript view helpers&lt;/li&gt;
	&lt;li&gt;useful &amp;#8220;bake&amp;#8221; command line script to generate parts of the  code automatically&lt;/li&gt;
	&lt;li&gt;Very active community and plenty of &lt;em&gt;satellite sites&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;Suitable for every kind of website, from the small personal site to the advanced e-business application.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;CONs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;No &amp;#8220;official&amp;#8221; internationalization support for now, but it will be included in the next milestone.&lt;/li&gt;
	&lt;li&gt;It does not take fully advantage of PHP5 features&lt;/li&gt;
	&lt;li&gt;Official documentation still needs some some improvement, although now it seems pretty complete and exhaustive.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;br /&gt;
CakePHP is my personal favorite: easy to learn, easy to use,multi-purpose and not bloated. Cake&amp;#8217;s philosophy is not to include unnecessary code in the framework unless it&amp;#8217;s absolutely necessary for the framework itself, as a result, 3rd-party libraries are not included in the official releases, but may be seamlessly integrated with the framework &lt;em&gt;if developers need them&lt;/em&gt;. &lt;br /&gt;
Cake&amp;#8217;s success is partly determined &amp;#8211; at least initially &amp;#8211; by the fact that it can run fine with no limitations on PHP4, while other similar frameworks don&amp;#8217;t. Although this may still be one of its most obvious strengths, it must be said that Cake seems to go in the right direction, taking only the best from Rails, without forcing developers into complex and pointless adaptations, and evolving into a great framework created &lt;em&gt;in &lt;span class="caps"&gt;PHP&lt;/span&gt;, for &lt;span class="caps"&gt;PHP&lt;/span&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;Symfony&lt;/h3&gt;
&lt;p style="float:right;"&gt;&lt;img src="/img/pictures/symfony.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="http://www.symfony-project.com/"&gt;www.synfony.project.com&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; version:&lt;/strong&gt; PHP5&lt;br /&gt;
&lt;strong&gt;License:&lt;/strong&gt; Symfony&lt;sup class="footnote" id="fnr6"&gt;&lt;a href="#fn6"&gt;6&lt;/a&gt;&lt;/sup&gt;&lt;br /&gt;
&lt;strong&gt;Download size (.tgz):&lt;/strong&gt; 1255KB&lt;br /&gt;
&lt;strong&gt;Supported Databases:&lt;/strong&gt; MySQL, PostgreSQL, SQLite, Oracle, MS &lt;span class="caps"&gt;SQL&lt;/span&gt; + any other supported by Creole database abstraction layer&lt;br /&gt;
&lt;strong&gt;Beginner&amp;#8217;s Tutorial&lt;/strong&gt;: &lt;a href="http://www.symfony-project.com/tutorial/my_first_project.html"&gt;My first project&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Official Description:&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;&amp;#8220;Based on the best practices of web development, thoroughly tried on several active websites, symfony aims to speed up the creation and maintenance of web applications, and to replace the repetitive coding tasks by power, control and pleasure. [&amp;#8230;]&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Symfony is an object-oriented PHP5 framework based on the &lt;span class="caps"&gt;MVC&lt;/span&gt; model. Symfony allows for the separation of business rules, server logic and presentation views of a web application. It also contains numerous tools and classes aimed at shortening the development time of a complex web application.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PROs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Fully featured framework, includes everything you might ever need (see CONs, below)&lt;/li&gt;
	&lt;li&gt;Full native internationalization support&lt;/li&gt;
	&lt;li&gt;Truly excellent documentation, tutorials, wiki, book, screencasts, &lt;span class="caps"&gt;API&lt;/span&gt;, real-world examples, etc. etc.&lt;/li&gt;
	&lt;li&gt;Code generators&lt;/li&gt;
	&lt;li&gt;Various &amp;#8220;pre-built&amp;#8221; modules/libraries for the most common tasks&lt;/li&gt;
	&lt;li&gt;It was not inspired only by Rails, but borrows concepts and practices from various other frameworks&lt;/li&gt;
	&lt;li&gt;Good community support&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;CONs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Seems too big compared to the others, too many &amp;#8220;extras&amp;#8221; which may not be useful to &lt;em&gt;all&lt;/em&gt; developers&lt;/li&gt;
	&lt;li&gt;PHP5 only&lt;/li&gt;
	&lt;li&gt;Confusing and disorganized directory structure&lt;/li&gt;
	&lt;li&gt;Uses too many configuration files, not suitable for &lt;em&gt;simple&lt;/em&gt; projects&lt;/li&gt;
	&lt;li&gt;Steep learning curve&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;br /&gt;
Symfony is really an interesting framework: it&amp;#8217;s perhaps the most &lt;em&gt;complete&lt;/em&gt; in terms for features and documentation. The only problem I have with it is that it just seems too complex and rather difficult to learn if compared to the others, which can do &lt;em&gt;almost&lt;/em&gt; the same things (or will soon be able to) in a &lt;em&gt;&lt;span class="caps"&gt;MUCH&lt;/span&gt;&lt;/em&gt; simpler way. A nice blend of &lt;span class="caps"&gt;MVC&lt;/span&gt;, pre-built components, command line generators and &lt;span class="caps"&gt;YAML&lt;/span&gt;/Propel configuration files, but perhaps a bit &lt;em&gt;disorganized&lt;/em&gt; in its internal structure, unlike its wonderful documentation and support section.&lt;/p&gt;
&lt;h3&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; on Trax&lt;/h3&gt;
&lt;p style="float:right;"&gt;&lt;img src="/img/pictures/phpontrax.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="http://www.phpontrax.com/"&gt;www.phpontrax.com&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; version:&lt;/strong&gt; PHP5&lt;br /&gt;
&lt;strong&gt;License:&lt;/strong&gt; &lt;span class="caps"&gt;MIT&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;Download size (.tgz):&lt;/strong&gt; 843KB&lt;br /&gt;
&lt;strong&gt;Supported Databases:&lt;/strong&gt; Any database supported by &lt;span class="caps"&gt;PEAR&lt;/span&gt;::DB&lt;br /&gt;
&lt;strong&gt;Beginner&amp;#8217;s Tutorial&lt;/strong&gt;: &lt;a href="http://svn.phpontrax.com/wiki/HowToCreateATraxApplication"&gt;How to create a Trax application&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Official Description:&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;&amp;#8220;Php On Trax (formerly Php On Rails) is a web-application and persistance framework that is based on Ruby on Rails and includes everything needed to create database-backed web-applications according to the Model-View-Control pattern of separation.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PROs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Simple, logical, essential: a true RoR port to PHP5&lt;/li&gt;
	&lt;li&gt;Code generators, like Rails&lt;/li&gt;
	&lt;li&gt;Zero configuration (like Rails and Cake&lt;/li&gt;
	&lt;li&gt;Easy and logical directory structure (the same as Rails)&lt;/li&gt;
	&lt;li&gt;Supports table associations, but more in a way which is more similar to Ruby on Rails than Cake.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;CONs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Lack of documentation compared to the others&lt;/li&gt;
	&lt;li&gt;Trying to port Ruby on Rails to &lt;span class="caps"&gt;PHP&lt;/span&gt;, ignoring why RoR was not built in &lt;span class="caps"&gt;PHP&lt;/span&gt; in the first place&lt;sup class="footnote" id="fnr7"&gt;&lt;a href="#fn7"&gt;7&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
	&lt;li&gt;No internationalization or other advanced functionalities&lt;/li&gt;
	&lt;li&gt;PHP5 only&lt;/li&gt;
	&lt;li&gt;Small community&lt;/li&gt;
	&lt;li&gt;&lt;span class="caps"&gt;DBO&lt;/span&gt; class based only on &lt;span class="caps"&gt;PEAR&lt;/span&gt;::DB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;br /&gt;
In my opinion this project aims too much to be a Rails-clone to acquire a proper consensus. Trying to port something to another language is not good, especially in the case of Rails and Ruby. This framework looks somehow like an old version of CakePHP, which evolved slightly but always remained anchored to its beliefs of building a Rails port for &lt;span class="caps"&gt;PHP&lt;/span&gt; (even in the name!). Some may say that this is a lost battle since the beginning &amp;#8211; or better, since before it started &amp;#8211; but others found that &lt;span class="caps"&gt;PHP&lt;/span&gt; on Trax can be the easiest way to switch from Ruby on Rails to a &lt;span class="caps"&gt;PHP&lt;/span&gt; equivalent. Who is going to do that? Well, Ruby programmers &lt;em&gt;forced&lt;/em&gt; to develop in &lt;span class="caps"&gt;PHP&lt;/span&gt;, maybe. Not too good, but not too bad either.&lt;/p&gt;
&lt;h3&gt;Code Igniter&lt;/h3&gt;
&lt;p style="float:right;"&gt;&lt;img src="/img/pictures/codeigniter.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="http://www.codeigniter.com/"&gt;www.codeigniter.org&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; version:&lt;/strong&gt; PHP4 and PHP5&lt;br /&gt;
&lt;strong&gt;License:&lt;/strong&gt; CodeIgniter&lt;sup class="footnote" id="fnr8"&gt;&lt;a href="#fn8"&gt;8&lt;/a&gt;&lt;/sup&gt;&lt;br /&gt;
&lt;strong&gt;Download size (.zip):&lt;/strong&gt; 609KB&lt;br /&gt;
&lt;strong&gt;Supported Databases:&lt;/strong&gt; MySQL, PostgreSQL, SQLite, MySQLi, MS &lt;span class="caps"&gt;SQL&lt;/span&gt; + &lt;span class="caps"&gt;ODBC&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;Beginner&amp;#8217;s Tutorial&lt;/strong&gt;: &lt;a href="http://www.codeigniter.com/videos/ci_intro.mov"&gt;Hello World! Introduction to Code Igniter&lt;/a&gt; [video]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Official Description:&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;&amp;#8220;Code Igniter is an Open Source Web Application Framework that makes writing kick-ass &lt;span class="caps"&gt;PHP&lt;/span&gt; programs simple as apple pie. [&amp;#8230;] Designed to enable, not overwhelm, Code Igniter is a powerful &lt;span class="caps"&gt;PHP&lt;/span&gt; framework with a very small footprint, built for &lt;span class="caps"&gt;PHP&lt;/span&gt; coders who need a simple and elegant toolkit to create full-featured web applications.&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;If you&amp;#8217;re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you&amp;#8217;re tired of ponderously large and thoroughly undocumented frameworks that require rocket science to understand, Code Igniter might just be the right tool for you.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PROs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Good and organized documentation&lt;/li&gt;
	&lt;li&gt;Zero configuration (like Rails and Cake)&lt;/li&gt;
	&lt;li&gt;Includes various classes and libraries for common tasks&lt;/li&gt;
	&lt;li&gt;Compatible with PHP4 and PHP5&lt;/li&gt;
	&lt;li&gt;Medium-sized community&lt;/li&gt;
	&lt;li&gt;Intuitive directory structure&lt;/li&gt;
	&lt;li&gt;Ships with the full user guide included in separate &lt;span class="caps"&gt;HTML&lt;/span&gt; files&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;CONs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;No full (&amp;#8220;written&amp;#8221;) tutorials except the videos!&lt;/li&gt;
	&lt;li&gt;Relatively new to the scene, but growing&lt;/li&gt;
	&lt;li&gt;Does not seem to support table associations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;br /&gt;
People on the Net seem to be rather enthusiastic about this framework: where there&amp;#8217;s a thread about the &lt;em&gt;big ones&lt;/em&gt; (Cake and Symfony), there&amp;#8217;s always, someone who pops in suggesting to try out Code Igniter. I personally think this can be a true bless for small/medium sized projects, however, I&amp;#8217;d opt for CakePHP or Symfony for a large scale application: something is missing, e.g., most notably, table associations.&lt;/p&gt;
&lt;h3&gt;Biscuit&lt;/h3&gt;
&lt;p style="float:right;"&gt;&lt;img src="/img/pictures/biscuit.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="http://biscuitproject.tigris.org/"&gt;biscuitproject.tigris.org&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; version:&lt;/strong&gt; PHP4 and PHP5&lt;br /&gt;
&lt;strong&gt;License:&lt;/strong&gt; &lt;span class="caps"&gt;MIT&lt;/span&gt;&lt;sup class="footnote" id="fnr5"&gt;&lt;a href="#fn5"&gt;5&lt;/a&gt;&lt;/sup&gt;  &lt;br /&gt;
&lt;strong&gt;Download size (.zip):&lt;/strong&gt; 240KB&lt;br /&gt;
&lt;strong&gt;Supported Databases:&lt;/strong&gt; Any database supported by &lt;span class="caps"&gt;PEAR&lt;/span&gt;::DB&lt;br /&gt;
&lt;strong&gt;Beginner&amp;#8217;s Tutorial&lt;/strong&gt;: &lt;a href="http://bennolan.com/biscuit/tutorial.html"&gt;Creating a simple application using the Biscuit &lt;span class="caps"&gt;MVC&lt;/span&gt; framework&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Official Description:&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;&amp;#8220;The mission of this project is to port Ruby on Rails to PHP5 (minus the Ruby part ;-)&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PROs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Zero configuration, easy to deploy&lt;/li&gt;
	&lt;li&gt;Runs both on PHP4 and PHP5&lt;/li&gt;
	&lt;li&gt;Simple to learn&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;CONs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Still under development and incomplete&lt;/li&gt;
	&lt;li&gt;Offers a limited subset of the features and functionalities offered by competitors: no internationalization, no table associations, no scaffolding&amp;#8230;&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;&amp;#8220;Documentation coming soon&amp;#8221;&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;Almost non-existent community&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;br /&gt;
This project started as an attempt to create something simpler than CakePHP and more similar to Rails. I&amp;#8217;m not sure whether the project is still active or not, since the last &amp;#8220;release&amp;#8221; on the former&amp;#8217;s developer site is dated August 2005. Still in early stage &amp;#8211; or dead.&lt;/p&gt;
&lt;h3&gt;Pipeline&lt;/h3&gt;
&lt;p style="float:right;"&gt;&lt;img src="/img/pictures/livepipe.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="http://livepipe.net/pipeline/"&gt;livepipe.net/pipeline/&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; version:&lt;/strong&gt; PHP5&lt;br /&gt;
&lt;strong&gt;License:&lt;/strong&gt; Pipeline&lt;sup class="footnote" id="fnr9"&gt;&lt;a href="#fn9"&gt;9&lt;/a&gt;&lt;/sup&gt;&lt;br /&gt;
&lt;strong&gt;Download size (.zip):&lt;/strong&gt; 288KB&lt;br /&gt;
&lt;strong&gt;Supported Databases:&lt;/strong&gt; SQLite&lt;br /&gt;
&lt;strong&gt;Beginner&amp;#8217;s Tutorial&lt;/strong&gt;: none&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PROs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Simple directory structure&lt;/li&gt;
	&lt;li&gt;Suitable for small projects&lt;/li&gt;
	&lt;li&gt;Comes with various ready-made components&lt;/li&gt;
	&lt;li&gt;Supports table relationships&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;CONs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;PHP5-only&lt;/li&gt;
	&lt;li&gt;Too restrictive: only SQLite supported, &lt;em&gt;kindly suggests&lt;/em&gt; developers to use its built-in features only&lt;/li&gt;
	&lt;li&gt;No documentation or tutorials, just the &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;Not suitable for large projects&lt;/li&gt;
	&lt;li&gt;Almost non-existent community&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;br /&gt;
This project mainly borrowed the &lt;span class="caps"&gt;MVC&lt;/span&gt; architecture and some basic concepts from Rails, creating a simple PHP5 framework with personal/small websites in mind: it offers various built-in components which can be handy to most of us, supports &lt;em&gt;only&lt;/em&gt; SQLite, and basically tells developers what to do. In my opinion it&amp;#8217;s not flexible enough to be compared to the others, and it&amp;#8217;s simply not suitable for anything other than small websites.&lt;/p&gt;
&lt;h3&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;My favorite framework still remains CakePHP, it&amp;#8217;s simple and yet powerful, easy to learn and use, mature, well supported and continuously improving. Symfony &amp;#8211; at the moment &amp;#8211; seems to be the one with most features and the best documentation, and it is an excellent and well supported project. The only problem I have with it is the scary amount of configuration files necessary to create an application: CakePHP doesn&amp;#8217;t need any and can be used for (almost?) equally complex projects.&lt;br /&gt;
Although I didn&amp;#8217;t have a chance to try them out, &lt;span class="caps"&gt;PHP&lt;/span&gt; on Trax is certainly the most faithful port of Ruby on Rails to &lt;span class="caps"&gt;PHP&lt;/span&gt;, but it lacks some of the features CakePHP and Symfony offer. Code Igniter may not be as advanced as the others, but its community seems to grow and its simplicity may appeal more users in the future&amp;#8230;&lt;/p&gt;
&lt;p&gt;At any rate, developers should &lt;em&gt;always&lt;/em&gt; choose the best framework for their needs: I tried to write a quick comparative analysis of these six Rails&amp;#8217; &amp;#8220;&lt;span class="caps"&gt;PHP&lt;/span&gt; children&amp;#8221;, now it&amp;#8217;s &lt;em&gt;your&lt;/em&gt; turn, try out some of them, if you choose wisely you won&amp;#8217;t be disappointed.&lt;/p&gt;
&lt;h3&gt;Notes&lt;/h3&gt;
&lt;p class="footnote" id="fn1"&gt;&lt;a href="#fnr1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; They are all distributed according to various Open Source licenses.&lt;/p&gt;
&lt;p class="footnote" id="fn2"&gt;&lt;a href="#fnr2"&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt; &lt;a href="http://www.rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; &amp;#8211; Ruby framework for web development&lt;/p&gt;
&lt;p class="footnote" id="fn3"&gt;&lt;a href="#fnr3"&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt; &lt;a href="http://www.cakephp.org"&gt;CakePHP&lt;/a&gt; &amp;#8211; Rapid [&lt;span class="caps"&gt;PHP&lt;/span&gt;] Development Framework&lt;/p&gt;
&lt;p class="footnote" id="fn4"&gt;&lt;a href="#fnr4"&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt; &lt;a href="/articles/view/cakephp"&gt;CakePHP &amp;#8211; A &amp;#8216;tasty&amp;#8217; solution for &lt;span class="caps"&gt;PHP&lt;/span&gt; programming&lt;/a&gt;, originally published on &lt;a href="http://www.zzine.org/articles/cakephp"&gt;zZine Magazine&lt;/a&gt;&lt;/p&gt;
&lt;p class="footnote" id="fn5"&gt;&lt;a href="#fnr5"&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt; Open Source &lt;a href="http://www.opensource.org/licenses/mit-license.php"&gt;&lt;span class="caps"&gt;MIT&lt;/span&gt; License&lt;/a&gt;.&lt;/p&gt;
&lt;p class="footnote" id="fn6"&gt;&lt;a href="#fnr6"&gt;&lt;sup&gt;6&lt;/sup&gt;&lt;/a&gt; Symfony License:&lt;br /&gt;
&lt;small&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
Copyright &amp;#169; 2004-2006 Fabien Potencier&lt;br /&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &amp;#8220;Software&amp;#8221;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:&lt;/p&gt;
&lt;p&gt;The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;THE&lt;/span&gt; &lt;span class="caps"&gt;SOFTWARE&lt;/span&gt; IS &lt;span class="caps"&gt;PROVIDED&lt;/span&gt; &amp;#8220;AS IS&amp;#8221;, &lt;span class="caps"&gt;WITHOUT&lt;/span&gt; &lt;span class="caps"&gt;WARRANTY&lt;/span&gt; OF &lt;span class="caps"&gt;ANY&lt;/span&gt; &lt;span class="caps"&gt;KIND&lt;/span&gt;, &lt;span class="caps"&gt;EXPRESS&lt;/span&gt; OR &lt;span class="caps"&gt;IMPLIED&lt;/span&gt;, &lt;span class="caps"&gt;INCLUDING&lt;/span&gt; &lt;span class="caps"&gt;BUT&lt;/span&gt; &lt;span class="caps"&gt;NOT&lt;/span&gt; &lt;span class="caps"&gt;LIMITED&lt;/span&gt; TO &lt;span class="caps"&gt;THE&lt;/span&gt; &lt;span class="caps"&gt;WARRANTIES&lt;/span&gt; OF &lt;span class="caps"&gt;MERCHANTABILITY&lt;/span&gt;, &lt;span class="caps"&gt;FITNESS&lt;/span&gt; &lt;span class="caps"&gt;FOR&lt;/span&gt; A &lt;span class="caps"&gt;PARTICULAR&lt;/span&gt; &lt;span class="caps"&gt;PURPOSE&lt;/span&gt; &lt;span class="caps"&gt;AND&lt;/span&gt; &lt;span class="caps"&gt;NONINFRINGEMENT&lt;/span&gt;. IN NO &lt;span class="caps"&gt;EVENT&lt;/span&gt; &lt;span class="caps"&gt;SHALL&lt;/span&gt; &lt;span class="caps"&gt;THE&lt;/span&gt; &lt;span class="caps"&gt;AUTHORS&lt;/span&gt; OR &lt;span class="caps"&gt;COPYRIGHT&lt;/span&gt; &lt;span class="caps"&gt;HOLDERS&lt;/span&gt; BE &lt;span class="caps"&gt;LIABLE&lt;/span&gt; &lt;span class="caps"&gt;FOR&lt;/span&gt; &lt;span class="caps"&gt;ANY&lt;/span&gt; &lt;span class="caps"&gt;CLAIM&lt;/span&gt;, &lt;span class="caps"&gt;DAMAGES&lt;/span&gt; OR &lt;span class="caps"&gt;OTHER&lt;/span&gt; &lt;span class="caps"&gt;LIABILITY&lt;/span&gt;, &lt;span class="caps"&gt;WHETHER&lt;/span&gt; IN AN &lt;span class="caps"&gt;ACTION&lt;/span&gt; OF &lt;span class="caps"&gt;CONTRACT&lt;/span&gt;, &lt;span class="caps"&gt;TORT&lt;/span&gt; OR &lt;span class="caps"&gt;OTHERWISE&lt;/span&gt;, &lt;span class="caps"&gt;ARISING&lt;/span&gt; &lt;span class="caps"&gt;FROM&lt;/span&gt;, &lt;span class="caps"&gt;OUT&lt;/span&gt; OF OR IN &lt;span class="caps"&gt;CONNECTION&lt;/span&gt; &lt;span class="caps"&gt;WITH&lt;/span&gt; &lt;span class="caps"&gt;THE&lt;/span&gt; &lt;span class="caps"&gt;SOFTWARE&lt;/span&gt; OR &lt;span class="caps"&gt;THE&lt;/span&gt; &lt;span class="caps"&gt;USE&lt;/span&gt; OR &lt;span class="caps"&gt;OTHER&lt;/span&gt; &lt;span class="caps"&gt;DEALINGS&lt;/span&gt; IN &lt;span class="caps"&gt;THE&lt;/span&gt; &lt;span class="caps"&gt;SOFTWARE&lt;/span&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;/small&gt;&lt;/p&gt;
&lt;p class="footnote" id="fn7"&gt;&lt;a href="#fnr7"&gt;&lt;sup&gt;7&lt;/sup&gt;&lt;/a&gt; Read the comments by David Heinemeier Hansson on &lt;a href="http://www.37signals.com/svn/archives/000606.php"&gt;Ruby on Rails to Basecamp&lt;/a&gt;&lt;/p&gt;
&lt;p class="footnote" id="fn8"&gt;&lt;a href="#fnr8"&gt;&lt;sup&gt;8&lt;/sup&gt;&lt;/a&gt; CodeIgniter &lt;a href="http://www.codeigniter.com/user_guide/license.html"&gt;License Agreement&lt;/a&gt;&lt;/p&gt;
&lt;p class="footnote" id="fn9"&gt;&lt;a href="#fnr9"&gt;&lt;sup&gt;9&lt;/sup&gt;&lt;/a&gt; Pipeline is licensed under the same terms as the Symfony framework [Copyright &amp;#169; 2006 Picora Pipeworks &lt;span class="caps"&gt;LLC&lt;/span&gt;].&lt;/p&gt;</description>
      <pubDate>Wed, 03 May 2006 06:57:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/rails-inspired-php-frameworks/</guid>
      <link>http://www.h3rald.com/articles/rails-inspired-php-frameworks/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/rails-inspired-php-frameworks/#comments</comments>
      <category>frameworks</category>
      <category>review</category>
      <category>cakephp</category>
      <category>rails</category>
    </item>
    <item>
      <title>Ten minutes on Rails (while eating Cake)</title>
      <description>&lt;p&gt;Today I decided to do something different, something I&amp;#8217;ve been dying to do since before coming across CakePHP: give Rails a &lt;em&gt;proper&lt;/em&gt; try. Like many other &lt;span class="caps"&gt;PHP&lt;/span&gt; developers out there, when &lt;a href="http://www.rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; came out I felt damn jealous and terribly tempted to learn Ruby &lt;em&gt;only&lt;/em&gt; to start using such an amazing web development framework. At the time I actually even started reading various tutorials about it, and I was literally amazed at how RoR revolutioned the way of developing web applications.&lt;/p&gt;
&lt;p style="float:left;"&gt;&lt;img src="http://base--/img/pictures/rails.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;One of the main problems which made me &amp;#8211; sadly &amp;#8211; abandon Rails was Ruby itself: personally I&amp;#8217;ve never seen a programming language with a cleaner and more elegant syntax, but also &amp;#8211; at least at the time &amp;#8211; there weren&amp;#8217;t many hosts supporting it. LuckilyI found CakePHP quickly after that&amp;#8230;&lt;br /&gt;
Now however, more and more hosting companies boast full Rails support, and so when recently I &lt;a href="http://base--/blog/view/21/"&gt;had to move&lt;/a&gt; to a new host, I made sure it was Rails-friendly, &lt;em&gt;just in case I wanted to give Rails another try, someday&lt;/em&gt;.&lt;br /&gt;
Oh well, the temptation was so strong that today, only a two days after switching to my new host, I felt I &lt;em&gt;had&lt;/em&gt; to try it, I &lt;em&gt;had&lt;/em&gt; to taste something different than the usual Cake.&lt;/p&gt;
&lt;p&gt;I decided to (re-)read and follow the &lt;a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html"&gt;OnLamp tutorial&lt;/a&gt; about RoR, step by step, once again. I quickly typed &lt;code&gt;rails cookbook&lt;/code&gt; from my shell and voil&amp;aacute;, rails silently creates the skeleton of my application:&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;README&lt;/span&gt;&lt;br /&gt;
Rakefile&lt;br /&gt;
app/&lt;br /&gt;
components/&lt;br /&gt;
config/&lt;br /&gt;
db/&lt;br /&gt;
doc/&lt;br /&gt;
favicon.ico&lt;br /&gt;
index.html&lt;br /&gt;
lib/&lt;br /&gt;
log/&lt;br /&gt;
public/&lt;br /&gt;
script/&lt;br /&gt;
structure.txt&lt;br /&gt;
test/&lt;br /&gt;
tmp/&lt;br /&gt;
vendor/&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s familiar: it&amp;#8217;s very similar to what CakePHP&amp;#8217;s directory structure used to look like. Now Cake &lt;em&gt;evolved&lt;/em&gt; and adopted its own schema, which &amp;#8211; I must say &amp;#8211; seems more functional than RoR&amp;#8217;s, at least at a first glance:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;app/
	&lt;ul&gt;
		&lt;li&gt;config/&lt;/li&gt;
		&lt;li&gt;controllers/&lt;/li&gt;
		&lt;li&gt;models/&lt;/li&gt;
		&lt;li&gt;plugins/&lt;/li&gt;
		&lt;li&gt;tmp/&lt;/li&gt;
		&lt;li&gt;vendors/&lt;/li&gt;
		&lt;li&gt;views/&lt;/li&gt;
		&lt;li&gt;webroot/&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;cake/
	&lt;ul&gt;
		&lt;li&gt;config/&lt;/li&gt;
		&lt;li&gt;docs/&lt;/li&gt;
		&lt;li&gt;libs/&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;vendors/&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="float:right;"&gt;&lt;img src="http://base--/img/pictures/cakephp.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Cake felt the necessity to divide what you can mess with (&lt;code&gt;app/&lt;/code&gt;, &lt;code&gt;vendors/&lt;/code&gt;) from what you&amp;#8217;d better not touch (&lt;code&gt;cake/&lt;/code&gt;). Rails just left everything on the same level.&lt;/p&gt;
&lt;p&gt;After creating my database and the necessary tables I have to edit &lt;code&gt;config/database.yml&lt;/code&gt;, which corresponds to Cake&amp;#8217;s &lt;code&gt;app/config/database.php&lt;/code&gt;. Then things start to become a bit different from Cake, as Rails offers some very handy built in scripts which can be used to automatically create your application&amp;#8217;s files, i.e. executing &lt;code&gt;ruby script/generate controller Recipe&lt;/code&gt; creates the controller and other bits:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;exists  app/controllers/
exists  app/helpers/
create  app/views/recipe
exists  test/functional/
create  app/controllers/recipe_controller.rb
create  test/functional/recipe_controller_test.rb
create  app/helpers/recipe_helper.rb&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And so on. Anyhow&amp;#8230; I followed the tutorial and yes, it was a nice read. CakePHP borrowed a lot from Rails but not everything. Inevitably Ruby&amp;#8217;s syntax is less verbose and looks very very clean:&lt;/p&gt;
&lt;p&gt;&amp;lt;% highlight :ruby do %&amp;gt;&lt;br /&gt;
class RecipeController &amp;lt; ApplicationController&lt;br /&gt;
	scaffold :recipe&lt;/p&gt;
&lt;p&gt;def list&lt;br /&gt;
		@recipes = Recipe.find_all&lt;br /&gt;
	end&lt;/p&gt;
&lt;p&gt;def edit&lt;br /&gt;
		&lt;code&gt;recipe = Recipe.find(&lt;/code&gt;params[&amp;#8220;id&amp;#8221;])&lt;br /&gt;
		@categories = Category.find_all&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;/p&gt;
&lt;p&gt;While CakePHP&amp;#8217;s, simply because it uses &lt;span class="caps"&gt;PHP&lt;/span&gt; and not Ruby, looks less pretty:&lt;/p&gt;
&lt;p&gt;&amp;lt;% highlight :php do %&amp;gt;&lt;br /&gt;
class RecipesController extends AppController&lt;br /&gt;
{&lt;br /&gt;
	var $scaffold;&lt;/p&gt;
&lt;p&gt;function list()&lt;br /&gt;
	{&lt;br /&gt;
		$this&amp;#8594;set(&amp;#8216;recipes&amp;#8217;, $this&amp;#8594;Recipe&amp;#8594;findAll());&lt;br /&gt;
	}&lt;/p&gt;
&lt;p&gt;function edit($id)&lt;br /&gt;
	{&lt;br /&gt;
		$this&amp;#8594;set(&amp;#8216;recipe&amp;#8217;, $this&amp;#8594;Recipe&amp;#8594;find(&amp;#8220;id = $id&amp;#8221;));&lt;br /&gt;
		$this&amp;#8594;set(&amp;#8216;categories&amp;#8217;, $this&amp;#8594;Category&amp;#8594;findAll());&lt;br /&gt;
	}&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;/p&gt;
&lt;p&gt;CakePHP Development Team did a great job translating some of Rails functionalities into &lt;span class="caps"&gt;PHP&lt;/span&gt;, and the while CakePHP&amp;#8217;s syntax is &lt;strong&gt;much&lt;/strong&gt; cleaner if compared to PHP&amp;#8217;s standard spaghetti-code approach, Ruby just looks much more clear, sorry. &lt;em&gt;Imagine a world without funny unnecessary brackets, pointless semicolons and where everything just looks better&lt;/em&gt;: that&amp;#8217;s Ruby.&lt;/p&gt;
&lt;p&gt;Sigh. Now I do understand why Rails was built in Ruby and not in &lt;span class="caps"&gt;PHP&lt;/span&gt;: simply because a PHP&amp;#8217;s Rails would have been outscored by its &amp;#8220;Ruby port&amp;#8221;!&lt;/p&gt;
&lt;p&gt;One thing I liked about Rails which has not been ported in Cake (yet) is a somehow smarter way of scaffolding. While the Ruby code above actually works, the CakePHP&amp;#8217;s edit method doesn&amp;#8217;t, or better, it does but not as expected: when you remove &lt;code&gt;var $scaffold&lt;/code&gt; the scaffold is just plain gone, and you have to code everything yourself, while in Ruby you can leave the scaffold and then develop methods one by one, and still be able to use scaffolded methods if you didn&amp;#8217;t define the custom ones.&lt;/p&gt;
&lt;p&gt;The other thing I noticed about RoR is that it definitely handles errors better! This is probably another language issue. I basically forgot to set a category for the recipes, and when executing my custom list of recipes I got a very, very well structured error page showing something like:&lt;/p&gt;
&lt;p&gt;&amp;lt;% highlight :ruby do %&amp;gt;&lt;br /&gt;
NoMethodError in Recipe#index&lt;/p&gt;
&lt;p&gt;Showing app/views/recipe/index.rhtml where line #18 raised:&lt;/p&gt;
&lt;p&gt;You have a nil object when you didn&amp;#8217;t expect it!&lt;br /&gt;
The error occured while evaluating nil.name&lt;/p&gt;
&lt;p&gt;Extracted source (around line #18):&lt;/p&gt;
&lt;p&gt;15:  &amp;lt;% @recipes.each do |recipe| &lt;span&gt;&amp;gt;&lt;br /&gt;
16:   &lt;tr&gt;&lt;br /&gt;
17:    &lt;td&gt;&amp;lt;&lt;/span&gt;= link_to recipe.title, :action =&amp;gt; &amp;#8220;show&amp;#8221;, :id =&amp;gt; recipe.id &lt;span&gt;&amp;gt;&lt;/td&gt;&lt;br /&gt;
18:    &lt;td&gt;&amp;lt;&lt;/span&gt;= recipe.category.name &lt;span&gt;&amp;gt;&lt;/td&gt;&lt;br /&gt;
19:    &lt;td&gt;&amp;lt;&lt;/span&gt;= recipe.date &lt;span&gt;&amp;gt;&lt;/td&gt;&lt;br /&gt;
20:   &lt;/tr&gt;&lt;br /&gt;
21:  &amp;lt;&lt;/span&gt; end &lt;span&gt;&amp;gt;&lt;br /&gt;
&amp;lt;&lt;/span&gt; end %&amp;gt;&lt;/p&gt;
&lt;p&gt;I took a screenshot of the page, because it was too nice: &lt;a href="http://base--/img/pictures/rails_error.jpg"&gt;check it out&lt;/a&gt;. This error page really tells you what&amp;#8217;s wrong, and even prints the lines of code around the error! It also lets the developer check the full backtrace and every sort of information&amp;#8230; Can we have this in CakePHP please? I actually started to develop something like this, but seemed quite hard to do in &lt;span class="caps"&gt;PHP&lt;/span&gt;.&lt;/p&gt;</description>
      <pubDate>Sat, 29 Apr 2006 07:29:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/22/</guid>
      <link>http://www.h3rald.com/articles/22/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/22/#comments</comments>
      <category>cakephp</category>
      <category>rails</category>
      <category>webdevelopment</category>
    </item>
  </channel>
</rss>

