- Define CRUD.
- Create, Read, Update, Delete
- There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for.
- get '/' --> Serves as the index/list of "things"
- get '/new' --> Renders form used to create new "thing"
- post '/' --> Creates thing and redirects to "get '/'"
- get '/:id' --> Renders view of individual "thing"
- get '/:id/edit' --> Renders view of form to edit "thing"
- put '/:id' --> Updates "thing" and redirects to "get '/:id'"
- delete '/:id' --> Deletes "thing" and redirects to "get '/'"
I can explain the difference between function declarations and function expressions.
- Well, at least one of them. Function declarations are hoisted, but with variables only the declaration (NOT the definition) is hoisted, so the variable still isn't defined until the code gets there.
I can explain what the value of this is in a normal function.
- global object
I can explain what the value of this is when called from the context of an object.
- it's the object.
When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.
Read Node.js, Require and Exports and Organize Your Code with RequireJS
- Modules are small chunks of your application that serve a specific purpose (cite: 2nd article). It's basically a group of functions/variables that are related and belong in their own separate file. I think of it like a class but I don't know if that's technically the right way to think of it.
Step One: Watch Mary Rose Cook Live Codes Space Invaders from Front-Trends. (The second worst conference name ever?)
Step Two: Fork this gist.
Step Three: Respond to this question in your fork: What is one approach you can take from this Mary's code and implement in your project?
- I actually had watched this prior to starting our project. It lead me to try to be hyper organized and structured with our project and until I got passed that and let myself write gross code first. I did, however, take the keyboard tracker concept from her game and implement it in ours (where it maintains a hash updating true/false values for the keyCode keys. We built more on top of it limiting which keys were recorded and implementing it over socket.io.
Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.