Coder Social home page Coder Social logo

tunely-angular's Introduction

tunely-angular

Full CRUD single page app (SPA) with MEAN stack. A refactor of tunely with an Angular front end.

Objectives

This lab begins with just HTML and CSS on the front end and a fully built out back end. Each sprint in the project has its own objectives. As you work through the project, you'll:

  • see how to set up an Express server to serve an Angular front end
  • consume a JSON API using Angular's $http
  • update Angular views using 2-way data binding and Angular's client-side templating
  • CRUD albums and embedded songs
  • build your toolbox of Angular modules, services, and directives

Prerequisites

Before starting this lab, developers should have some familiarity with...

  • Express server routes for HTML and static assets
  • Express server routes for JSON (/api routes), including the controller pattern (see docs/controllers_example.md)
  • RESTful route design
  • AJAX
  • Git and GitHub, including branches

Getting Started

  • fork and clone this repository
  • read this document
  • follow the branching instructions here

Sprints

Sprint 1

Sprint 1: set up a simple Angular app with hard-coded data

Sprint 2

Sprint 2: GET and POST album data with the Express back-end

Sprint 3

Sprint 3: UPDATE and DELETE album data with the Express back-end

Sprint 4

Sprint 4: refactor app to use ngRoute and view templates

Sprint 5

Sprint 5: add ability to CRUD songs

tunely-angular's People

Contributors

bgveenstra avatar cofauver avatar jeanmw avatar jlopker avatar justincastilla avatar nathanallen avatar tgaff avatar willcauthen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tunely-angular's Issues

catchall route hard to debug

Lots of confusing bugs emerge due to the catchall/wildcard/splat route serving HTML. The most common example is /wrong/path/to/some.js raising "SyntaxError: unexpected token <" in the client.

Recommendation:

  • limit catchall to only known route patterns (e.g. /albums, /albums/:id, /albums/:id/songs, etc).
  • but add a final catchall that responds with a status 404.

$http.put() shorthand leads to nested `data` confusion

Saw a couple examples where students mistakenly pass a config object with a data property to the shorthand:

$http.put("/foo", { data: {name: "foo", artistName: "bar"}})

Instead of the actual data (the album):

$http.put("/foo", {name: "foo", artistName: "bar"})

(or the recommended longhand):

$http({url: "/foo", method: "put", data: {name: "foo", artistName: "bar"}} )

prefix paths with "/"

Seeing problems pop up when scripts/stylesheets are loaded from a relative path, e.g. /example (/example/vendor/scripts/jQuery.js)

Remove docs for the original version of tunely

All of the readmes for the original tunely are still populating the docs folder. To get to the tunely-angular documentation, you ned to go one directory deeper to the angular folder.

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.