Syllabus
Overview
“Building Web-Based Software with Ruby and Ruby on Rails” is a thorough introduction to Ruby and Ruby on Rails, focusing especially on the Rails sweet spot: Rapid prototyping and iterative development. The course culminates in the design and implementation of a web-based software product.
Pre-Requisites
We assume that you already know at least one higher-level object-oriented language (Java, C, C++, C#, VB, (sophisticated) Perl…), have done some web development, and understand the relational database model. Web development is essentially the simultaneous orchestration of multiple skills; if you are significantly weak in your solid understanding of at least one programming language, how the web works, or databases, you will have a difficult time with the course.
Attendance, Lectures, and Sections
The course meets at 1 Story Street, Room 304 (Harvard map).
Strict attendance is not required but you should come to as many lectures as you can. For some students, section will turn out to be crucial. While there is a lot you can learn by studying the lecture slides, reading the texts, reading e-mail and/or on-line course discussion, and doing the assignments, you will most certainly find that there is a lot of important teaching and learning that can only be captured in person. If you’re a “distance” student, you should leverage all of the means we provide for you to learn: videos, e-mail discussion, blog comments, etc.
Sections
(Note: May change.) There will be at least two sections. You will be assigned randomly to a section, though we will swap if we can. Both will probably meet in a room at 1 Story Street.
Assignments
- (0%) System setup (must be done to proceed in the course)
- (15%) Ruby One-Liners
- (20%) Command-line Ruby application and ActiveRecord persistence
- (20%) Web application: Metrics Manager
- Final Project
- (5%) Proposal
- (25%) Implementation
- (10%) Documentation and User’s Guide
- (5%) Quizzes, excercises, participation, etc.
Each of assignments 1 to 3 will require at least 4 hours of work at home — this is work beyond coming to class, reading the materials, experimentation, etc. There will be some who can whip off the assignment in an hour, others who will take 8 hours or more; we will monitor this closely. Note that for many of the assignments there will be a required writeup or documentation: This is a critical and crucial part of the assignment, so even if the code is great, your submission may be problematic and get downgraded.
There are no extensions; if you’re not completely done, hand in whatever you have and you will receive partial credit. Your section leader is also your grader.
Required Software to be Installed on Your Computer
See Assignment 0.
Required Texts
PR: Thomas, et al., Programming Ruby, 3d ed. (2008), also known as the “pickaxe.” The 2nd edition is acceptable [2d ed. at Amazon], but I strongly suggest that you buy the new 3rd edition: Weakness in the coverage of the Ruby class model and metaprogramming have been improved quite a bit, and the new edition covers Ruby 1.9, which we will not be using in class but which will be extremely important.
AWDR: Thomas and Heinemeier Hansson, Agile Web Development with Rails, 3d ed. (2008) [link to Amazon coming] You must use this edition; the first and second editions are not acceptable.
To order the new editions now: Our recommendation is to order either the PDF or the PDF + printed book at The Pragmatic Programmers. These are currently “beta books.” As they get updated, you get e-mails so that you can “regenerate” your PDF with their gerbils. Here are a couple of links:
- http://www.pragprog.com/titles/ruby3/programming-ruby-3
- http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
Recommended Texts
Last year’s list of recommended books is here: http://e168f07.7fff.com/resources/books/
See resources.plugh.org (coming soon)
NOTE: We may make some small changes in order and emphasis in the syllabus as we go along.
Schedule
Week 1: Sep. 17
- Why Ruby? Why Rails? Why now?
- Installation and Setup
- irb
- ri
- “Hello, World!” command-line application
- “Hello, World!” web application
- Diagnostic Quiz
- Reading: PR: “Getting Started,” “Ruby.new” (skim) [ NOTE: Reading assignments are always for this week, so you're already a bit behind :-0 ]
Week 2: Sep. 24
- Numbers and Strings
- Arrays
- Hashes
- Iterators and blocks
- Regular Expressions
- Reading: PR: “Ruby.New” (esp. sections on Arrays, Hashes, Regular Expressions, etc.), “Containers, Blocks, and Iterators” (opening sections on Arrays and Hashes), “Standard Types” (esp. sections on Numbers, Strings, Regular Expressions), “The Ruby Language” (sections on Arrays, Hashes, Regular Expressions), and “Built-In Classes and Modules” (regarding the following classes and modules: Array, Hash, Enumerable, Regexp, String) [ NOTE: The examples for each class in "Built-In Classes and Modules" are loaded with suggestive strategies for Assignment 1 ]
Sunday, Sep. 28: Assignment 0 (System Setup) due
Week 3: Oct. 1
- More blocks, yield, iterators
- Control structures
- Classes and objects
- Inheritance, scope, access control, and visibility
- Modules
- Reading: PR: “Ruby.new” (re-read for topics above), “Classes, Objects, and Variables,” “Sharing Functionality”
Sunday, Oct. 5: Assignment 1 (Ruby One-Liners) due
Week 4: Oct. 8
- hooks
- eval
- Monkey patching
- Reading: PR: “Metaprogramming” (focus on extend vs. include, instance_eval vs. class_eval, method_missing; skim the rest, and read for the “spirit” of Ruby’s metaprogramming capabilities)
Week 5: Oct. 15
- Rails Overview
- MVC
- Don’t Repeat Yourself
- Reading: AWDR: “Introduction,” Part I (all), then in Part II, “The Depot Application,” “Catalog Display” [ NOTE: Many people find it very effective to follow along in Part II and try out everything ]
Sunday, Oct. 19: Assignment 2 (Command-line application) due
Week 6: Oct. 22
- Migrations
- ActiveRecord
- Reading: AWDR: Migrations are discussed here and there in Part II, “Building an Application” with regard to the “Depot” application; you should note any time “generate migration” is used; then for the full story, read Chapter 16. Similarly, ActiveRecord (database access) is all over the “Depot” chapters; to get started with ActiveRecord, read Chaper 17. NOTE: Rails contains many extension to core and standard Ruby classes; take a look at Chapter 15.
Week 7: Oct. 29
- More ActiveRecord
- Has and belongs to many
- has many through
- Reading: AWDR: Chapters 18 and 19.
Week 8: Nov. 5
Deploying Rails[will be screencast instead; when the screencast is out, read ADWR: Chapter 27.]
- Views
- View Helpers
- Controllers
- Reading: AWDR: Again, review controllers and views with regard to the “Depot” application; then read chapters 14, 21 and 22. The discussion of routes is easier to understand in the “Depot” section; skim chapter 20.
Week 9: Nov. 12
- More on Controllers and Views
[NOTE CHANGE: Moved back to Nov. 23 Dec. 7] Sunday, Nov. 16: Assignment 3 (Web application) due
Week 10: Nov. 19
- Routing
- REST
- Reading: AWDR: Chapters 20 and 25.
[NOTE CHANGE: Moved back to Dec. 7] [NOTE CHANGE - New date!] Sunday, Nov. 23: Assignment 3 (Web application) due
Nov. 26 - No class (Thanksgiving)
Week 11: Dec. 3
- Rails support for Ajax
- Reading: Chapter 23.
[NOTE CHANGE - New date!] Sunday, Dec. 7: Assignment 3 (Web application) due
Week 12: Dec. 10
- Action Mailer
- Distributing Work (e.g., Starling or similar)
- Reading: AWDR: Chapter 24. Demo of Workling or Starling.
Week 13: Dec. 17
- Professional Panel: Rails in the Real World
- Reading: Selection of blog postings.
Dec. 24 - No class (Winter Break)
Dec. 31 - No class (Winter Break)
Week 14: Jan. 7
- Student Demos
- Help Clinic
Week 15: Jan. 14
- Student Demos
- Help Clinic
Jan. 21 Final Project Due
blog comments powered by Disqus
Add New Comment
Viewing 4 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
I just used './', but that's just Unix-specific, right?
Do you already have an account? Log in and claim this comment.
Add New Comment