Skip to content

Instantly share code, notes, and snippets.

@coreyti
Created September 27, 2014 17:55
Show Gist options
  • Save coreyti/7fe0a6e5c38b4212a38e to your computer and use it in GitHub Desktop.
Save coreyti/7fe0a6e5c38b4212a38e to your computer and use it in GitHub Desktop.
Notes from RailsBridge NYC, 27 Sept 2014

RailsBridge Notes

Some notes from RailsBridge NYC, 27 Sept 2014.

High-level

"Convention over configuration" means... I don't need to teach Rails how to find the models, controllers, etc. or how to "route" or how to hit the database... etc. etc. etc.

on Objects

  • "class" is the definition of behavior for objects in our system
  • "instance" is a particular, singular copy of a class
  • "method" is how we can interact with our instances
  • we say, A "inherits from" B, in which case instances of A have the things that B defines (and more)

on MVC

M app/models
  - business logic here
  - database access/integration
  - e.g., Job

V app/views
  - display rules here (how do I represent a Job)

C app/controllers
  - given a request, what Models and Views should we use?

on Migrations

  • Migrations create/modify the database "schema" by specifying things like...
    • name of a column for a given table
    • type of a data in the column
    • timestamps (e.g., to track when things are created and updated)
  • some (of many column types:
    • integer
    • string
    • text (longer string)
    • datetime
    • ...

on Rails Helpers

on Rake

A tool for defining "tasks" in Ruby, that can do many many things. In the case of Rails, we have a bunch of "tasks" related to DB creation, listing routes, etc. etc.

Other Terms

  • "DRY" (don't repeat yourself)
@thehme
Copy link

thehme commented Sep 28, 2014

Thank you Corey for explaining things so well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment