Karmen Blake
Agile Developer and Instructor
Categories
- Courses (15)
Archives
- June 2008 (2)
- May 2008 (10)
- April 2008 (16)
- March 2008 (8)
- February 2008 (10)
- January 2008 (14)
- December 2007 (4)
- November 2007 (7)
- October 2007 (25)
Tags
- 206 (10)
- 234 (7)
- 282 (10)
- 283 (29)
- 284 (29)
- agile (1)
- announcements (10)
- articles (2)
- assignments (10)
- contest (1)
- employment (1)
- humor (5)
- linux (5)
- location (1)
- microsoft (1)
- office (1)
- preregistration (1)
- rails (4)
- ruby (14)
- scc (2)
- scripting (4)
- syllabi (3)
- syllabus (1)
- tips (1)
- unix (2)
- video (1)
- videos (7)
- web (2)
- windows (3)
Welcome!
You'll find my course content and collaborative discussion about technology.
I teach as an adjunct faculty in the Computer Information Systems department at Spokane Community College
Presentations/Interviews
RubyLearning.com interviewCourse Technology - Ruby on Rails Presentation
Rails: Layout and Flash notices
April 23rd, 2008 |
Concepts:- Layouts (Chapter 10)
- Flash notices
Introduction to Rails articles
April 22nd, 2008 |
Nice introductory articles about Rails:
- http://alistapart.com/articles/creatingmoreusinglesseffortwithrubyonrails
- http://alistapart.com/articles/gettingstartedwithrubyonrails
DHH talk
April 21st, 2008 |
DHH talking about making money; more business oriented. He does talk a little about software development in his question/answer session. Overall very interesting.
http://christophemaximin.com/articles/2008/04/21/the-secret-to-making-money-online-by-my-hero-dhh
Editing data lecture
April 21st, 2008 |
Concepts- Update attributes (Chapter 6)
- Partials (Chapter 10)
- More RESTful routes (Chapter 4)
CIS 284 - Assignment 1
April 17th, 2008 |
CIS 284
Assignment 1
Due Sunday, April 27th by midnight
- zip up rails app named lastname_app, thus, lastname_app.zip
- email and attach zipped file (do not rename zip, send as is) to kblake.scc@gmail.com
- subject line: full name, cis 284, assignment name
- You’ll be creating a KraigsList with postings
- Each posting has these characteristics
- title (required)
- price (required, validate for numeric)
- email (required, validate format)
- description (required)
- location (optional)
- Allow one to create a posting
- View all postings (order by highest price)
- Display postings count
- Extra credit: provide hyperlinks to view ordered by lowest or highest price)
- Editing of postings (in a later assignment, we’ll allow users to edit their own posts only)
- Delete a posting (make sure there is a javascript confirmation before deleting)
- Use the flash notices to display what “action” just occurred
- Use a layout to contain the views
Rails Application: creating new stories and validation
April 14th, 2008 |
Concepts:- New/Create RESTful routes (Chapter 4)
- Forms and form helpers (Chapter 4 and 11)
- Validations (Chapter 8)
Starting a Rails App
April 11th, 2008 |
Concepts- ActiveRecord Basics
- Migration Basics
- Creating a controller and a view
- Download
- Unzip
- Navigate into folder and run
rake db:migrate ruby script/server
Tutorials and speed of the course
April 10th, 2008 |
Please do not get sidetracked by tutorials you find on the web. Use them as a reference for what I want you to do. Instead follow my instructor blog (and notes) for direction. Currently, I only need you to know how to create a rails app, write some erb, and link a few pages together as shown in last week’s lecture. The scaffold was something I was demonstrating to show how quickly you can get a database-driven app up and going. You can use the scaffolded code as a reference. You are not yet expected to know how the scaffolded code is supposed to work. Over the next couple of weeks we are going to build a database driven app from scratch so that I can address some very important concepts (like ActiveRecord and routing) along the way.
REST and routes
April 9th, 2008 |
Reference: Chapter 4 (The Rails Way)In Rails, by adding
map.resources :stories to config/routes.rb, you get 7 predefined routes:
- stories GET /stories {:controller=>”stories”, :action=>”index”}
- POST /stories {:controller=>”stories”, :action=>”create”}
- new_story GET /stories/new {:controller=>”stories”, :action=>”new”}
- edit_story GET /stories/:id/edit {:controller=>”stories”, :action=>”edit”}
- story GET /stories/:id {:controller=>”stories”, :action=>”show”}
- PUT /stories/:id {:controller=>”stories”, :action=>”update”}
- DELETE /stories/:id {:controller=>”stories”, :action=>”destroy”}
map.resources :stories
- POST is a CREATE
- GET is a READ
- PUT is an UPDATE
- DELETE is a DELETE
New Rails App
April 8th, 2008 |
Did everyone get a Rails app up and going? I’d like to start in on ActiveRecord and then how we apply to a web app. Does that sound cool?
Working with databases
April 6th, 2008 |
References
- Read from: “The Rails Way” – Chapter 6
- Active Record Presentation
- Migrations Presentation (ignore mysql at beginning)
Objectives
- Configure Rails to work with a database (database.yml)
- create table (migration)
- use ActiveRecord to interact with our database
- use script/console to learn how ActiveRecord works
Model
- handle application state (usually in the database)
- encapsulate business logic, such as data validation and rules applied to data
ActiveRecord
- ORM (object-relational mapping)
- Instead of dealing with database through SQL statements, ORM layer presents records as a collection of objects
- Table represents a collection of objects(stories)
- Record represents an object/model (story)
- Field represents an object attribute (title)
CRUD operations on database
- C: create, insert record into table
- R: read, select record(s) from table
- U: update, update record(s) in the table
- D: delete, delete record(s) from the table
FREE Ruby Text Editors
April 4th, 2008 |
I thought I’d start a list of text editors to use on Windows. Scite, although great for ruby editing, does not have a file explorer and Context pretty much bombed. Ugh!- Komodo Edit
- jEdit
- Netbeans
- Not Free but recommended
Notes from Lecture
April 4th, 2008 |
Notes
How did installations go at home? Share tips here.
CIS 284 - Rails Introductory Lecture
April 1st, 2008 |
Thursday
12:30 p.m.
Room 1116
CIS 284 - Research Paper
April 1st, 2008 |
http://docs.google.com/Doc?id=ddhknw46_70df9v62c8