Skip to content

Instantly share code, notes, and snippets.

@lisaSwanson
lisaSwanson / oojs.md
Last active August 29, 2015 14:28 — forked from stujo/oojs.md
Object Oriented Primer for JavaScript

#Object Oriented Javascript

#Overview

  • Creating Objects in JavaScript
    • new Object();
    • Object Literal Notation (Important)
    • Factory Function
  • Review JavaScript's this
  • More Creating Objects in JavaScript
    • Constructor Function
function Dinosaur(color){
this.id = Dinosaur.prototype.counter++;
this.dob = Date.now();
this.color = color;
};
Dinosaur.prototype.roar = function(){
console.log('RARWARARRR said the ' + this.color + ' Dinosaur!!!');
};

#Building APIs

#Overview

  • What is an API?
  • Why build an API?
    • Who is going to use it?
    • What are they going to do?
  • REST Architecture
    • Stateless
  • Resource Representations
@lisaSwanson
lisaSwanson / 01. Gemfile
Created October 1, 2015 02:24 — forked from schleg/01. Gemfile
Setup for Devise + Omniauth
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'
@lisaSwanson
lisaSwanson / application.html.erb
Created October 1, 2015 17:27 — forked from stujo/application.html.erb
Page Specific Document Ready JavaScript in Rails with jQuery
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PizzaShack</title>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>
</head>
<body>