Backend web dev in Ruby on Rails

From Noisebridge
Jump to navigation Jump to search

This is a weekly seminar and workshop for folks to learn everything about Ruby, Rails, and web application development.

We meet Tuesdays 7pm-9pm in the Church room.

Approximately half of our lessons are on Ruby, and half Rails.

New students, to prepare for the Ruby lessons, please have Ruby 1.9.3 installed on your machine.

New students, to prepare for the Rails lessons, please follow this great, actively maintained Railsbridge guide -- http://installfest.railsbridge.org/installfest/installfest . Then create a blog app by completing this tutorial -- http://guides.rubyonrails.org/getting_started.html . (we will build off the blog app extensively)

Student, teachers, TA's needed and welcome!

Join the google group here: https://groups.google.com/group/starmonkeys . And visit our class website at http://www.railsschool.org .

Use the google group or Discussion view of this page to ask questions or suggest ideas!

And be sure to check out Jeremy's awesome front-end class that meets Mondays: https://www.noisebridge.net/wiki/Frontend_Web_Development .


Class 2/5: Rails and TDD. Testing with RSPEC and Capybara

What is the concept of TDD and how does it work in Rails and Capybara.

TDD -> Test-driven development. Capybara -> Capybara is an integration testing tool for rack based web applications.

Briefly take a look at these links:

About TDD - http://en.wikipedia.org/wiki/Test-driven_development

What Capybara is - http://en.wikipedia.org/wiki/Capybara

About Capybara - https://github.com/jnicklas/capybara

RSVP here - http://www.railsschool.org/l/rails-and-tdd-testing-with-rspec-and-capybara


Class 1/29: Popular Alternative Rails Configurations

What the rest of us use: Haml, Postgres, Rspec, and Plain Old Ruby Objects

The Rails default stack is generally sound, but some of its choices are controversial. Let's look at what Steve Klabnik calls the "Prime stack," the Rails stack preferred by many developers who are not DHH.

Please read Steve's post http://words.steveklabnik.com/rails-has-two-default-stacks for background.

We will play with Haml, Postgres (on Heroku), Rspec, and Plain Old Ruby Objects aka POROs (which may constitute a service layer).

There will be Google Hangout in order to include people unable to make it to Noisebridge. Check the http://www.railsschool.org/l/popular-alternative-rails-configurations/whiteboard at 7pm Pacific for the Hangout link.

RSVP here: http://www.railsschool.org/l/popular-alternative-rails-configurations


Class 1/22: Ruby 2: The Wrath of Kwarg

The first Ruby 2 release candidate is out, and the p0 is scheduled to ship in February. Let's play with it.

You may want to install Ruby 2 before class.

Check out http://rubysource.com/a-look-at-ruby-2-0/ for installation instructions and a review of the changes.

We will also be on Google Hangouts in order to include people unable to make it to Noisebridge. Check the http://www.railsschool.org/l/ruby-2-the-wrath-of-kwarg/whiteboard at 7pm Pacific for the Google Hangout link.

RSVP here: http://www.railsschool.org/l/ruby-2-the-wrath-of-kwarg


Class 1/15: Creating a twitter clone

Using rails to rapidly prototype twitter clone

Rails is so convenient that you can create a small twitter clone in a couple hours. You need to have rails installed, and know some basics

RSVP here - http://www.railsschool.org/l/creating-a-twitter-clone


Class 1/8: Rails 4 New Features

The first Rails 4 release candidate is just around the corner, let's check it out.

As for all our Rails lessons, please have completed http://guides.rubyonrails.org/getting_started.html in preparation, if you haven't already.

You might enjoy scanning the draft Rails 4.0 Release Notes, http://edgeguides.rubyonrails.org/4_0_release_notes.html before class.

We will also be on Google Hangouts in order to include people unable to make it to Noisebridge. Check the Etherpad aka Whiteboard at http://www.railsschool.org/l/rails-4-new-features/whiteboard at 7pm Pacific for the Google Hangout link.

