Thursday, April 16, 2009

Week 7: Rails Passion Course

  1. Week 7: Scaffolding (Scaffolding is a way to quickly put an Active Record class online by providing a series of standardized actions for listing, showing, creating, updating, and destroying objects of the class. These standardized actions come with both controller logic and default templates that through introspection already know which fields to display and which input types to use. // Topics covered: What is scaffolding?, Controller (that is generated through scaffolding), Templates (that are generated through scaffolding))
  2. 5523_rails_scaffold.zip (Unzip it in a directory of your choice and read lab document from /rails_scaffold/index.html to proceed) (4/16/09: Loaded)
  3. Week 7 Resources
    o Web services, Rails-style blog by Jamis (March, 2006)
    + Explains how respond_to works - respond_to will be covered in REST topic below
    o Rails 2.0 Scaffolding blog by David Lynch
  4. Week 7 Presentation - PDF: 1 slide per page (OR) OpenOffice file (15 pages) (4/16/09: Read)
  5. Week 7 Exercises -Online Lab/Change Log document (This is the same document you will find in the hands-on lab zip file) (72 pages) (4/17/09: Read thru the powerpoints)
  6. #0: Start Db (done) (p.2)
  7. (1.1) Create new project: rubyweblog with WEBrick and JRuby 1.1.4. (p.3-4)
  8. (1.2) Create new database (p.4-5)
  9. (1.3) Generate scaffold (p.6-18)
  10. (1.4) Migrate the database (to Current Version) (p.19-21)
  11. (1.5) Add a URL routing and delete index.html from Public directory (p.22-25)
  12. (1.6) Build and run the application (p.26-27)
  13. (1.7) Study control flow - Displaying the 1st page (p.28-31)
  14. (1.8) Study control flow - Creating a new post (p.31-37)
  15. EXERCISE #2: Add another field to the model in rubyweblog application
  16. (2.1) Add another field to the model (through migration) (p.37-41)
  17. (2.2) Modify [view] templates (p.42-44)
  18. (2.3) Save changes and Refresh the browser (p.45-53)
  19. (2.4) Add a validation (p.54-59)
  20. (2.5) Change the look and feel (p.60-62)
  21. (2.6) Perform various find operations through Rails console (p.63-67)
  22. NOW FOR THE HOMEWORK
  23. Week 7 Homework (68 pages) (p.67-68)
  24. HW7: Step 1: Start DB. (p.2)
  25. HW7: Step 2: Create new project (myscaffoldingapp) with WEBrick and JRuby 1.1.4. (p.2-3)
  26. HW7: Step 3: Now create databases. (p.3-4)
  27. HW7: Step 4: Now create scaffold - Course model with 2 attributes (name:string and credit:integer) (p.6-10)
  28. HW7: Step 5: Now migrate the database. (p.11-21)
  29. HW7: Step 6: Fix Configuration (routes.rb == "courses", deleted index.html) (p.22-25)
  30. HW7: Step 7: Build/Ran (p.26-27) http://localhost:3000/courses/new (WORKED; Added 7 courses/credits)

No comments:

Post a Comment