[ANN] New RubyGarden article: "Reflections on Rails"

Discussion in 'Ruby' started by Chad Fowler, Oct 27, 2004.

  1. Chad Fowler

    Chad Fowler Guest

    Rubyists,

    Hot on the heels of his RubyGarden FAQ rewrite and the release of a
    new and improved RCRchive.net comes an article by David A. Black on
    his experiences with Rails (http://www.rubyonrails.org), which he used
    to develop both of these applications.

    Check it out at http://www.rubygarden.org.

    I hope this to be the first in a long stream of articles, tutorials,
    and interviews to grace the pages of RubyGarden.org.

    If you're interested in writing an article or have an idea you'd
    like to see covered, please contact me directly. I'm hoping to soon
    establish a rhythm of regular new content on the site. Don't be
    surprised if I hit some of you up directly for new content (some of
    you have already been tapped). :)

    --
    Chad Fowler
    http://chadfowler.com
    http://rubycentral.org
    http://rubygarden.org
    http://rubygems.rubyforge.org (over 20,000 gems served!)
    Chad Fowler, Oct 27, 2004
    #1
    1. Advertising

  2. Great article!

    One comment:

    > def search
    > terms = @params['search']['terms'].scan(/"(.*?)"|([^"\s]+)/).
    > flatten.compact
    > cond = "body LIKE '%#{terms[0]}%' "
    > cond << terms[1..-1].map {|t| " AND body LIKE '%#{t}%'"}.join("")
    > @results = Entry.find_all(cond)
    > end
    >
    > But most of the scrappiness has to do with the piecing together of the
    > SQL condition. Once all that is in place, the last line of the method
    > body does everything that’s needed to prepare the environment for the
    > view. (Note: readers are invited to send me ideas for cleaner ways to
    > generate that multiple condition line!)


    For the one bit I unerstand, how about:
    def search
    terms =
    @params['search']['terms'].scan(/"(.*?)"|([^"\s]+)/).flatten.compact
    @results = Entry.find_all terms.map{ |t| "body LIKE '%#{t}%'"
    }.join( ' AND ' )
    end
    Gavin Kistner, Oct 27, 2004
    #2
    1. Advertising

  3. Chad Fowler

    Bil Kleb Guest

    Chad Fowler wrote:
    >
    > Hot on the heels of his RubyGarden FAQ rewrite and the release of a
    > new and improved RCRchive.net comes an article by David A. Black on
    > his experiences with Rails (http://www.rubyonrails.org), which he used
    > to develop both of these applications.
    >
    > Check it out at http://www.rubygarden.org.


    Black writes:

    Reworking the FAQ site was on Chad’s to-do list, and finding
    an enjoyable and useful Rails project was on mine. So I took
    on the FAQ.

    This got me thinking: Does anyone want to put our project's site,

    http://fun3d.larc.nasa.gov

    on Rails? It's on my to-do list. :)

    In it's current state it is nearly impossible to change; and to
    a certain extent, embarrassing.

    Regards,
    --
    Bil Kleb, Hampton, Virginia
    Bil Kleb, Oct 27, 2004
    #3
  4. Chad Fowler ha scritto:

    > Rubyists,
    >
    > Hot on the heels of his RubyGarden FAQ rewrite and the release of a
    > new and improved RCRchive.net comes an article by David A. Black on
    > his experiences with Rails (http://www.rubyonrails.org), which he used
    > to develop both of these applications.
    >
    > Check it out at http://www.rubygarden.org.



    lovely to hear! thank you all for this.
    Anyway, a question: there is a chance to have a comment system on
    rubygarden? IIRC some time ago there was talkingabout a rublog patch to
    allow that.
    gabriele renzi, Oct 27, 2004
    #4
  5. Chad Fowler

    Hal Fulton Guest

    Bil Kleb wrote:
    >
    > This got me thinking: Does anyone want to put our project's site,
    >
    > http://fun3d.larc.nasa.gov
    >
    > on Rails? It's on my to-do list. :)
    >
    > In it's current state it is nearly impossible to change; and to
    > a certain extent, embarrassing.


    It's not that bad. The graphics have got the jaggies. Definitely
    a super-nerd site. :)

    I'm wondering, is this a place where Rails could really shine? I
    mean, it's mostly static HTML, isn't it?

    If so, then Rails is even more interesting than I thought...
    personally I have not yet jumped on the bandwagon, though I trust
    the people who tell me how cool it is.


    Hal
    Hal Fulton, Oct 27, 2004
    #5
  6. Chad Fowler

    Bil Kleb Guest

    Railing the FUN3D website (was Re: [ANN] New RubyGarden article:"Reflections on Rails")

    Hal Fulton wrote:
    > Bil Kleb wrote:
    >>
    >> This got me thinking: Does anyone want to put our project's site,
    >>
    >> http://fun3d.larc.nasa.gov
    >>
    >> on Rails?

    >
    > I'm wondering, is this a place where Rails could really shine?


    I don't know.

    I am thinking that at least the frozen-in-stone nav bar might
    be thawed, that a simple content insertion mechism for gallery
    items might be possible, that the RSS commit feed might be better
    integrated, or that the users manual might be auto-generated
    from some marked-up text.

    > I mean, it's mostly static HTML, isn't it?


    It's all static HTML because that's really all we know or
    seem to have time for.

    Regards,
    --
    Bil Kleb, Hampton, Virginia
    Bil Kleb, Oct 27, 2004
    #6
  7. Chad Fowler

    Bill Atkins Guest

    Re: Railing the FUN3D website (was Re: [ANN] New RubyGarden article: "Reflections on Rails")

    My impression was that Rails was best for database-intensive
    applications. Is this true? If Rails would indeed be appropriate for
    a static website, then I might start to look into it.

    Bill


    On Thu, 28 Oct 2004 05:22:19 +0900, Bil Kleb <> wrote:
    > Hal Fulton wrote:
    > > Bil Kleb wrote:
    > >>
    > >> This got me thinking: Does anyone want to put our project's site,
    > >>
    > >> http://fun3d.larc.nasa.gov
    > >>
    > >> on Rails?

    > >
    > > I'm wondering, is this a place where Rails could really shine?

    >
    > I don't know.
    >
    > I am thinking that at least the frozen-in-stone nav bar might
    > be thawed, that a simple content insertion mechism for gallery
    > items might be possible, that the RSS commit feed might be better
    > integrated, or that the users manual might be auto-generated
    > from some marked-up text.
    >
    > > I mean, it's mostly static HTML, isn't it?

    >
    > It's all static HTML because that's really all we know or
    > seem to have time for.
    >
    > Regards,
    > --
    > Bil Kleb, Hampton, Virginia
    >
    >
    Bill Atkins, Oct 27, 2004
    #7
  8. Chad Fowler

    Chad Fowler Guest

    On Wed, 27 Oct 2004 20:29:02 +0900, gabriele renzi
    <> wrote:
    > Chad Fowler ha scritto:
    >
    > > Rubyists,
    > >
    > > Hot on the heels of his RubyGarden FAQ rewrite and the release of a
    > > new and improved RCRchive.net comes an article by David A. Black on
    > > his experiences with Rails (http://www.rubyonrails.org), which he used
    > > to develop both of these applications.
    > >
    > > Check it out at http://www.rubygarden.org.

    >
    >
    > lovely to hear! thank you all for this.
    > Anyway, a question: there is a chance to have a comment system on
    > rubygarden? IIRC some time ago there was talkingabout a rublog patch to
    > allow that.
    >
    >


    I can't promise anything soon, but it's on the list.

    Chad

    --

    Chad Fowler
    http://chadfowler.com
    http://rubycentral.org
    http://rubygarden.org
    http://rubygems.rubyforge.org (over 20,000 gems served!)
    Chad Fowler, Oct 28, 2004
    #8
  9. Chad Fowler

    vruz Guest

    Re: Railing the FUN3D website (was Re: [ANN] New RubyGarden article: "Reflections on Rails")

    > I am thinking that at least the frozen-in-stone nav bar might
    > be thawed, that a simple content insertion mechism for gallery
    > items might be possible, that the RSS commit feed might be better
    > integrated, or that the users manual might be auto-generated
    > from some marked-up text.


    Sounds more like a job for Ruwiki.
    http://rubyforge.org/projects/ruwiki/

    The latest tarball there is release 0.7 which is a bit dated now.

    Ruwiki is very extensible, supports definition of new markup and
    pluggable storage backends. (you can code a database storage plugin
    very quickly)

    Austin Ziegler has reported he's about to release 0.9 soon, and it
    seems like it's well worth the wait.
    I can't access his website right now, it's probably under maintenance.
    Perhaps you can have a look at
    http://www.halostatue.ca/blog/index.cgi/Tech/Ruby/Ruwiki
    later, and see if it works.

    best,
    vruz
    vruz, Oct 30, 2004
    #9
  10. Re: Railing the FUN3D website (was Re: [ANN] New RubyGarden article: "Reflections on Rails")

    On Sat, 30 Oct 2004 09:49:45 +0900, vruz <> wrote:
    > > I am thinking that at least the frozen-in-stone nav bar might
    > > be thawed, that a simple content insertion mechism for gallery
    > > items might be possible, that the RSS commit feed might be better
    > > integrated, or that the users manual might be auto-generated
    > > from some marked-up text.

    > http://www.halostatue.ca/blog/index.cgi/Tech/Ruby/Ruwiki


    I am working on a proper redirect, but this will be:

    http://www.halostatue.ca/blog.cgi/Tech/Ruby/Ruwiki

    -austin
    --
    Austin Ziegler *
    * Alternate:
    : as of this email, I have [ 5 ] Gmail invitations
    Austin Ziegler, Oct 30, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Swapnajit Mittra
    Replies:
    0
    Views:
    453
    Swapnajit Mittra
    Aug 1, 2005
  2. Chad Fowler

    [ANN] RubyGarden FAQ Revival

    Chad Fowler, Oct 22, 2004, in forum: Ruby
    Replies:
    8
    Views:
    93
    Mark Hubbart
    Oct 23, 2004
  3. Chad Fowler
    Replies:
    34
    Views:
    368
    Mohammad Khan
    Nov 15, 2004
  4. Chad Fowler

    [ANN] new Og tutorial on RubyGarden

    Chad Fowler, Mar 2, 2005, in forum: Ruby
    Replies:
    2
    Views:
    88
    George Moschovitis
    Mar 2, 2005
  5. James Britt
    Replies:
    1
    Views:
    92
    Bill Guindon
    Mar 20, 2006
Loading...

Share This Page