RSVP here - http://www.railsschool.org/l/rails-4-new-features


Class 1/1/13: Catch-up Day III

An opportunity for new students to get personal help in meeting the class pre-requisites.

Relevant FAQ links

http://www.railsschool.org/faq#How_should_I_prepare_for_my_first_Ruby_lesson

http://www.railsschool.org/faq#How_should_I_prepare_for_my_first_Rails_lesson

For the first time ever, we're going to be on Google Hangouts in order to include people unable to make it to Noisebridge. Check the Etherpad aka Whiteboard (http://www.railsschool.org/l/catch-up-day-iii/whiteboard) at 7pm Pacific for the Google Hangout link.

RSVP here - http://www.railsschool.org/l/catch-up-day-iii


Class 12/18: Challenging Facebook API using Koala

Building an app using very convenient Koala gem to play with Facebook API.

Using very convenient Koala gem to play with Facebook API. Let's build a fun app during the class. Think about what fun apps we can build during our lesson? For example I was thinking about 1. an app that likes random posts on your friends feeds. 2. Shows your most liked photos

RSVP here - http://www.railsschool.org/l/challenging-facebook-api-using-koala


Class 12/11: Backends for Mobile Apps

We're going to use the Rails API gem to build a backend to support a mobile app.

Recommended viewing

The Rails API Gem by RailsCasts - http://railscasts.com/episodes/348-the-rails-api-gem

RSVP here - http://www.railsschool.org/l/backends-for-mobile-apps


Class 12/4: Improving UX and Performance with Turblinks and Pjax

Turbolinks and pjax are techniques that avoid page reloads when navigating a site.

Turbolinks can be added to an existing app with hardly any changes needed, and will be enabled by default in Rails 4.

Pjax is used by Github, for example, to allow users to quickly navigate repositories.

We will dust off our blog apps, turn on Turbolinks and observe the difference, then implement a little bit of pjax.

Please make sure your blog app is functioning.

Recommended viewing http://railscasts.com/episodes/294-playing-with-pjax http://railscasts.com/episodes/390-turbolinks

RSVP here - http://www.railsschool.org/l/improving-ux-and-performance-with-turblinks-and-pjax


Class 11/27: Backbone.js with Rails and creating an API for your app

Implementing hot frontend framework backbone.js in rails application. Creating API for your app. Homework -> Read: http://backbonejs.org/

RSVP here - http://www.railsschool.org/l/backbone-js


Class 11/20: Images: Instagram API with Ruby-On-Rails and Carrierwave gem

Make sure that you have Rails installed. Think about what kind of App we can build during our class with Instagram API Also would be good if you create Amazon Simple Storage Service (Amazon S3) (aws.amazon.com/s3/)

RSVP here - http://www.railsschool.org/l/instagram-api-with-ruby-on-rails


Class 11/13: Bootstrapping a Fresh Rails App

We'll take a break from our blogs and create a brand new app.

The goal is to learn the little gotchas associated with starting new projects as well as tips for getting up and running quickly.

Please complete http://guides.rubyonrails.org/getting_started.html in preparation.

RSVP here - http://rails-school.heroku.com/lessons/bootstrapping-a-fresh-rails-app


Class 11/6: Refactoring existing code

We're going to take a look at refactoring an existing Rails up. Learn how to improve your models, controllers and views.

Please complete http://guides.rubyonrails.org/getting_started.html beforehand.

RSVP here - http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/refactoring-existing-code


Class 10/30: Image Uploads in Rails with TDD

Please complete http://guides.rubyonrails.org/getting_started.html beforehand.

RSVP here - http://rails-school.heroku.com/lessons/image-uploads-in-rails-with-tdd


Class 10/23: Calculating π with Object-Oriented Ruby and Test-Driven Development

Let's use our favorite programming language to calculate one of our favorite irrationals.

You don't need Rails for this class; it's Ruby-only. Just bring a laptop with Ruby 1.9.

Suggested Preparation

http://tutorials.jumpstartlab.com/projects/ruby_in_100_minutes.html

