dev1 – JS Objects

Tutorials

  • Section 12, videos 114 – 120
  • 12 JS – Objects tutorial notes
  • Exercise files to publish on your server as HTML/JS pairs:
    • object-examples.html / object-examples.js
    • movie-db-exercise.html / movie-db-exercise.js

Blog Questions

Link to an example dynamic webpage that likely pulls data from a database to build the site – any social media site, newspaper, blog, etc. Take a screenshot of a typical “post” and propose an object data structure to store all the elements of the post. Use the Enlighter code embed tool to include your proposed object design in a code sample.

Here’s an example:

var tweet = {
    user_avatar: "ryan.jpg",
    user_name: "ryanseslow",
    user_handle: "@ryanseslow",
    content: {
        date: "Sep 30",
        text: "#wip - and a #sneakpeek for the new @brooklynwineco #mural taking shape this week in #parkslope - #brooklynwineco - this is some of the fresh concept art, mock-up process and inspiration. I hope y’all dig it! #brooklyn #nyc #art #comingsoon",
        media: "wall.jpg",
        links: {
            reply: function(){},
            retweet: function(){},
            like: function(){},
            share: function(){}
        }
    }
}

Leave a comment

Your email address will not be published. Required fields are marked *

css.php