Giter Club home page Giter Club logo

giffaw's Introduction

Giffaw

Your goal is to integrate with the Giphy API.

https://github.com/Giphy/GiphyAPI

Basic Requirements:

  • A user can see the top 25 gifs (on page load)
  • A user can search for gifs, using the input field
  • Bonus: A user can "load more" gifs

Note: This can be a pair programming activity or done independently.

Your site should look something like:

desktop layout

Using AJAX

Introduction

You're about to write a lot of AJAX-backed JavaScript using jQuery that will complete our little Gif app.

Make use of the fantastic Giphy api: http://api.giphy.com/

Check out the documentation here: https://github.com/Giphy/GiphyAPI

Thinking Like An Engineer

As we get into more complicated problems, we need to start thinking more and more like engineers. Engineers break down large problems into the smallest possible parts, and tackle each small part one at a time.

This is one of the major skills for web development!

Here's some steps to follow to help get you in this mindset:

  1. Skim the docs! https://github.com/Giphy/GiphyAPI

  2. Test the API out using 'curl'!

  • curl is a *nix utility that simply fetches a URL. Test it out by running curl http://jquery.com in the console. Is this HTML?
  1. Crack open your blank template. We first want to write JavaScript that returns that same object we got back using curl when we open our index.html! BUT HOW DO I AJAX!!??

  2. Start playing in your base.js file. You want an Ajax call to fire when your page has loaded, so you won't be putting your ajax in an $().on('click'!

    • Don't try to do everything at once! First try to log the data to the console! Then work on logging specific data you want. What do you need to get the gifs to actually load on the page? There is a bunch of stuff in this data object, and this is actually not a trivial question.
    • Once you narrowed that down, THEN you want to build functions that generate HTML Strings.
    • First log those strings to the console, and make sure they look like you think they should. THEN append them into the DOM!
    • Don't forget about your friend the javaScript 'debugger' keyword. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger
  3. Can you bonus? Get a little search box to make a different AJAX call to the search URL.

    • Does a search box button have a default action? What do we want do with that?
    • Are we just appending more and more gifs to the dom? Do we need to clear previous gifs before loading more?
    • OMG are you making a one page app using AJAX like a boss?

Deliverable

Take a screenshot of your app and post it to Funny Biz!

Additional Resources

giffaw's People

Contributors

nathanallen avatar tgaff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.