http://blog.teamtreehouse.com/an-introduction-to-rspec

RSVP here- http://rails-school.heroku.com/lessons/calculating-with-object-oriented-ruby-and-test-driven-development


Class 10/16: How to prepare your Rails app for production

By choosing to build your web app in Rails, countless choices have been made for you that give you the best chance of a successful launch. Nevertheless, there are some details you will need to take care of on your own.

In this class, we will implement the minimum precautionary steps to ensure the performance and security of our Rails apps.

Please make sure you have completed the Getting Started guide at http://guides.rubyonrails.org/getting_started.html and be ready to hack on your blogs in class.

Recommended reading http://guides.rubyonrails.org/security.html http://guides.rubyonrails.org/caching_with_rails.html

RSVP here - http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/how-to-prepare-your-rails-app-for-production


Class 10/9: Sending email using background workers

In this class we will show how to send email using Rails. We will also utilize delayed_job gem to handle the actual email sending in the background.

Suggested reading:

ActiveMailer: http://guides.rubyonrails.org/action_mailer_basics.html

Delayed Job: https://github.com/collectiveidea/delayed_job

RSVP here - http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/sending-email-using-background-workers


Class 10/2: Etherpad Bots

Etherpads are the shared docs we take our class notes on.

Read about Etherpads here: http://etherpad.org/

We will target an Etherpad-Lite instance using Ruby. Visit https://github.com/jhollinger/ruby-etherpad-lite to get some ideas what might be possible.

RSVP here - http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/etherpad-bots


Class 9/25: Catch-up Day

We're going to use this class to catch up new students.

The two big things we want to accomplish:

a) bootstrapping your development environment - follow http://installfest.railsbridge.org/installfest/installfest

b) setting up a basic blog application - follow http://guides.rubyonrails.org/getting_started.html

To prepare for this class, get as far as you can in these two tutorials.

Experienced students please consider coming out to help troubleshoot. This class will be a looser format than usual, so everyone, please bring snacks! If there's interest, we will get beers at Shotwell's afterward to celebrate being caught up.

RSVP here: http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/catch-up-day--2


Class 9/18: Roll-your-own Chat App with the Goliath web server

Rails isn't perfect for interactive, real-time, scalable apps. Let's play with Goliath, a Ruby-based web server that is.

This is Ruby-only class for which no Rails experience is required.

However, please complete this small tutorial on EventMachine beforehand: http://rubysource.com/introduction-to-event-machine/

RSVP here - http://rails-school.heroku.com/lessons/roll-your-own-chat-app-with-the-goliath-web-server


Class 9/11: Scraping and Parsing the Web

The last resort when there is no API, scraping and parsing isn't much fun, but Ruby's got some great tools to alleviate the pain.

Please bring some sources you want to scrape as well as ideas for what to do with the scraped data.

The homework is to complete this tutorial on regular expressions:http://net.tutsplus.com/tutorials/ruby/ruby-for-newbies-regular-expressions/

Regular expressions are a must-know tool when you're parsing textual data:http://xkcd.com/208/

But they're not the right tool for every problem:http://www.codinghorror.com/blog/2008/06/regular-expressions-now-you-have-two-problems.html

This class is Ruby-only. New students that are Ruby newbies, please complete http://tutorials.jumpstartlab.com/projects/ruby_in_100_minutes.html before class. You don't need to know Rails are have completed the Rails getting started guide before attending Ruby-only classes like this one.

RSVP here: http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/scraping-and-parsing-the-web


Class 9/4: Hacking around Foursquare API with ruby

Lets learn how easy it is to use Foursquare API with ruby {should be easy:)}

Homework:

1. generate ideas about how to use foursquare API and what apps could be made with it. We will decide what app we are going to build at the beginning of the class.

2. Scan through Foursquare API documentation https://developer.foursquare.com/ to know what is possible and what is not

http://rails-school.heroku.com/lessons/hack-with-foursquare-api


8/28 Class: Self-posting Novelty Twitter Accounts

