Code Monkey home page Code Monkey logo

crumbs's People

Contributors

dangerdak avatar polyccon avatar rogeredbacon avatar

Watchers

 avatar  avatar

crumbs's Issues

Create getdata.js

We need to create a getdata.js with the right sorting in the query.

Create html files

Create pages for

  • Browsing (index.html)
  • Adding biscuit (add-biscuit.html)
  • viewing details of a single biscuit (biscuit-detail.html)
  • Adding feedback (review and rating)

Need handler

handler.js should deal with endpoints:
(not sure if this all makes sense, feel free to modify!)

  • '/' display - handler.home - home page with (4?) biscuits in order of most recently added
  • '/add-biscuit' - handler.addBiscuit (shows form)
  • '/new-biscuit' - handler.newBiscuit (deals with form data submitted from /add-biscuit)
  • '/filter-biscuits' - handler.filterBiscuits - (will have querystring which determines our sql query - use url module to parse) parses querystring (using url module) and queries database, sends results in response to be inserted into dom (to be displayed on index.html)
  • '/biscuit-detail' - handler.biscuitDetail - (might have querystring indicating which biscuit to display??) (queries db for biscuit id and displays info using dom manipulation (into biscuit-detail.html)

  • '/add-feedback' - handler.addFeedback - (might have querystring indicating which biscuit feedback relates to???) p
  • '/new-feedback' - handler.newFeedback - (receives submitted data and uses postData.js to insert data into database)

Redirect add biscuit page

We need the redirect the add biscuit page to the biscuit browser page after the user has submitted data

Tests hang

After tests have run, you need to press CTRL + C to terminate them.
(possibly to do with pool/connection/timeout...??)

Naming is important. Think about it a little more.

As we all know naming is hard but is probably the most important part of this process.

You have split out your routes and handlers in different files, which would be fine if your naming was consistent across both the files.
https://github.com/polyccon/Crumbs/blob/master/src/router.js#L7 the route is /get but the actual handler is called queryGetData try to keep some consistency in the naming, never assume that because you have this line

'/get': handlers.queryGetData,

that users will know exactly the method to look for in the handler and vice-versa.

Be more specific. What type of data are you getting? https://github.com/polyccon/Crumbs/blob/master/src/queries/getData.js#L2 it looks like biscuits, then call the endpoint biscuits and then your method get-biscuits.

SCRIPT INJECTION!

It would be great if you could add input validation to avoid script injection.

Sorry for breaking your site... and for my bad spelling ๐Ÿ˜จ
codereviewcrumbs

Project needs router

router.js should have endpoints:

  • '/'
  • '/add-biscuit' (shows form)
  • '/new-biscuit' (deals with form data submitted from /add-biscuit)
  • '/filter-biscuits' (will have querystring which determines our sql query - use url module to parse)
  • '/biscuit-detail' (will have querystring indicating which biscuit to display??)

  • '/add-feedback' (might have querystring indicating which biscuit feedback relates to???)
  • '/new-feedback'

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.