Start learning rails again

Source: Internet
Author: User

Web is impacting us all the time. Do we need to consider it carefully as a web application developer?

Rails, as a new generation of rapid development framework, has brought us too many surprises. streamlined, which is developed based on rails, can be achieved with a simple command.

At the beginning of the business, it was very hard to show the weak, maybe buying a vs2005 will bring us a heavy burden, why do we not consider using rails? The technical threshold may be one of the main reasons. Now, I want to learn from this process by taking advantage of the current capital. Maybe Web2.0 can bring us a very good opportunity ......

Today, I used feedtools to do a small experiment on RSS reader, hoping to make it a good start.

First, install feedtools and gem install feedtools.

Generate the Controller class, Ruby script/generate rssreader, generate rss_reader_controller, and add the index method to it. The result is as follows:

Require'Feed _ tools'

 

ClassRssreadercontroller <applicationcontroller


DefIndex


@ Slashdot_feed= Feedtools: feed. Open ('Http: // www.cnblogs.com/rss.aspx')


End

End

 

Add index. rhtml. The result is as follows:

<% =@ Slashdot_feed. Title %><Br>

<% =@ Slashdot_feed. Description %><Br>

<% for feed in
@ slashdot_feed . items %>

<Href="<% = Feed. Link %>"
Target="_ Blank"><% = Feed. Title %></A> <br>

<% = Feed. Description %><Br>

<%End%>

 

In this way, a simpleRSSReader, isn't it nice?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.