#Event Driven Programming
#Overview
- First-class nature of functions
- Callbacks and The JavaScript Event Loop
- Tools
#First-class nature of functions
# Continuation - http://www.ruby-doc.org/core-2.1.3/Continuation.html | |
require 'continuation' | |
# class Continuity | |
# def initialize total | |
# @total = 5 | |
# end |
desc 'Generate a migration timestamp' | |
task 'mtimestamp' do | |
puts Time.now.strftime("%Y%m%d%H%M%S") | |
end | |
desc 'Test Drive Code' | |
task "driver" do | |
puts "ADD #{`ruby todo.rb add Bake a delicious blueberry-glazed cheesecake`}" | |
puts "LIST #{`ruby todo.rb list`}" |
<html> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css"> | |
<style> | |
body | |
{ | |
margin: 0 40px; | |
} | |
h4 { margin-top: 5px } |
<html> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css"> | |
<style> | |
body | |
{ | |
margin: 0 40px; | |
} | |
h4 { margin-top: 5px } |
<html> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css"> | |
<style> | |
body | |
{ | |
margin: 0 40px; | |
} | |
h4 { margin-top: 5px } |
#Event Driven Programming
#Overview
#First-class nature of functions
#Object Oriented Javascript
#Overview
new Object();
this
function App(playerCount, numSpaces) { | |
this._boardView = new BoardView('#board_container'); | |
this._historyView = new HistoryView('#history_container'); | |
this._graphView = new GraphView('#distribution_container'); | |
this._playerCount = playerCount; | |
this._numSpaces = numSpaces; | |
this._history = []; | |
} | |
App.prototype = { |
#Due Monday
P 5-9 Due Monday along with P10 MVP Outline as Issue On Challenge P10 Presented on Friday
P7 Reviews
#Jasmine - Unit Testing for JavaScript
require 'sinatra' | |
require "sinatra/json" | |
def eight_ball | |
[ | |
"Definitely", | |
"Most likely", | |
"Try again", | |
"Cannot predict now", | |
"Don't count on it", |