Rails on Campus: 华农版 - Session #3

The excellent students at South China Agriculture University

Rails on Campus Roundup / Rails on Campus 大聚集


Last Saturday we concluded the Rails on Campus: 华农版 (SCAU) program with session #3. We wish to thank Dean Song, Professor Sun, and all the students who took the time to attend. We really appreciate working with such amazing students, and we were very happy to be able to come to your school.

上周六我们在华农顺利地进行了Rails on Campus 第三期活动。在此非常感谢宋主任,孙教授以及所有到场的学生。 真的很难得可以跟这么多这么优秀的学生一起分享和学习, 我们也很高兴能够来到你们学校。

And special congratulations to 欧振聪 Clarence Au (@onionou) the winner of our coding competition!

同时,我们在这里恭喜欧振聪同学@onionou赢了我们组织的这场代码比赛!

Over the course of 3 sessions, we've introduced the students to the basics of Rails, and hopefully they will be able to keep learning about Rails and ruby. To recap, here's what we've gone over:

通过这三次活动,我们向学生们分享了一些Rails的基本知识,希望他们可以在课余时间继续学习Rails和Ruby。概括一下,我们谈及的有以下方面的话题:

  • Getting the Rails environment - RailsInstaller.org, ruby-lang.org, SublimeText
  • Basic ruby syntax - messages.each {|m| puts m}, hash = {:key1=>'val1'}
  • Creating a new Rails app from scratch - rails new miniblog
  • Using scaffolding to get started quickly - rails generate scaffold message body:text
  • Creating associations between models - message: has_many :replies, reply: belongs_to :message
  • Using Rails view helpers to build forms - form_for [:message, Reply.new]
  • How to access the Rails session - session[:user_id]
  • Writing filters to manage authentication - before_filter :require_login
  • Custom routes for easy URLs - match 'login' => 'sessions#new'
  • Deploy your app to share with the world - heroku, DotCloud

The result of our work in class should be a working miniblog that you can share with your friends. Anyone can login, post messages, and reply to other users' messages.

在课堂上我们的练习任务是:创建一个miniblog, 通过这个miniblog 你可以跟朋友分享,每个人都可以登录, 发表信息同时也可以回复其他用户的信息。

We'd love to see you continue with your code. Add more features, improve the design, and put it up on heroku! Make sure to let us know via the Rails on Campus Weibo account.

我们非常希望你们可以继续写代码,让你的miniblog变得更好。 增加更多的功能,做更好的设计,然后放上heroku! 在微博上@RailsOnCampus 展示你的成果吧!

We also would appreciate any feedback, so please let us know how we can make the event go more smoothly next time, or if there's anything else we should cover. We hope to take this program to other universities in the area, and perhaps come back to SCAU for a second season next year.

欢迎对我们的活动提出您的宝贵意见! 这对我们很重要,希望我们下一次可以组织得更好,活动开展得更顺利。如果你有感兴趣的话题希望我们可以分享,欢迎给我们来信! 我们希望到广州更多的大学去分享,可以的话也希望明年回到华农分享更多有趣的话题!

Session #3 / 第三届


The third session in our program focused on completing the feature set to make our miniblog a full web application. Of course we needed a way for users to log in, so that we know who says what. To that end, we went over how to track user sessions, and how to use before_filters to manage users and make sure they log in when they need to.

在第三期我们会分享一些关于如何给我们的miniblog添加新功能新应用,使其变成一个更加完整的网络应用。 首先,我们必须想个办法让用户可以登录,这样我们才知道谁说了什么。然后我们也分享了如何去追踪用户及其发表的信息,以及如何使用before_filters 去管理用户,让他们在必要时进行登录。

Links:


Rails on Campus is a program started by Leon Du and Shaokun Wu, 2 ruby developers in Guangzhou, China. The idea is to build a good set of material for introduction courses that can be used to teach Rails on college campuses. College students are often not exposed to the latest development techniques, and are left to learn on the job. The goal of this program is to introduce students to the world of open source development frameworks to help prepare them for a good job.

Rails on Campus是由中国广州两位Ruby 开发者, Leon Du和伍少坤发起的。活动的初衷是为大学Rails的教学积淀一些有价值的学习材料。大学学生接触新技术的机会不十分多,而常常要上到工作岗位才开始学习。希望通过这次活动,可以为同学们带来更多开源的开发框架,以此为将来的好工作更好地准备自己。

Rails on Campus is sponsored by:

Rails on Campus的赞助团队有:

Posted by adevadeh 08 Dec 2011 at 04:08AM


Rails on Campus: 华农版

Last week we had our first Rails on Campus session at the South China Agriculture University (华南农业大学). We had an excellent turnout of 50 or 60 top-notch students. We were really impressed with their knowledge of web development in general, and their enthusiasm to learn new things.

上周末我们 Rails on Campus的第一次活动在华南农业大学展开了。大家反应热烈,有5,60个学生参加了我们的活动。同学们对知识的渴望给我们留下了深刻的印象,参加的同学基础知识也非常不错。

The first session focused on:

第一部分内容概要:

  • Setting up the Rails environment on your computer
  • Learning about the origin of Rails and ruby
  • Creating a new Rails app from the command line and adding a simple scaffold

We built a working web app as a demo in about 10 minutes, starting from rails new and finishing with a nice looking miniblog.

The only problem was the recent issues we've been having accessing rubygems from China. This made it very difficult for the students to get a Rails environment working on their own laptop. We hope to have a good solution for this problem before the next session.

For our next session, we'll continue to build on the same application by adding a reply feature.

