Skip to content

Instantly share code, notes, and snippets.

JavaScript Functions

I can explain the difference between function declarations and function expressions.
Yes.

I can explain what the value of this is in a normal function.
Yes.

I can explain what the value of this is when called from the context of an object.
Maybe.

Array Prototype Methods

I understand that functions in JavaScript can take any number of arguments.
Yes.

I can describe the similarity between blocks in Ruby and anonymous functions in JavaScript.
Yes.

Where are the methods available to all arrays (e.g. forEach, map, etc.) defined?
Array.prototype

Setting Group Expectations

Group Member Names: Edgar, Matt R., Matt S.

  1. When are group members available to work together? What hours can each group member work individually? Are there any personal time commitments that need to be discussed? We'll shoot to work after school most days, trying to accomodate little schedule differences as they come. Flexible on weekends.

  2. How will group members communicate? How often will communication happen, and how will open lines of communication be maintained? Started a slack chaneel #Mattgar + texting. Anytime we separate to work on home, we'll plan on checking it at the end of each day to realign/help each other with problems they're having. We'll likely be pairing together most of the time, with the exception of smaller/repetitive tasks. Shoot to set mini-milestones/goals and chip away at those instead of falling behind or getting overwhelmed with the scope of the entire project.

  1. What is the purpose of the router in a Rails project?

It's the doorman to your app a.k.a. --> it handles all incoming requests and routes them to the correct place, controller, etc.

  1. What routes would be provided to you with the line resources :items?

get "/items" => "items#index"

get "/items/:id" => "items#show"

1. Describe the request-response cycle (start with the client making a request).
* The client sends a request to the server with a verb (GET) and a path (/tasks) that it wants to ineract with.
* The server/router accepts that request and sends it to the controller.
* The controller routes the request to the proper location with the proper action (get, post, etc.)
* If the request requires pulling informaiton out of the database then the controller passes the request to the models, which then fetches from the database and hands it back to the controller.
* The controller then passes the available information over to the views, and the views build a page with the requested info.
* The views send the page back to the controller, where it renders HTML that gets sent back to the server.
* The server then sends a response to the client with information about whether the request was successful or not -- and if so, it passes the html in though the response body.