FoodMe Workshop
On Linux, we recommend using NVM for installing Node.js
This will start a Node.js server and open your default browser on http://localhost:3000, where the app should be served.
This will start Testacular, that will keep watching the files and whenever you make any change to a file, it will re-run all the unit tests.
It will also try to start Chrome. If you don’t have Chrome installed, you can specify another browser for Testacular to use. Eg. --browsers Firefox
This is an example of a static web-app mock that you might have received from a web-designer.
We need to turn the static mocks into an angular application:
https://github.com/IgorMinar/foodme/commit/step-1-solution
Get this step:
git checkout -f step-2
At this point, the angular application is bootstrapped.
We have created CustomerController.js and added it into scripts.
We have implemented findRestaurants() to alert() the inputted text (for now).
Turn the mocked form into a working form. Use end-to-end testing to check that the form does what you expect it to.
https://github.com/IgorMinar/foodme/commit/step-2-solution
Get this step:
git checkout -f step-3
A working form, which does not do any input validation.
Add form validation and disable the submit button whenever a form has empty fields.
https://github.com/IgorMinar/foodme/commit/step-3-solution
A working, self-validating, customer information form.
Create a customer service which persists into localStorage.
https://github.com/IgorMinar/foodme/commit/step-4-solution
A customer form which does not persist, and a customer model which is auto-persisted when changed.
Persist customer form into localStorage when the customer form is submitted.
https://github.com/IgorMinar/foodme/commit/step-5-solution
All of the UI is in the index.html.
Extract the UI from index.html into a separate file, and enable routing.
https://github.com/IgorMinar/foodme/commit/step-6-solution
Get this step:
git checkout -f step-7
We're able to receive user information and persist it in localStorage, but top-level navigation doesn't work yet.
We created a customer service which persists name and address into localStorage, and wired it into app.js.
We defined a root route in the app.js to point to views/customer.html and CustomerController.
We created a view for each of the static pages: views/who-we-are.html views/how-it-works.html and views/help.html.
Wire up the remaining views and get the navigation working.
https://github.com/IgorMinar/foodme/commit/step-7-solution
Working menu system, which does not show which menu is active.
Add active class to the menu item which is currently active.
https://github.com/IgorMinar/foodme/commit/step-8-solution
Collect customer information form as the main screen.
Create a list of restaurants placeholder as the main screen, move customer information screen into separate route definition.
https://github.com/IgorMinar/foodme/commit/step-9-solution
Placeholder for the views/restaurants.html.
Add static web-designer mocks to the views/restaurants.html placeholder.
https://github.com/IgorMinar/foodme/commit/step-10-solution
Static designer mock of restaurants.
Add some fake restaurants into the controller.
https://github.com/IgorMinar/foodme/commit/step-11-solution
Get this step:
git checkout -f step-12
An HTML mock with some hardcoded data for restaurants, working navigation, and defined views for the static pages.
Add data binding to the mock so that the data in the views can be generated dynamically based on the data in the controller.
http://docs.angularjs.org/api/ng.directive:ngRepeat
https://github.com/IgorMinar/foodme/commit/step-12-solution
Designer mock of restaurants bound to fake data.
Bind restaurants to data from the server.
https://github.com/IgorMinar/foodme/commit/step-13-solution
Restaurants page which is populated with $http.get() service.
Simplify data fetching through the use of $resource over $http.get() service.
https://github.com/IgorMinar/foodme/commit/step-14-solution
Restaurants list.
Add deliver to information on top of the restaurants view.
https://github.com/IgorMinar/foodme/commit/step-15-solution
Count of restaurants without pluralization. (we show 1 restaurants found!)
Change the message depending on the number of restaurants returned.
https://github.com/IgorMinar/foodme/commit/step-16-solution
List of restaurants
Show the static restaurant menu mock from the web-designer.
https://github.com/IgorMinar/foodme/commit/step-17-solution
Get this step:
git checkout -f step-18
An inline "deliver to" message in the views/restaurants.html view
Extract the message into a reusable component. Introduce unit tests into our code, and run them.
https://github.com/IgorMinar/foodme/commit/step-18-solution
Static web-designer mock of the menu.
Data-bind the menu to real data from the server.
https://github.com/IgorMinar/foodme/commit/step-19-solution
Currently prices and ratings show up as numbers.
Create a filter to display prices and ratings using $ and ★.
https://github.com/IgorMinar/foodme/commit/step-20-solution
Filters to render $ and ★.
Replace these filters with a more versatile directive that can do both one-way binding (similar to what filters did) as well as two-way data-binding.
https://github.com/IgorMinar/foodme/commit/step-21-solution
Get this step:
git checkout -f step-22
Currently the filtering in our restaurants view does nothing.
Enable filtering of the restaurant list. Add unit tests to the new filtering code.
https://github.com/IgorMinar/foodme/commit/step-22-solution
Get this step:
git checkout -f step-23
A static list of cuisines.
Turn the static list into a dynamic list and add unit tests for it.
https://github.com/IgorMinar/foodme/commit/step-23-solution
Get this step:
git checkout -f step-24
Restaurants are returned always in the same order.
Allow sorting of the restaurant list and add unit tests for it.
https://github.com/IgorMinar/foodme/commit/step-24-solution
Menu view does not allow ordering.
Allow adding menu items into a cart.
https://github.com/IgorMinar/foodme/commit/step-25-solution
We don't have a checkout view
Add static mock of the checkout view.
https://github.com/IgorMinar/foodme/commit/step-26-solution
Static checkout view.
Wire up the checkout view to show the contents of the cart and allow the purchase.
https://github.com/IgorMinar/foodme/commit/step-27-solution
We don't have checkout confirmation page
Add web-designer mocks of the checkout confirmation page.
https://github.com/IgorMinar/foodme/commit/step-28-solution
Static mock of thank you page.
Add behavior to the mock.
https://github.com/IgorMinar/foodme/commit/step-29-solution
Get this step:
git checkout -f master