Here are the links from session #1

这里有一些第一部分学习的相关链接:

---

Rails on Campus is a program started by Leon Du and Shaokun Wu, 2 ruby developers in Guangzhou, China. The idea is to build a good set of material for introduction courses that can be used to teach Rails on college campuses. In Guangzhou, and many other areas around the world, college students are often not exposed to newer technology, and are left to learn on the job. The goal of this program is to introduce students to a new world of open source development frameworks that are quite popular around the world. Not just Rails, but also things like Node.js or Python/Django.

Rails on Campus是由中国广州两位Ruby 开发者, Leon Du和Shaokun Wu 发起的。活动的初衷是为大学Rails的教学积淀一些有价值的学习材料。在广州,以及世界的一些其他的城市,大学学生接触新技术的机会不十分多,而常常要上到工作岗位才开始学习。希望通过这次活动,可以为同学们带来更多热门的开源的开发框架,以此为将来的好工作更好地准备自己。不单单是Rails,以后我们可能还会涉及到像 Node.js 或者 Python/Django 这样话题。

Rails on Campus is sponsored by:

Rails on Campus的赞助团队有:

+ gzruby - The Guangzhou Ruby Group http://gzruby.org/list
+ Kudelabs http://kudelabs.com
+ Beansmile http://beansmile.com

Posted by adevadeh 17 Nov 2011 at 03:15AM


Rails on Campus Wrap-up

After 2 great sessions of Rails on Campus: 华工版, we'd like to thank everyone who took part in helping to plan and organize this event. We learned a lot from the experience, and we hope the attendees did as well. We plan to take our materials from this first run, refactor, and put on a better program next year!

Before we close out for the year though, I wanted to go over what you can do to continue learning on your own.

Install Rails

http://railsinstaller.org - Download and run the installer. It will install everything you need to get started writing your own Rails apps (ruby, git, rubygems, rails).

Get the demo code

http://github.com/kudelabs/roc-demo2 - Clone the project and get it running on your computer .

git clone git://github.com/kudelabs/roc-demo2.git 
cd roc-demo2
rake db:migrate
rails s
open http://localhost:3000

Write some code

http://notepad-plus-plus.org/ - You can use any text editor to write code, but its much easier in a real code editor like Notepad++. It's free, give it a try.
http://http://guides.rubyonrails.org/getting_started.html - Take a look at the Rails Guides for more in-depth tutorials
http://asciicasts.com - Another great resource with tons of tips and information

Share with the world

http://heroku.com - A free service to host your amazing Rails app! It works right from the command line and in 5 minutes you have a public site that you can show to anyone.

Just Do It

So now you have no excuse. You have the tools, you have the code, you have the servers. Go write an inspiring app and make us proud!

Posted by adevadeh 09 Jun 2011 at 09:24AM


Rails on Campus: 华工版 - Session 1

The first Rails on Campus session went very well last saturday, with around 50 budding rubyists in attendance. We went over the history and purpose of Ruby and then Rails, and then did a live demo of: Build your own miniblog in 20 min.

Rails on Campus 上周六的活动开展得非常顺利,大约50名对Ruby感兴趣的同学参加了此次活动。我们对Ruby 和Rails 的历史以及意义都作了简单的阐述,并且现场做了一个迷你演示:怎么样在20分钟内建一个属于你微博。 :)

Since we didn't have wifi at the venue, it was hard to show all the links and make sure students could write them all down, so here's a list of important links:

由于我们现场没有wifi设备,很难向大家展示所有的链接,同时也考虑到可能一些同学也来不及记下来。 大家不妨看看以下关键的链接,可以更好地理解我们分享的内容:

Thanks to everyone involved, and to all the attendees. We all look forward to working together again next week!

非常感谢到场的每位同学以及工作人员,让我们一起期待下一次的活动!

Posted by adevadeh 09 May 2011 at 11:05AM


railscasts to help you become a ruby ninja

click here to read the Chinese vesion of this article
点击这里浏览本篇文章的中文版

As the popularity of Rails grows, the number of resources available to learn Rails also grows. One of the best methods that has come about is the use of Screencasts. Screencasts are movies that show the code as you listen to the presenter explain the concepts. Often, they go over material that can be found in books. But presented in this way, it might sink in a little better as you use 2 of your senses to absorb the material.

First, there is a set of excellent FREE screencasts from Ryan Bates at http://railscasts.com. These are short and to the point, often highlighting a new feature. You can have them download to your computer automatically through iTunes (except in China where Feedburner is blocked), or you can download them directly from the website. There is a set dedicated to the new features of Rails 2.1 that deserves to be checked out.

Second, the father of screencasts, @topfunky a.k.a Geoffrey Grosenbach has put together a great set of training materials at peepcode.com. They are not free, but quite affordable at $9 per cast. They are well done, informative, and full of great examples. We have used them to get up to speed on new versions of Rails, and downloaded some of the PDF books. I highly recommend these materials to get more familiar with Rails.

Rails runs on Ruby, and I have found a good set of screencasts that goes into how to program with Ruby. Dave Thomas of The Pragmatic Programmers (author of Agile Web Development with Rails) goes through the basics of the Ruby object model, class inheritance, and meta-programming. This will help you take advantage of the power inherent in Ruby and give you the foundation to understand the Rails framework. These screencasts are $5 each.

If you are interested in Rails and Ruby, I highly recommend using the resources available on the web. Of course you will need to download the tools and start coding yourself as well!

Happy Hacking!

Posted by adevadeh 16 Jun 2008 at 06:47PM



>