Let's create bots that make interesting tweets periodically

The homework is just to come up with a fun and simple idea for the tweets you want your bot to post. Also, register your novelty twitter username and a twitter app: http://dev.twitter.com . And make sure you have a heroku account set up.

We'll also have a Ruby 101 break-out group for people that are not ready to program twitter bots.

RSVP here: http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/self-posting-novelty-twitter-accounts


8/21 Class: Dive into ActiveRecord

We'll be taking a deeper look at what is ActiveRecord (since it's such a big part of Rails)

Suggested reading:

http://guides.rubyonrails.org/active_record_querying.html

http://guides.rubyonrails.org/association_basics.html

http://guides.rubyonrails.org/active_record_validations_callbacks.html

RSVP here: http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/activerecord


8/14 Class: Twitter API

Playing with twitter API to build fun apps

Highly Recommended Reading

The (Poignant) Guide to Ruby by _why

http://mislav.uniqpath.com/poignant-guide/

Twitter API docs: https://dev.twitter.com/docs/api

RSVP here - http://rails-school.heroku.com/lessons/ruby-api-s-and-gems



8/7 Class: Ruby, API's, and Gems

No Rails today; Ruby, Rest API's and Ruby Gems instead!

Highly Recommended Reading

The (Poignant) Guide to Ruby by _why

http://mislav.uniqpath.com/poignant-guide/

RSVP here - http://rails-school.heroku.com/lessons/ruby-api-s-and-gems


7/31 Class: Rails' Asset Pipeline

We'll look closely at asset organization, compilation, and packaging, and also check out SCSS and Coffeescript.

Required Viewing

Understanding the Asset Pipeline by RailsCasts

http://railscasts.com/episodes/279-understanding-the-asset-pipeline

RSVP here - http://rails-school.heroku.com/lessons/rails-asset-pipeline


7/24 Class: Fun with the Stripe payment API

We'll hook up Stripe's API in our blog apps.

Please sign up for Stripe ahead of time - https://manage.stripe.com/register

Here's a handy link to Stripe's API docs - https://stripe.com/docs

Required reading

How I Explained REST to My Wife by Ryan Tomayko

http://tomayko.com/writings/rest-to-my-wife

RSVP here - http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/fun-with-the-stripe-payment-api


7/17 Class: Catch-up Day

We're going to use this class to catch up new students.

The two big things we want to accomplish:

a) bootstrapping your development environment - follow http://installfest.railsbridge.org/installfest/installfest

b) setting up a basic blog application - follow http://guides.rubyonrails.org/getting_started.html

To prepare for this class, get as far as you can in these two tutorials.

Experienced students please consider coming out to help troubleshoot. This class will be a looser format than usual, so everyone, please bring snacks! If there's interest, we will get beers at Shotwell's afterward to celebrate being caught up.

RSVP here - http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/catch-up-day


7/10 Class: Continuous Integration with Travis

Intro to CI including configuring our apps to run on Travis-CI.

Please bring a Rails app that you've already pushed to Github.

Suggested reading:

Continuous Integration by Martin Fowler

http://martinfowler.com/articles/continuousIntegration.html

RSPV here: http://rails-school.heroku.com/lessons/continuous-integration-with-travis


7/3 Class: Playing with APIs

Where: 7pm-9pm Tuesday in the Church classroom

What: Using the Twitter API in your Rails app

Suggested reading:

http://guides.rubyonrails.org/getting_started.html (for new students)

https://dev.twitter.com/docs/api


RSVP here: http://rails-school.heroku.com/lessons/playing-with-apis


6/26 Class: Layouts and Rendering in Rails

Meeting as usual 7pm-9pm Tuesday in the Church classroom.

In this ambitious lecture-workshop, we're going to introduce how to organize layouts, partial, templates, etc in Rails.

Homework: 1. http://guides.rubyonrails.org/getting_started.html (for new students) 2. Scan through http://guides.rubyonrails.org/layouts_and_rendering.html 3. Also prepare some questions!! :)


