Giter Club home page Giter Club logo

ideabox's Introduction

ideabox

Initial functionality includes:

This project built upon the "linked list" project and added in the functionality of storing data in localStorage & retrieving it using JSON.

The data model

An Idea has an id, title, a body, and a quality.

The id should be a unique identifier.

Title and body are free-form strings.

Quality should be one of the follow: “genius”, “plausible”, and “swill.”

By default, the idea’s “quality” should default to the lowest setting (i.e. “swill”).

Visual components:

We were given comps from a designer to match during this project. To ensure our comps were usable both on desktop & mobile we used CSS flexbox to make sure everything was usable on mobile right from the start

Using localStorage

Capturing inputs from the DOM, tranlating those into localStorage, and then pulling them out of localStorage using JSON was a challenge.

We approached this in a way where the actual elements on the page need rely on localStorage to function. Our workflow turned into:

1: Capture the inputs as objects

2: Push those objects into localStorage as strings

3: Retrieve that data by parsing it, and turning that data back into objects.

4: Show those objects on the DOM

This method ensures that anything the user does to those objects, from editing to deleting to changing the quality, always persist if they leave and come back to the application.

Our final feature allows the user to search through ideas and find the one they want. We used a regular expression here to tranverse the DOM and easily show the correct information in sleek way.

Files & Responsibilities

index.html - a lean file that sets up the structure for the CSS and JS to act on. Ensure that scripts reference both the CSS and JS to have the entire app function.

jquery.js - required to have any of the $ functions to operate.

reset.css - applies default styles - not necessary but a nice to have when running on older browsers.

script.js - hold the bulk of the functionality. Comments are included in the file to help describe what the functions are doing. Note the 'store' and 'retrieve' methods for storing and pulling data out of localStorage.

styles.css - these were carefully implemented to match the comp provided by someone else. This can be seen here (http://frontend.turing.io/projects/ideabox.html).

ideabox's People

Contributors

kylem038 avatar kccrs avatar

Watchers

James Cloos 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.