RSVP here: http://rails-school.heroku.com/lessons/layouts-and-rendering-in-rails

Notes- http://rails-school.heroku.com/lessons/layouts-and-rendering-in-rails#whiteboard


6/19 Class: Test-Driven-Development and Sending Emails

In this ambitious lecture-workshop, we're going to introduce Test-Driven-Development, and apply it to sending emails from our blogs.

New students and others interested will have the option of learning Ruby 101 separately.

Homework: First make sure you've completed http://guides.rubyonrails.org/getting_started.html, we will continue to work off of this tutorial. Then get as far as you can in both of the following tutorials. Don't worry if you don't finish them.

Action Mailer Basics by RailsGuides

http://guides.rubyonrails.org/action_mailer_basics.html

Request Specs and Capybara by Railscasts

http://railscasts.com/episodes/257-request-specs-and-capybara

RSVP here:

http://rails-school.heroku.com/lessons/test-driven-development-and-sending-emails

Notes- http://rails-school.heroku.com/lessons/test-driven-development-and-sending-emails#whiteboard


6/12 Class: Dissecting the request lifecycle with pry

Let's investigate the journey of a request through Rails with some help from the debugging tool pry.

Required reading

Rails 3 in a Nutshell by O'Reilly, Chapter 2, up to and including the Controller section

http://ofps.oreilly.com/titles/9780596521424/rails.html

Required viewing

Pry with Rails by Railscasts

http://railscasts.com/episodes/280-pry-with-rails

RSVP here: http://rails-school.heroku.com/courses/noisebridge-rails-course/lessons/dissecting-the-request-lifecycle-with-pry

Notes- http://beta.primarypad.com/p/G86Niu6EXz


6/5 Class: Ajax

We're going to continue our discussion of using Rails' Unobtrusive Javascript framework to add ajax interaction to our blog apps.

Please make sure you've completed http://guides.rubyonrails.org/getting_started.html so we're all on the same page.

Also, RSVP here: http://rails-school.heroku.com/lessons/ajax-in-rails .

Notes- http://openetherpad.org/KjI5Ic2327


5/29 Class: Intro to Product Development

There's more to building web apps than hacking code, like figuring out what problem you're solving and how you'll know when you've solved it. This class we'll look at Michael's website for the class (http://rails-school.heroku.com) and polish it into a valuable tool for organizing our study group.

Homework is to think about these questions, or come up with your own:

  • Who are the target users of the class website?
  • What utility do they need out of the site to start using it right away?
  • What features could be added to open up the site to a larger audience?

Notes- http://openetherpad.org/QjFPw7bflF


5/22 Class: Authentication with the Devise gem

In preparation please finish the tutorial at http://guides.rubyonrails.org/getting_started.html . Seriously!

Enough talking about awesome Rails gems, let's use one in an app. We're going to add authentication to the blogs we created in the Getting Started guide, using the devise gem.

We will also have a beginners' group for folks needing help getting Rails set up or wanting to learn Ruby.

Notes- http://openetherpad.org/QC7KG7aKVB


5/15 Class: Demo Day!

In preparation please finish the tutorial at http://guides.rubyonrails.org/getting_started.html .

This class we're going to start with a show-and-tell of projects we're working on or have recently completed. The demos don't have to be Ruby- or Rails-related, but should be related to web programming in some way. This is a chance to get answers to your project-specific questions, find fun new projects to work on, and receive great feedback.

Then we'll break up into two groups, one for beginners and one for more experienced students.

Notes - http://openetherpad.org/xsy1zKhrbj



5/8 Class: topic is BLOGS

In preparation please tackle http://guides.rubyonrails.org/getting_started.html and get as far as you can in setting up a simple blog app.

Please post some links here to your favorite blogs. We'll take a look at some blog features and talk about how they might be implemented.

Gabe's pick: http://www.overheardinnewyork.com/

Notes: http://openetherpad.org/sIYNUEPzld



5/2 Class:

Notes: http://piratepad.net/dJupUHZoOP