├── .gitignore ├── .nojekyll ├── Assignments ├── Quiz-Study-Guide.md ├── Weekly-Homework.md └── assets │ ├── fortune_form.png │ └── weather_api.gif ├── Examples └── DiceGame │ ├── 01-Functions │ └── app.py │ ├── 02-Flask │ └── app.py │ ├── 03-Templates │ ├── app.py │ └── templates │ │ └── index.html │ ├── 04-HTML-Form │ ├── app.py │ └── templates │ │ └── index.html │ └── 05-Unit-Tests │ ├── app.py │ ├── app_test.py │ └── templates │ └── index.html ├── Lessons ├── 01-Static-Website │ ├── README.md │ ├── assets │ │ └── basic-anatomy-of-xhtml-elements.png │ └── demo │ │ ├── forms-demo.html │ │ ├── hello-world.html │ │ ├── html-demo-simple.html │ │ ├── html-demo.html │ │ └── static │ │ ├── dog.jpg │ │ └── style.css ├── 02-Git-and-GitHub │ ├── README.md │ └── assets │ │ ├── github_desktop.png │ │ └── shopping_cart.jpg ├── 03-Intro-to-Flask │ ├── README.md │ ├── assets │ │ ├── query.jpg │ │ └── req-res.gif │ └── demo │ │ ├── README.md │ │ ├── app.py │ │ └── compliments.py ├── 04-Flask-Templating │ ├── README.md │ └── demo │ │ ├── app.py │ │ ├── compliments │ │ ├── app.py │ │ └── templates │ │ │ ├── base.html │ │ │ ├── compliments.html │ │ │ └── index.html │ │ └── templates │ │ ├── greeting.html │ │ └── items_list.html ├── 05-URLs-HTTP-REST-and-Reading-Errors │ ├── README.md │ ├── assets │ │ ├── cards.jpg │ │ ├── inseev-1.jpg │ │ ├── query.jpg │ │ ├── req-res-detailed.gif │ │ ├── request.png │ │ └── sources-tab.png │ └── demo │ │ ├── apis_demo_flask.py │ │ ├── app.py │ │ ├── templates │ │ └── joke.html │ │ └── weather_api.py ├── 06-Testing-RESTful-Routes │ ├── README.md │ ├── agenda.md │ ├── assets │ │ ├── if_else.png │ │ └── spaceman_flowchart.png │ └── demo │ │ ├── app.py │ │ ├── string_tests.py │ │ └── tests.py ├── 07-Model-View-Controller │ ├── README.md │ └── assets │ │ ├── food.png │ │ ├── header.svg │ │ ├── menu.png │ │ ├── mvc-simple.png │ │ ├── restaurant.png │ │ └── waiter.jpeg ├── 07-More-Testing │ ├── README.md │ ├── assets │ │ ├── ditto.gif │ │ └── tennis-ball-machine.gif │ └── demo │ │ ├── app.py │ │ └── tests.py ├── 08-Document-Based-Databases │ ├── README.md │ ├── assets │ │ ├── Flask-Mongo-Diagram.jpeg │ │ ├── MongoDB.jpg │ │ ├── banner-image.jpg │ │ ├── doc-based-db.jpg │ │ ├── drycleaners.jpeg │ │ ├── mongodb_compass.png │ │ └── relational-vs-document.jpg │ └── demo │ │ ├── app.py │ │ └── songs.py ├── 09-ERDs-Resource-Associations-and-MongoDB │ ├── README.md │ ├── assets │ │ ├── blog-erd.png │ │ ├── many-to-many.png │ │ ├── one-to-many.png │ │ ├── one-to-one.png │ │ └── school-erd.png │ └── demo │ │ ├── events.py │ │ └── juggling.py ├── 10-Project-Planning-and-User-Centered-Development │ ├── README.md │ └── assets │ │ ├── error_page.png │ │ └── wireframe_example.png ├── 11-Deployment-Environments │ ├── README.md │ └── assets │ │ ├── different-environments.jpg │ │ ├── elephant.jpg │ │ ├── heroku.svg │ │ ├── interesting.jpg │ │ ├── microservices.png │ │ ├── pastedImage_1.png │ │ ├── realtime-api.png │ │ ├── rest-services.png │ │ └── worksonmymachine.jpg ├── 12-Presentation-Practice │ └── README.md ├── Images │ └── header.svg └── Review-Day │ └── README.md ├── Projects ├── .gitignore └── GifSearch │ └── README.md ├── README.md ├── Reveal └── makeschool.css ├── Slides ├── 01-Static-Website │ ├── README.html │ ├── assets │ │ └── basic-anatomy-of-xhtml-elements.png │ └── slides.html ├── 02-Git-and-GitHub │ ├── README.html │ └── assets │ │ └── github_desktop.png ├── 03-Intro-to-Flask │ ├── README.html │ ├── assets │ │ └── query.jpg │ └── demo │ │ └── README.html ├── 04-Flask-Templating │ └── README.html ├── 05-URLs-HTTP-REST-and-Reading-Errors │ ├── README.html │ ├── assets │ │ └── query.jpg │ └── demo │ │ └── README.html ├── 06-More-Apis │ └── README.html ├── 06-Testing-RESTful-Routes │ ├── README.html │ ├── agenda.html │ └── assets │ │ └── spaceman_flowchart.png ├── 07-Model-View-Controller │ ├── README.html │ └── assets │ │ ├── food.png │ │ ├── menu.png │ │ ├── restaurant.png │ │ └── waiter.jpeg ├── 07-More-Testing │ ├── README.html │ └── assets │ │ ├── ditto.gif │ │ └── tennis-ball-machine.gif ├── 08-Document-Based-Databases │ ├── README.html │ └── assets │ │ ├── Flask-Mongo-Diagram.jpeg │ │ ├── drycleaners.jpeg │ │ ├── mongodb_compass.png │ │ └── relational-vs-document.jpg ├── 09-ERDs-Resource-Associations-and-MongoDB │ ├── README.html │ └── assets │ │ ├── blog-erd.png │ │ ├── many-to-many.png │ │ ├── one-to-many.png │ │ ├── one-to-one.png │ │ └── school-erd.png ├── 10-Project-Planning-and-User-Centered-Development │ ├── README.html │ └── assets │ │ └── error_page.png ├── 11-Deployment-Environments │ └── README.html ├── 12-Presentation-Practice │ └── README.html ├── Images │ └── header.svg ├── Review-Day │ └── README.html ├── assets │ └── Reveal │ │ └── makeschool.css ├── css │ ├── highlight │ │ └── atom-one-light.css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reset.css │ ├── reveal.css │ ├── reveal.scss │ └── theme │ │ ├── README.md │ │ ├── beige.css │ │ ├── black.css │ │ ├── blood.css │ │ ├── league.css │ │ ├── moon.css │ │ ├── night.css │ │ ├── serif.css │ │ ├── simple.css │ │ ├── sky.css │ │ ├── solarized.css │ │ ├── source │ │ ├── beige.scss │ │ ├── black.scss │ │ ├── blood.scss │ │ ├── league.scss │ │ ├── moon.scss │ │ ├── night.scss │ │ ├── serif.scss │ │ ├── simple.scss │ │ ├── sky.scss │ │ ├── solarized.scss │ │ └── white.scss │ │ ├── template │ │ ├── mixins.scss │ │ ├── settings.scss │ │ └── theme.scss │ │ └── white.css ├── index.html ├── js │ └── reveal.js ├── lib │ ├── css │ │ ├── monokai.css │ │ └── zenburn.css │ ├── font │ │ ├── league-gothic │ │ │ ├── LICENSE │ │ │ ├── league-gothic.css │ │ │ ├── league-gothic.eot │ │ │ ├── league-gothic.ttf │ │ │ └── league-gothic.woff │ │ └── source-sans-pro │ │ │ ├── LICENSE │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ └── source-sans-pro.css │ └── js │ │ ├── html5shiv.js │ │ └── promise.js └── plugin │ ├── highlight │ └── highlight.js │ ├── markdown │ ├── example.html │ ├── example.md │ ├── markdown.js │ └── marked.js │ ├── math │ └── math.js │ ├── multiplex │ ├── client.js │ ├── index.js │ ├── master.js │ └── package.json │ ├── notes-server │ ├── client.js │ ├── index.js │ └── notes.html │ ├── notes │ ├── notes.html │ └── notes.js │ ├── print-pdf │ └── print-pdf.js │ ├── search │ └── search.js │ └── zoom-js │ └── zoom.js ├── Web ├── .nojekyll ├── logo-icononly.svg ├── style.css └── sw.js ├── _navbar.md ├── _sidebar.md ├── archive ├── 03. Resourceful Routing & Reading Errors │ ├── README.md │ └── assets │ │ ├── RESTful-routes.png │ │ └── nested-routes.png └── 10. A Brief History of JavaScript & Node.js │ ├── README.md │ ├── additional-notes.md │ ├── assets │ ├── browser-pop.png │ ├── browser-war.svg.png │ ├── browser_wars_by_shoze-d3k0ori.jpg │ ├── js.gif │ ├── typescript.png │ └── v8-stack.png │ └── node-js.md ├── index.html ├── node.png ├── reveal-md.json └── reveal.json /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.code-workspace 3 | 4 | # ignore environment folder 5 | env/ 6 | 7 | # ignore auto-generated python files 8 | __pycache__ 9 | *.pyc 10 | 11 | # ignore static directory (for now) 12 | _static -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/.nojekyll -------------------------------------------------------------------------------- /Assignments/Quiz-Study-Guide.md: -------------------------------------------------------------------------------- 1 | # Quiz Study Guides 2 | 3 | ## Quiz Format 4 | 5 | Quizzes will be given according to the [class calendar](#/README). 6 | 7 | ## Quiz 1 8 | 9 | ### HTML & Static Pages 10 | 11 | - Identify the parts of an HTML tag 12 | - Use the `img` and `a` tags to add images & links to a page 13 | - Identify and describe the standard attributes of the `form` and `input` elements 14 | - Write an HTML form using at least 2 types of input and a submit button 15 | 16 | ### Git & GitHub 17 | 18 | - Use basic Git commands (`git add`, `git commit`, `git status`, `git push/pull`) to make changes to your repository 19 | - Explain the benefits of using a version control system to track files 20 | 21 | ### Flask & Jinja 22 | 23 | - Write a Flask route for a specific URL 24 | - Access form data using `request.args` and `request.form` 25 | - Call `render_template` using *named parameters* to render an HTML file 26 | - Use Jinja2 `for` loops and `if` statements to display dynamic HTML based on data passed in 27 | 28 | ## Quiz 2 29 | 30 | ### APIs 31 | 32 | - Given a JSON object, be able to access nested fields and modify fields 33 | - Use `requests.get()` to make an API call to an endpoint 34 | - Use query parameters to send specific data in an API call 35 | - Describe the standard endpoints for a REST API (GET, POST, PUT/PATCH, DELETE) 36 | 37 | ### Testing 38 | 39 | - Identify and explain 3 reasons why testing is useful 40 | - Write a test function using `assertEqual` and `assertIn` 41 | - Identify and explain 2 scenarios in which we would want to use a mock object in a test 42 | - Use `mock.patch` to set the return value of a function (such as an API call) 43 | 44 | ## Quiz 3 45 | 46 | ### Databases 47 | 48 | - Define "Database" and "Collection", and describe use cases for each 49 | - Use the `find` & `find_one` methods to access data in a Collection 50 | - Use the `insert_one` method to put data in a Collection 51 | - Use the `update_one` and `delete_one` methods to update/delete data from a Collection 52 | 53 | ### Resource Associations 54 | 55 | - Draw an Entity Relationship Diagram (ERD) for a project with multiple resources using One-to-One, One-to-Many, or Many-to-Many relationships 56 | -------------------------------------------------------------------------------- /Assignments/assets/fortune_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Assignments/assets/fortune_form.png -------------------------------------------------------------------------------- /Assignments/assets/weather_api.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Assignments/assets/weather_api.gif -------------------------------------------------------------------------------- /Examples/DiceGame/01-Functions/app.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | 3 | def play_dice_game(): 4 | """Plays a game by rolling two dice. If the rolls are the same, the user 5 | wins; if not, they lose. Returns a string representation of the outcome and 6 | rolls.""" 7 | die1 = randint(1, 6) 8 | die2 = randint(1, 6) 9 | 10 | if die1 == die2: 11 | return f"You won! You rolled {die1} and {die2}." 12 | else: 13 | return f"You lost :( You rolled {die1} and {die2}." -------------------------------------------------------------------------------- /Examples/DiceGame/02-Flask/app.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | from flask import Flask 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route("/") 7 | def play_dice_game(): 8 | """Plays a game by rolling two dice. If the rolls are the same, the user 9 | wins; if not, they lose. Returns a string representation of the outcome and 10 | rolls.""" 11 | die1 = randint(1, 6) 12 | die2 = randint(1, 6) 13 | 14 | if die1 == die2: 15 | return f"You won! You rolled {die1} and {die2}." 16 | else: 17 | return f"You lost :( You rolled {die1} and {die2}." 18 | 19 | if __name__ == "__main__": 20 | app.run(debug=True) -------------------------------------------------------------------------------- /Examples/DiceGame/03-Templates/app.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | from flask import Flask, render_template 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route("/") 7 | def play_dice_game(): 8 | """Plays a game by rolling two dice. If the rolls are the same, the user 9 | wins; if not, they lose. Returns a string representation of the outcome and 10 | rolls.""" 11 | die1 = randint(1, 6) 12 | die2 = randint(1, 6) 13 | 14 | return render_template("index.html", die1=die1, die2=die2) 15 | 16 | if __name__ == "__main__": 17 | app.run(debug=True) -------------------------------------------------------------------------------- /Examples/DiceGame/03-Templates/templates/index.html: -------------------------------------------------------------------------------- 1 | {% if die1 == die2 %} 2 | You won! You rolled {{die1}} and {{die2}}. 3 | {% else %} 4 | You lost :( You rolled {{die1}} and {{die2}}. 5 | {% endif %} -------------------------------------------------------------------------------- /Examples/DiceGame/04-HTML-Form/app.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | from flask import Flask, render_template, request 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route("/") 7 | def play_dice_game(): 8 | """Plays a game by rolling two dice. If the rolls are the same, the user 9 | wins; if not, they lose. Returns a string representation of the outcome and 10 | rolls.""" 11 | user_name = request.args.get("user_name") 12 | 13 | die1 = randint(1, 6) 14 | die2 = randint(1, 6) 15 | 16 | return render_template("index.html", die1=die1, die2=die2, user_name=user_name) 17 | 18 | if __name__ == "__main__": 19 | app.run(debug=True) 20 | -------------------------------------------------------------------------------- /Examples/DiceGame/04-HTML-Form/templates/index.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
6 | 7 | {% if user_name %} 8 | Hello {{ user_name }}! 9 | {% endif %} 10 | 11 | {% if die1 == die2 %} 12 | You won! You rolled {{die1}} and {{die2}}. 13 | {% else %} 14 | You lost :( You rolled {{die1}} and {{die2}}. 15 | {% endif %} -------------------------------------------------------------------------------- /Examples/DiceGame/05-Unit-Tests/app.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | from flask import Flask, render_template, request 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route("/") 7 | def play_dice_game(): 8 | """Plays a game by rolling two dice. If the rolls are the same, the user 9 | wins; if not, they lose. Returns a string representation of the outcome and 10 | rolls.""" 11 | user_name = request.args.get("user_name") 12 | 13 | die1 = randint(1, 6) 14 | die2 = randint(1, 6) 15 | 16 | return render_template( 17 | "index.html", 18 | die1=die1, 19 | die2=die2, 20 | user_name=user_name) 21 | 22 | if __name__ == "__main__": 23 | app.run(debug=True) 24 | -------------------------------------------------------------------------------- /Examples/DiceGame/05-Unit-Tests/app_test.py: -------------------------------------------------------------------------------- 1 | # First we need to import our app. 2 | # This test file should be in the same folder as your app.py file 3 | from app import app 4 | import unittest 5 | 6 | class AppTests(unittest.TestCase): 7 | 8 | # This runs implicitly before any tests are run 9 | # We use this to set up our app before we test on it 10 | def setUp(self): 11 | # creates a test client 12 | self.app = app.test_client() 13 | # propagate the exceptions to the test client 14 | self.app.testing = True 15 | 16 | def test_home_status_code(self): 17 | # sends HTTP GET request to the application 18 | # on the specified path 19 | result = self.app.get('/?user_name=Meredith') 20 | 21 | self.assertIn(b'Hello Meredith!', result.data) 22 | 23 | # assert the status code of the response 24 | self.assertEqual(result.status_code, 200) 25 | 26 | 27 | # run the tests 28 | if __name__ == '__main__': 29 | unittest.main() -------------------------------------------------------------------------------- /Examples/DiceGame/05-Unit-Tests/templates/index.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
6 | 7 | {% if user_name %} 8 | Hello {{ user_name }}! 9 | {% endif %} 10 | 11 | {% if die1 == die2 %} 12 | You won! You rolled {{die1}} and {{die2}}. 13 | {% else %} 14 | You lost :( You rolled {{die1}} and {{die2}}. 15 | {% endif %} -------------------------------------------------------------------------------- /Lessons/01-Static-Website/assets/basic-anatomy-of-xhtml-elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/01-Static-Website/assets/basic-anatomy-of-xhtml-elements.png -------------------------------------------------------------------------------- /Lessons/01-Static-Website/demo/forms-demo.html: -------------------------------------------------------------------------------- 1 |
2 | What is your name? 3 | 4 |
5 | 6 |
-------------------------------------------------------------------------------- /Lessons/01-Static-Website/demo/hello-world.html: -------------------------------------------------------------------------------- 1 | Hello World! -------------------------------------------------------------------------------- /Lessons/01-Static-Website/demo/html-demo-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My First Web Page 5 | 6 | 7 | Hello, World! 8 | 9 | -------------------------------------------------------------------------------- /Lessons/01-Static-Website/demo/html-demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My Awesome Page Title 5 | 6 | 7 | 8 |
9 |

Why Dogs are Cool

10 | 11 |

12 | This is an example of a paragraph. 13 |

14 | 15 |

16 | I like dogs because they are... 17 |

21 |

22 | 23 |

24 | My favorite dogs (in order) are: 25 |

    26 |
  1. Husky
  2. 27 |
  3. Chocolate Lab
  4. 28 |
  5. Shiba Inu
  6. 29 |
  7. Golden Doodle
  8. 30 |
31 |

32 | 33 |

34 | Here is a photo of a dog: 35 |

36 | cute dog 37 |

38 | 39 |

40 | Click here to adopt a dog! 41 |

42 |
43 | 44 | -------------------------------------------------------------------------------- /Lessons/01-Static-Website/demo/static/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/01-Static-Website/demo/static/dog.jpg -------------------------------------------------------------------------------- /Lessons/01-Static-Website/demo/static/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: #333; 3 | font-family: "Helvetica", "Arial"; 4 | } 5 | 6 | section#main { 7 | width: 800px; 8 | margin-left: auto; 9 | margin-right: auto; 10 | margin-top: 50px; 11 | padding: 50px; 12 | border: 1px solid #333; 13 | border-radius: 25px; 14 | } 15 | 16 | strong { 17 | color: #429ef5; 18 | } 19 | 20 | em { 21 | color: #42daf5; 22 | } -------------------------------------------------------------------------------- /Lessons/02-Git-and-GitHub/assets/github_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/02-Git-and-GitHub/assets/github_desktop.png -------------------------------------------------------------------------------- /Lessons/02-Git-and-GitHub/assets/shopping_cart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/02-Git-and-GitHub/assets/shopping_cart.jpg -------------------------------------------------------------------------------- /Lessons/03-Intro-to-Flask/assets/query.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/03-Intro-to-Flask/assets/query.jpg -------------------------------------------------------------------------------- /Lessons/03-Intro-to-Flask/assets/req-res.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/03-Intro-to-Flask/assets/req-res.gif -------------------------------------------------------------------------------- /Lessons/03-Intro-to-Flask/demo/README.md: -------------------------------------------------------------------------------- 1 | # How to Use This App 2 | 3 | Install Flask: 4 | 5 | ```bash 6 | $ pip3 install flask 7 | ``` 8 | 9 | Run the app: 10 | 11 | ```bash 12 | $ export FLASK_ENV=development; flask run 13 | ``` 14 | -------------------------------------------------------------------------------- /Lessons/03-Intro-to-Flask/demo/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/hello') 6 | def say_hello(): 7 | return "Hello, World!" 8 | 9 | @app.route('/user/') 10 | def say_hello_var(username): 11 | return 'Hi, ' + username 12 | 13 | @app.route('/double/') 14 | def double(the_number): 15 | return str(the_number * 2) 16 | 17 | @app.route('/double') 18 | def double2(): 19 | the_number = request.args.get('number') 20 | the_number = int(the_number) 21 | return str(the_number * 2) 22 | 23 | @app.route('/search') 24 | def search_page(): 25 | name = request.args.get('name') 26 | category = request.args.get('category') 27 | return 'You searched for ' + name + ' in the category ' + category 28 | 29 | @app.route('/search_form') 30 | def search_form(): 31 | return """ 32 |
33 | Type in the product name: 34 |
35 | Type in the category: 36 |
37 | 38 |
39 | """ 40 | 41 | @app.route('/login', methods=['POST']) 42 | def login(): 43 | username = request.form.get('username') 44 | password = request.form.get('password') 45 | return "Username is " + username + ", password is " + password 46 | 47 | @app.route('/login_form') 48 | def login_form(): 49 | return """ 50 |
51 | Username: 52 |
53 | Password: 54 |
55 | 56 |
57 | """ -------------------------------------------------------------------------------- /Lessons/03-Intro-to-Flask/demo/compliments.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request 2 | from random import choice, sample 3 | 4 | app = Flask(__name__) 5 | 6 | compliments = [ 7 | 'awesome', 'terrific', 'fantastic', 'neato', 'fantabulous', 'wowza', 8 | 'oh-so-not-meh', 'brilliant', 'ducky', 'coolio', 'incredible', 9 | 'wonderful', 'smashing', 'lovely', 'tenacious', 'Pythonic'] 10 | 11 | @app.route('/') 12 | def index(): 13 | """Show the homepage and ask the user's name.""" 14 | return """ 15 |
16 |

17 | What is your name? 18 | 19 |

20 |

21 | 22 | Show Compliments 23 |

24 |

25 | How many compliments? 26 | 31 |

32 | 33 |
34 | """ 35 | 36 | @app.route('/compliment') 37 | def get_compliment(): 38 | """Give the user a compliment""" 39 | name = request.args.get('name') 40 | num_compliments = int(request.args.get('num_compliments')) 41 | show_compliments = request.args.get('show_compliments') 42 | nice_things = ', '.join(sample(compliments, num_compliments)) 43 | 44 | if show_compliments: 45 | return f'Hello there, {name}! You are so {nice_things}!' 46 | else: 47 | return f'Hello there, {name}! Have a nice day!' 48 | 49 | if __name__ == '__main__': 50 | app.run(debug=True) 51 | -------------------------------------------------------------------------------- /Lessons/04-Flask-Templating/demo/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template, request 2 | 3 | app = Flask(__name__) 4 | 5 | 6 | @app.route('/hello') 7 | def say_hello(): 8 | """Say hello.""" 9 | return render_template('greeting.html') 10 | 11 | @app.route('/items') 12 | def show_items(): 13 | """Show a list of items.""" 14 | items_to_show = [ 15 | 'Pumpkins', 16 | 'Karaoke Machine', 17 | 'Disco Ball', 18 | 'Fog Machine' 19 | ] 20 | 21 | return render_template( 22 | 'items_list.html', 23 | items=items_to_show) 24 | -------------------------------------------------------------------------------- /Lessons/04-Flask-Templating/demo/compliments/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request, render_template 2 | from random import choice, sample 3 | 4 | app = Flask(__name__) 5 | 6 | compliments = [ 7 | 'awesome', 'terrific', 'fantastic', 'neato', 'fantabulous', 'wowza', 8 | 'oh-so-not-meh', 'brilliant', 'ducky', 'coolio', 'incredible', 9 | 'wonderful', 'smashing', 'lovely', 'tenacious', 'Pythonic'] 10 | 11 | @app.route('/') 12 | def index(): 13 | """Show the homepage and ask the user's name.""" 14 | return render_template('index.html') 15 | 16 | @app.route('/compliment') 17 | def get_compliment(): 18 | """Give the user a compliment""" 19 | name = request.args.get('name') 20 | num_compliments = int(request.args.get('num_compliments')) 21 | show_compliments = request.args.get('show_compliments') 22 | compliments_to_show = sample(compliments, num_compliments) 23 | 24 | return render_template( 25 | 'compliments.html', 26 | name=name, 27 | show_compliments=show_compliments, 28 | compliments=compliments_to_show) 29 | 30 | if __name__ == '__main__': 31 | app.run(debug=True) 32 | -------------------------------------------------------------------------------- /Lessons/04-Flask-Templating/demo/compliments/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My First App 5 | 6 | 7 | {% block body %}{% endblock %} 8 | 9 | -------------------------------------------------------------------------------- /Lessons/04-Flask-Templating/demo/compliments/templates/compliments.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block body %} 4 |

5 | Hello there, {{name}}! 6 | {% if show_compliments %} 7 | You are so: 8 |

13 | {% else %} 14 | Have a nice day! 15 | {% endif %} 16 |

17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /Lessons/04-Flask-Templating/demo/compliments/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block body %} 4 |
5 |

6 | What is your name? 7 | 8 |

9 |

10 | 11 | Show Compliments 12 |

13 |

14 | How many compliments? 15 | 20 |

21 | 22 |
23 | {% endblock %} -------------------------------------------------------------------------------- /Lessons/04-Flask-Templating/demo/templates/greeting.html: -------------------------------------------------------------------------------- 1 | Hello, World! -------------------------------------------------------------------------------- /Lessons/04-Flask-Templating/demo/templates/items_list.html: -------------------------------------------------------------------------------- 1 | {% if items %} 2 | The items are: 3 | 8 | {% else %} 9 | No items to show! 10 | {% endif %} -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/cards.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/cards.jpg -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/inseev-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/inseev-1.jpg -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/query.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/query.jpg -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/req-res-detailed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/req-res-detailed.gif -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/request.png -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/sources-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/05-URLs-HTTP-REST-and-Reading-Errors/assets/sources-tab.png -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/demo/apis_demo_flask.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from flask import Flask, render_template 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route('/joke') 7 | def make_joke(): 8 | params = { 9 | "limitTo": "nerdy", 10 | "firstName": "Bruce", 11 | "lastName": "Wayne" 12 | } 13 | r = requests.get("http://api.icndb.com/jokes/random", params=params) 14 | joke_json = r.json() 15 | joke_str = joke_json["value"]["joke"] 16 | return render_template("joke.html", joke=joke_str) 17 | 18 | if __name__ == "__main__": 19 | app.run() -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/demo/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/color') 6 | def fav_color(): 7 | """Shows user a form.""" 8 | return """ 9 |
10 | What is your favorite color? 11 | 12 |
13 | 14 |
15 | """ 16 | 17 | @app.route('/color_results') 18 | def color_results(): 19 | users_fav_color = request.args.get("color") 20 | 21 | return "Your favorite color is " + users_fav_color -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/demo/templates/joke.html: -------------------------------------------------------------------------------- 1 | Here is your joke: {{ joke }} -------------------------------------------------------------------------------- /Lessons/05-URLs-HTTP-REST-and-Reading-Errors/demo/weather_api.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import pprint 3 | 4 | pp = pprint.PrettyPrinter(indent=4) 5 | 6 | weather_url = "http://api.openweathermap.org/data/2.5/weather?q=San+Francisco&appid=2608f679d4594364525f6c6cc2246c79" 7 | 8 | response = requests.get(weather_url) 9 | response_json = response.json() 10 | pp.pprint(response_json) 11 | 12 | main_data = response_json["main"] 13 | temp_in_kelvin = main_data["temp"] 14 | 15 | print("It is now " + str(temp_in_kelvin) + " degrees kelvin.") -------------------------------------------------------------------------------- /Lessons/06-Testing-RESTful-Routes/agenda.md: -------------------------------------------------------------------------------- 1 | # Testing RESTful Routes 2 | 3 | ### [Slides](https://make-school-courses.github.io/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/Slides/06-Testing-RESTful-Routes.html) 4 | ### [Demo](https://github.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/tree/master/Lessons/06-Testing-RESTful-Routes/demo) 5 | 6 | 7 | ## Agenda 8 | 9 | 1. [Learning Objectives](#learning-objectives) 10 | 1. [Why Test Our Routes?](#why-test-our-routes?) 11 | 1. [Forms of Testing](#forms-of-testing) 12 | 1. [Unit Tests](#unit-tests) 13 | 1. [Break](#break) 14 | 1. [Route Tests](#route-tests) 15 | 16 | 17 | ## Learning Objectives 18 | 19 | 1. List various types of automated tests 20 | 1. Define unit tests and how to implement them in Python 21 | 1. Implement route tests for one resource 22 | 23 | 24 | ## Activity: Unit Tests 25 | 26 | Clone the repository [here](https://github.com/Make-School-Labs/Flask-Testing-Starter) and write tests for the other functions. 27 | 28 | 29 | ## Activity: Test Fortune Teller 30 | 31 | Write at least four route tests for your Fortune Teller project (one for each possible fortune). 32 | 33 | 34 | ## Vibe Check 35 | 36 | Go to [https://make.sc/bew1.1-vibe-check](https://make.sc/bew1.1-vibe-check) and fill out the form. 37 | 38 | ## Homework 39 | 40 | Homework 3 (Weather App) is due tonight at midnight. 41 | 42 | ## Resources 43 | - [Python unittest docs](https://docs.python.org/3/library/unittest.html) 44 | -------------------------------------------------------------------------------- /Lessons/06-Testing-RESTful-Routes/assets/if_else.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/06-Testing-RESTful-Routes/assets/if_else.png -------------------------------------------------------------------------------- /Lessons/06-Testing-RESTful-Routes/assets/spaceman_flowchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/06-Testing-RESTful-Routes/assets/spaceman_flowchart.png -------------------------------------------------------------------------------- /Lessons/06-Testing-RESTful-Routes/demo/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template, request 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def index(): 7 | return 'Hello, world!' 8 | 9 | @app.route('/fortune') 10 | def fortune(): 11 | return """ 12 |
13 | What is your favorite animal? 14 |
15 | 16 |
17 | """ 18 | 19 | @app.route('/fortune_results') 20 | def fortune_results(): 21 | users_favorite_animal = request.args.get('animal') 22 | fortune = '' 23 | if users_favorite_animal == 'unicorn': 24 | fortune = 'You\'ll have a magical day!' 25 | elif users_favorite_animal == 'cat': 26 | fortune = 'Your day will be paw-some!' 27 | else: 28 | fortune = 'Nothing of note will happen today.' 29 | 30 | return f'Your fortune is: {fortune}' 31 | 32 | 33 | if __name__ == '__main__': 34 | app.run(debug=True) -------------------------------------------------------------------------------- /Lessons/06-Testing-RESTful-Routes/demo/string_tests.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | def greet_by_name(name): 4 | """Greet user by name.""" 5 | greeting = "Hello, " + name + "!" 6 | return greeting 7 | 8 | class StringFunctionTests(unittest.TestCase): 9 | def test_greeting(self): 10 | """Test the greeting function.""" 11 | self.assertEqual(greet_by_name('Dani'), 'Hello, Mark!') 12 | 13 | if __name__ == '__main__': 14 | unittest.main() -------------------------------------------------------------------------------- /Lessons/06-Testing-RESTful-Routes/demo/tests.py: -------------------------------------------------------------------------------- 1 | from app import app 2 | import unittest 3 | 4 | class AppTests(unittest.TestCase): 5 | 6 | def setUp(self): 7 | self.app = app.test_client() 8 | self.app.testing = True 9 | 10 | def test_home_status_code(self): 11 | result = self.app.get('/') 12 | self.assertEqual(result.status_code, 200) 13 | 14 | def test_fortune_results_default_response(self): 15 | result = self.app.get('/fortune_results') 16 | self.assertIn('Nothing of note', result.get_data(as_text=True)) 17 | 18 | def test_fortune_results_unicorn(self): 19 | result = self.app.get('/fortune_results?animal=unicorn') 20 | self.assertIn('magical day', result.get_data(as_text=True)) 21 | 22 | def test_fortune_results_cat(self): 23 | result = self.app.get('/fortune_results?animal=cat') 24 | print(result) 25 | self.assertIn('will be paw-some', result.get_data(as_text=True)) 26 | 27 | # run the tests 28 | if __name__ == '__main__': 29 | unittest.main() -------------------------------------------------------------------------------- /Lessons/07-Model-View-Controller/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | # Model, View, Controller 7 | 8 | 9 | 10 | 11 | ## Agenda 12 | 13 | 1. Submit GIF Search [5 mins] 14 | 1. Essential Question & Discussion [15 mins] 15 | 1. Model, View, Controller [20 mins] 16 | 1. Activity [40 mins] 17 | 1. How Flask works / Quiz review [25 mins] 18 | 19 | 20 | 21 | ## Submit GIF Search 22 | 23 | Visit [make.sc/submit-gif-search](http://make.sc/submit-gif-search) to submit. 24 | 25 | 26 | 27 | ## Essential Question 28 | 29 | How do pages on the Web communicate with each other? 30 | 31 | 32 | 33 | ## Think, Pair, Share [15 mins] 34 | 35 | Let's say I go to Amazon.com, search for an item, and put it into my shopping cart. 36 | 37 | *How* does this happen? If Amazon were an app written in Flask, what would it look like? Write down *everything* you know. 38 | 39 | 40 | 41 | # Model, View, Controller 42 | 43 | 44 | 45 | ## Overview 46 | 47 | When we write code for a web server, we typically use a convention known as **Model, View, Controller**. 48 | 49 | ![Restaurant](assets/restaurant.png) 50 | 51 | 52 | 53 | ## Controller 54 | 55 | The **controller** is like the waiter. 56 | 57 | In our Flask application, the **controller** is the routes contained in `app.py`. 58 | 59 | ![Waiter](assets/waiter.jpeg) 60 | 61 | 62 | 63 | ## View 64 | 65 | The **view** is like the menu. 66 | 67 | In our Flask application, our **views** are the HTML pages. 68 | 69 | ![Menu](assets/menu.png) 70 | 71 | 72 | 73 | ## Model 74 | 75 | The **model** is like the food! 76 | 77 | In our Flask application, the **model** is the data being passed back and forth between the client and server. 78 | 79 | ![Food](assets/food.png) 80 | 81 | 82 | 83 | ## Activity 84 | 85 | 1. What are the Model, View, and Controller, and what do they represent in our Flask app? Make sure each person understands before moving on. 86 | 1. Choose a website that you use frequently and at least one way you interact with that website. Ex: Searching for cat videos on YouTube. 87 | 1. Decide who will be the Model, View, Controller, and User. Write a short skit and have each person act out their role. 88 | 1. Practice your skit! 89 | 90 | 91 | 92 | ## Review 93 | 94 | Let's review the Dice Game activity [here](https://github.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/tree/master/Examples/DiceGame/05-Unit-Tests). 95 | 96 | 97 | 98 | ## Playlister Tutorial 99 | 100 | Check out the tutorial here: make.sc/playlister 101 | 102 | Due Thurs, Sept. 26 103 | 104 | 105 | 106 | ## Announcements 107 | 108 | Quiz on Tuesday, Sept. 24 covering APIs, `curl`, `requests`, and testing -------------------------------------------------------------------------------- /Lessons/07-Model-View-Controller/assets/food.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/07-Model-View-Controller/assets/food.png -------------------------------------------------------------------------------- /Lessons/07-Model-View-Controller/assets/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/07-Model-View-Controller/assets/menu.png -------------------------------------------------------------------------------- /Lessons/07-Model-View-Controller/assets/mvc-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/07-Model-View-Controller/assets/mvc-simple.png -------------------------------------------------------------------------------- /Lessons/07-Model-View-Controller/assets/restaurant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/07-Model-View-Controller/assets/restaurant.png -------------------------------------------------------------------------------- /Lessons/07-Model-View-Controller/assets/waiter.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/07-Model-View-Controller/assets/waiter.jpeg -------------------------------------------------------------------------------- /Lessons/07-More-Testing/assets/ditto.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/07-More-Testing/assets/ditto.gif -------------------------------------------------------------------------------- /Lessons/07-More-Testing/assets/tennis-ball-machine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/07-More-Testing/assets/tennis-ball-machine.gif -------------------------------------------------------------------------------- /Lessons/07-More-Testing/demo/app.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from flask import Flask, render_template, request 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route('/weather') 7 | def weather_form(): 8 | return """ 9 |
10 | Type in your city: 11 |
12 | 13 |
14 | """ 15 | 16 | @app.route('/weather_results') 17 | def weather_results(): 18 | 19 | params = { 20 | 'q': request.args.get('city'), 21 | 'units': 'Imperial', 22 | 'appid': '2608f679d4594364525f6c6cc2246c79' 23 | } 24 | weather_url = 'http://api.openweathermap.org/data/2.5/weather' 25 | 26 | response = requests.get(weather_url, params=params) 27 | response_json = response.json() 28 | 29 | temp = response_json["main"]["temp"] 30 | 31 | return "It is now " + str(temp) + " degrees Fahrenheit." 32 | 33 | if __name__ == "__main__": 34 | app.run() -------------------------------------------------------------------------------- /Lessons/07-More-Testing/demo/tests.py: -------------------------------------------------------------------------------- 1 | from app import app 2 | from unittest import TestCase, main 3 | from unittest.mock import patch, ANY 4 | 5 | class AppTests(TestCase): 6 | 7 | def setUp(self): 8 | self.app = app.test_client() 9 | self.app.testing = True 10 | 11 | @patch('app.requests.get') 12 | def test_weather_results(self, requests_get): 13 | mock_response = requests_get() 14 | mock_response.json.return_value = { 15 | 'main': { 'temp': 62 } 16 | } 17 | result = self.app.get('/weather_results?city=Tokyo') 18 | self.assertEqual(result.status_code, 200) 19 | 20 | page_content = result.get_data(as_text=True) 21 | self.assertIn('It is now 62 degrees Fahrenheit', page_content) 22 | 23 | requests_get.assert_called_with(ANY, 24 | params={'q': 'Tokyo', 'units': 'Imperial', 'appid': ANY}) 25 | 26 | # run the tests 27 | if __name__ == '__main__': 28 | main() 29 | -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/assets/Flask-Mongo-Diagram.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/08-Document-Based-Databases/assets/Flask-Mongo-Diagram.jpeg -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/assets/MongoDB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/08-Document-Based-Databases/assets/MongoDB.jpg -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/assets/banner-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/08-Document-Based-Databases/assets/banner-image.jpg -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/assets/doc-based-db.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/08-Document-Based-Databases/assets/doc-based-db.jpg -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/assets/drycleaners.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/08-Document-Based-Databases/assets/drycleaners.jpeg -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/assets/mongodb_compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/08-Document-Based-Databases/assets/mongodb_compass.png -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/assets/relational-vs-document.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/08-Document-Based-Databases/assets/relational-vs-document.jpg -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/demo/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request 2 | from flask_pymongo import PyMongo 3 | from bson.json_util import dumps 4 | 5 | # Set up the Flask 'app' variable 6 | app = Flask(__name__) 7 | 8 | # Tell Flask how to find our database 9 | app.config['MONGO_URI'] = 'mongodb://localhost:27017/test_db' 10 | mongo = PyMongo(app) 11 | db = mongo.db 12 | 13 | @app.route('/users', methods=['GET']) 14 | def get_all_users(): 15 | """Display all users in JSON form.""" 16 | # Find all users 17 | users_list = db.users.find({}) 18 | 19 | # Make JSON containing list of all users (for easier use in HTML) 20 | users_json = dumps(users_list) 21 | 22 | # Render some HTML containing the list of all users 23 | return """ 24 | New User 25 |

26 | Users: {} 27 | """.format(users_json) 28 | 29 | @app.route('/new_user') 30 | def new_user_form(): 31 | """Display an HTML form for user creation.""" 32 | 33 | return """ 34 |
35 | Username: 36 | Password: 37 | Bio: 38 | 39 |
40 | """ 41 | 42 | @app.route('/users', methods=['POST']) 43 | def create_user(): 44 | """Create a new user.""" 45 | 46 | # Make the new user JSON from form data 47 | new_user = { 48 | "username": request.form.get('username'), 49 | "password": request.form.get('password'), 50 | "bio": request.form.get('bio'), 51 | } 52 | 53 | # Insert into PyMongo database 54 | db.users.insert_one(new_user) 55 | 56 | # Render some HTML 57 | return """ 58 | User created successfully! 59 | Back to Home 60 | """ 61 | 62 | if __name__ == '__main__': 63 | app.run(debug=True) -------------------------------------------------------------------------------- /Lessons/08-Document-Based-Databases/demo/songs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/08-Document-Based-Databases/demo/songs.py -------------------------------------------------------------------------------- /Lessons/09-ERDs-Resource-Associations-and-MongoDB/README.md: -------------------------------------------------------------------------------- 1 | 2 | # ERDs, Resource Associations, & MongoDB 3 | 4 | ### [Slides](https://make-school-courses.github.io/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/Slides/09-ERDs-Resource-Associations-and-MongoDB/README ':ignore') 5 | ### [Demo](https://github.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/tree/master/Lessons/09-ERDs-Resource-Associations-and-MongoDB/demo) 6 | 7 | 8 | 9 | ## Objectives 10 | 11 | 1. Master drawing a simple **Entity Relationship Diagrams** (ERDs) (2-5 resources) 12 | 1. Utilize the common verbiage for defining **Resource Associations** 13 | 14 | 15 | 16 | # Resource Associations 17 | 18 | 19 | 20 | ## Types of Associations 21 | 22 | There are three sorts of resource associations: 23 | 24 | 1. **One-to-Many** or *Has Many/Belongs To* 25 | 1. **One-to-One** or *Has One/Belongs To* 26 | 1. **Many-to-Many** or *Has And Belongs to Many*, or *Has Many Through* 27 | 28 | 29 | 30 | ## One-to-One 31 | 32 | A **person** has _exactly_ one **passport**. (A passport belongs to one person.) 33 | 34 | ![one-to-one](assets/one-to-one.png) 35 | 36 | 37 | 38 | ## One-to-Many 39 | 40 | A **person** _has many_ **pets**. (A pet belongs to exactly one person.) 41 | 42 | ![one-to-many](assets/one-to-many.png) 43 | 44 | 45 | 46 | ## Many-to-Many 47 | 48 | A **person** _can attend many_ **picnics**, and many people can attend one picnic. 49 | 50 | ![many-to-many](assets/many-to-many.png) 51 | 52 | 53 | 54 | ## Examples 55 | 56 |
57 | 58 | * **[Common] Facebook** - One to Many: 59 | * Users have many Posts 60 | * Users have many Comments 61 | * Users have many Likes 62 | 63 | * **[Common] Eventbright** - Has and Belongs to Many: 64 | * Users have many Events as reservations 65 | * Users belong to many Events as guests 66 | 67 | * **[Rare] Eventbright** - Has One/Belongs To 68 | * User has one Profile 69 | * User has one Credit Card 70 |
71 | 72 | 73 | 74 | ## Entity Relationship Diagrams — ERDs 75 | 76 | Before you code a project, it's a good idea to spend some time thinking about the relationships between objects. 77 | 78 | Connect resources in boxes with arrows depending on their relationship: 79 | 80 | 1. One-to-Many: `=>` 81 | 1. Many-to-Many: `<=>` 82 | 1. One-to-One: `-->` 83 | 84 | 85 | 86 | ## A Blog ERD 87 | 88 | ![Blog erd](assets/blog-erd.png) 89 | 90 | 91 | 92 | ## A School ERD 93 | 94 | ![School erd](assets/school-erd.png) 95 | 96 | 97 | 98 | ## Activity - Drawing ERDs [15 min] 99 | 100 | Draw ERDs for the core features of 3 the following applications. When you finish each one, check with a partner. Form into groups of 4 and show your favorites off. 101 | 102 | 1. Lyft 103 | 1. Pinterest 104 | 1. Airbnb 105 | 1. Facebook 106 | 1. Apple App Store 107 | 108 | 109 | 110 | 111 | ## Break [10 mins] 112 | 113 | 114 | 115 | 116 | # Modeling Associations 117 | 118 | 119 | 120 | ## Modeling Associations Using MongoDB 121 | 122 | In a document-based database these **Resource Associations** are modeled in a few ways. Here they are ordered by frequency 123 | 124 | 1. Reference Documents (very common) 125 | 2. Value Associations (pretty common) 126 | 3. Embedded Documents (very rare) 127 | 128 | 129 | 130 | ## Reference Documents 131 | 132 | In this case, each **document** (e.g. user or post) contains a reference to the **_id** field of the documents it's related to. 133 | 134 | ```py 135 | # User has many posts 136 | { 137 | "_id": ObjectId("dsf675as6f6a4s6f") 138 | "name": "Ada Lovelace", 139 | "posts": [ObjectId("a41492308329r900sdf"), ObjectId("9309safd0as0f9f098af")] 140 | } 141 | 142 | # Post belongs to user (as author) 143 | { 144 | "_id": ObjectId("a41492308329r900sdf") 145 | "title": "Understanding Model View Controller", 146 | "author": ObjectId("dsf675as6f6a4s6f") 147 | } 148 | ``` 149 | 150 | 151 | 152 | ## Value Association 153 | 154 | In this case, a document contains a reference to the **value** (usually a name or ID code) of its related documents. The document for a Reddit post might look like this: 155 | 156 | ```json 157 | { 158 | "title": "Mastering the Three Ball Cascade", 159 | "subreddit": "Jugglers Anonymous" 160 | } 161 | ``` 162 | 163 | And we can find all posts in a subreddit like this: 164 | 165 | ```py 166 | # Return all Posts in a specific subreddit: 167 | juggling_posts = db.Posts.find({subreddit: "Jugglers Anonymous"}) 168 | for post in juggling_posts: 169 | print(post.title) 170 | ``` 171 | 172 | 173 | 174 | ## Embedded Documents 175 | 176 | Rare for one-to-many associations. 177 | 178 | Only use when you always want all children to appear with the parent, or if you don't want to edit the children very much or at all. 179 | 180 | ```py 181 | embedded_post = { 182 | "title": "Awesome Article", 183 | "comments": [ 184 | { "content": "What a great article" }, 185 | { "content": "Agreed!" } 186 | ] 187 | } 188 | 189 | db.Posts.insert_one(embedded_post) 190 | ``` 191 | 192 | 193 | 194 | ## Activity 195 | 196 | Choose one of your resource diagrams and decide whether to model the associations as a **Reference to Document**, **Value Association**, or **Embedded Document**. What are the pros and cons of each? 197 | 198 | If you finish early, work on your Playlister tutorial! 199 | 200 | 201 | 202 | 203 | ## Homework 204 | 205 | - Playlister tutorial due on Monday, Dec 9 206 | 207 | - [Contractor Project](https://docs.google.com/document/d/1C8eOyLBeGMKJ2y50QwLU5tWjNb2JVcpAE4khUBIfm0U/edit) due on Thursday, Dec 12 208 | 209 | 210 | 211 | ## Resources 212 | 213 | - [Mongo Shell Quick Reference](https://docs.mongodb.com/manual/reference/mongo-shell/) 214 | - [Mongo Shell Manual](https://docs.mongodb.com/manual/mongo/) 215 | - [PyMongo Documentation](https://api.mongodb.com/python/current/) 216 | - [Flask-PyMongo Documentation](https://flask-pymongo.readthedocs.io/en/latest/) 217 | -------------------------------------------------------------------------------- /Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/blog-erd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/blog-erd.png -------------------------------------------------------------------------------- /Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/many-to-many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/many-to-many.png -------------------------------------------------------------------------------- /Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/one-to-many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/one-to-many.png -------------------------------------------------------------------------------- /Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/one-to-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/one-to-one.png -------------------------------------------------------------------------------- /Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/school-erd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/09-ERDs-Resource-Associations-and-MongoDB/assets/school-erd.png -------------------------------------------------------------------------------- /Lessons/09-ERDs-Resource-Associations-and-MongoDB/demo/events.py: -------------------------------------------------------------------------------- 1 | from pymongo import MongoClient 2 | 3 | client = MongoClient() 4 | 5 | client.drop_database('test_database') 6 | db = client.test_database 7 | 8 | # Add a user to represent a single Guest 9 | first_guest = { 10 | "name": "Dani", 11 | "rsvps": [] 12 | } 13 | 14 | # Insert the new Guest 15 | first_guest_inserted = db.Guests.insert_one(first_guest) 16 | print(first_guest_inserted) 17 | first_guest_id = first_guest_inserted.inserted_id 18 | 19 | # Create a dictionary to represent a new Event. 20 | # Add our first guest to the list of invitees: 21 | new_event = { 22 | "title": "Burning Man", 23 | "description": "Hang out in the desert", 24 | "guests": [first_guest_id] 25 | } 26 | 27 | # Insert the Event object into the Events collection. 28 | # Once added to the collection, we can store the saved Event ID for later use: 29 | new_event_id = db.Events.insert_one(new_event).inserted_id 30 | 31 | # Allow the first_guest to RSVP for the new_event: 32 | db.Guests.find_one_and_update({'_id': first_guest_id}, {'$push': {'rsvps': new_event_id }}) 33 | 34 | # Print events 35 | for event in db.Events.find(): 36 | print(event) 37 | 38 | # Print guests 39 | for guest in db.Guests.find(): 40 | print(guest) -------------------------------------------------------------------------------- /Lessons/09-ERDs-Resource-Associations-and-MongoDB/demo/juggling.py: -------------------------------------------------------------------------------- 1 | from pymongo import MongoClient 2 | 3 | client = MongoClient() 4 | 5 | client.drop_database('test_database') 6 | db = client.test_database 7 | 8 | new_post = { 9 | 'title': 'Mastering the Three Ball Cascade', 10 | 'subreddit': 'Jugglers Anonymous' 11 | } 12 | 13 | db.Posts.insert_one(new_post) 14 | 15 | # Return all Posts in a specific subreddit: 16 | juggling_posts = db.Posts.find({'subreddit': 'Jugglers Anonymous'}) 17 | for post in juggling_posts: 18 | print(post) 19 | 20 | -------------------------------------------------------------------------------- /Lessons/10-Project-Planning-and-User-Centered-Development/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Project Planning & User-Centered Development 3 | 4 | ### [Slides](https://make-school-courses.github.io/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/Slides/10-Project-Planning-and-User-Centered-Development.html ':ignore') 5 | ### [Demo](https://github.com/meredithcat/Candies-App-Contractor-Project) 6 | 7 | 8 | 9 | ## Objectives 10 | 11 | 1. Describe the process of User-Centered Development 12 | 1. Create wireframes, user stories, & an ERD for your app 13 | 1. Compare and contrast GET and POST methods 14 | 1. Write routes & templates corresponding to pages in your app 15 | 16 | 17 | 18 | # How to Plan a Project 19 | 20 | 21 | 22 | ## Wireframes 23 | 24 | Wireframes are rough sketches of what you want your web pages to look like. 25 | 26 | Take a look at this [example](assets/wireframe_example.png). 27 | 28 | 29 | 30 | ## User Stories 31 | 32 | A User Story is a description of how a user interacts with your app and what benefit they get from doing so. 33 | 34 | "As a user, I want to *function* so that *benefit*" 35 | 36 | *e.g. "As a user, I want to **buy fruits** so that I can **send a nice gift** to my best friend."* 37 | 38 | 39 | 40 | ## Entity Relationship Diagrams 41 | 42 | An **Entity Relationship Diagram** (or ERD) shows the relationships between the resources used on your site. 43 | 44 | Reminder that a **resource** is any entity you want to store in your database! E.g. for a shoe selling site, the resources might be *users*, *shoes*, and *shopping carts*. 45 | 46 | 47 | 48 | ## Activity [30 mins] 49 | 50 | Fill out the worksheet for *your specific project*: 51 | 52 | - Wireframes 53 | - User Stories 54 | - Entity Relationship Diagram 55 | 56 | Once you finish each part, find a reviewer to look over your work and give feedback. ***Each part of the worksheet must be reviewed by a different person!*** 57 | 58 | 59 | 60 | ## Break [10 mins] 61 | 62 | 63 | 64 | 65 | # HTTP Methods 66 | 67 | 68 | 69 | ## What are HTTP Methods? 70 | 71 | HTTP Methods correspond roughly to the CRUD operations we've studied previously. They are as follows: 72 | 73 | | HTTP Verb | CRUD Operation | 74 | | ----------- | ----------- | 75 | | POST | Create | 76 | | GET | Read | 77 | | PUT/PATCH | Update | 78 | | DELETE | Delete | 79 | 80 | 81 | 82 | ## What about form methods? 83 | 84 |
85 | 86 | An HTML form can only have one of two methods: **GET** or **POST**. 87 | 88 | - GET is used when we are only reading (and not changing) data. Example: A search bar that filters search results 89 | 90 | - POST is used when we are changing (creating, updating, deleting) data. 91 | 92 |
93 | 94 | | HTTP Verb | CRUD Operation | Form Method | 95 | | ----------- | ----------- | -------------- | 96 | | POST | Create | POST | 97 | | GET | Read | GET | 98 | | PUT/PATCH | Update | POST | 99 | | DELETE | Delete | POST | 100 | 101 | 102 | 103 | ## Example: GET 104 | 105 | If our HTML form looks like this: 106 | 107 | ```html 108 |
109 | Type in your city: 110 | 111 | 112 |
113 | ``` 114 | 115 | Then your route will look like this: 116 | 117 | ```py 118 | @app.route('/', methods=['GET']) 119 | def home_page(): 120 | city_name = request.args.get('city') 121 | ... 122 | ``` 123 | 124 | 125 | 126 | ## Example: POST 127 | 128 | If our HTML form looks like this: 129 | 130 | ```html 131 |
132 | Type in your username: 133 | 134 | 135 |
136 | ``` 137 | 138 | Then your route will look like this: 139 | 140 | ```py 141 | @app.route('/', methods=['POST']) 142 | def home_page(): 143 | username = request.form.get('username') 144 | ... 145 | ``` 146 | 147 | 148 | 149 | # More Project Tips 150 | 151 | 152 | 153 | ## Workflow 154 | 155 | What should I write first? Here's a rough list. 156 | 157 | 1. Choose a page from your wireframes to start with. 158 | 159 | 1. Write a route to correspond to that page. 160 | 161 | 1. Write a template for the page. 162 | 163 | 1. Repeat from step 1. 164 | 165 | 166 | 167 | 168 | ## Reminder: Errors = Signposts! 169 | 170 | If you encounter an error, *it is telling you what to do next!* 171 | 172 | ![Error Page](assets/error_page.png) 173 | 174 | 175 | 176 | ## Example App 177 | 178 | Explore this [example app](https://candies-app-mm.herokuapp.com/) and its [source code](https://github.com/meredithcat/Candies-App-Contractor-Project). 179 | 180 | 181 | 182 | ## Announcements 183 | 184 | Playlister tutorial is due **today** by 11:59pm! Add your repository link to the [Progress Tracker](https://make.sc/bew1.1-tracker). 185 | 186 | Contractor project is due on **Thursday, October 10** at 11:59pm. 187 | 188 | 189 | 190 | ## Resources 191 | 192 | - [Flask Tutorial](https://pythonspot.com/flask-web-app-with-python/) 193 | - [PyMongo Tutorial](https://api.mongodb.com/python/current/tutorial.html) 194 | - [More on User-Centered Design](https://www.interaction-design.org/literature/topics/user-centered-design) 195 | - [What is an MVP?](https://www.agilealliance.org/glossary/mvp/) 196 | -------------------------------------------------------------------------------- /Lessons/10-Project-Planning-and-User-Centered-Development/assets/error_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/10-Project-Planning-and-User-Centered-Development/assets/error_page.png -------------------------------------------------------------------------------- /Lessons/10-Project-Planning-and-User-Centered-Development/assets/wireframe_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/10-Project-Planning-and-User-Centered-Development/assets/wireframe_example.png -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/different-environments.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/11-Deployment-Environments/assets/different-environments.jpg -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/elephant.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/11-Deployment-Environments/assets/elephant.jpg -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/heroku.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/interesting.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/11-Deployment-Environments/assets/interesting.jpg -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/microservices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/11-Deployment-Environments/assets/microservices.png -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/pastedImage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/11-Deployment-Environments/assets/pastedImage_1.png -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/realtime-api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/11-Deployment-Environments/assets/realtime-api.png -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/rest-services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/11-Deployment-Environments/assets/rest-services.png -------------------------------------------------------------------------------- /Lessons/11-Deployment-Environments/assets/worksonmymachine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Lessons/11-Deployment-Environments/assets/worksonmymachine.jpg -------------------------------------------------------------------------------- /Lessons/12-Presentation-Practice/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Presentation Practice & Lab Day 5 | 6 | 7 | 8 | 9 | ## [**5m**] Objectives 10 | 11 | **By the end of this class, you'll be able to...** 12 | 13 | 1. Identify your public speaking strengths and weaknesses. 14 | 1. Give a mock presentation in a small group. 15 | 1. Identify any blockers or difficulties you face with the Contractor Project. 16 | 17 | 18 | 19 | # Presentation Skill Practice 20 | 21 | 22 | 23 | ## Presentation Rubric [5 minutes] 24 | 25 | Read over the presentation rubric and identify **3 public speaking skills** that you would like to improve on. 26 | 27 | Find a partner and share. 28 | 29 | 30 | 31 | ## Presentation Practice [15 minutes] 32 | 33 |
  1. 34 | 35 | On your own, write an outline of what you will talk about in your presentation. Topics to include are: **your project idea/wireframes, your work thus far, and the challenges remaining.** 36 | 37 |
  2. 38 | 39 | 40 |
  3. 41 | With your partner, give your presentation as if you were speaking to an audience. Don't worry if it's not done yet; this is just practice! 42 |
  4. 43 | 44 | 45 |
  5. 46 | Exchange feedback based on the presentation rubric. 47 |
  6. 48 | 49 |
50 | 51 | 52 | 53 | ## Small Group Practice [20 minutes] 54 | 55 | In your small group, give your presentation again. Limit each presenter to 2 minutes or less, then spend 2 minutes giving feedback (Glows and Grows). 56 | 57 | 58 | 59 | # Lab/Workshop 60 | 61 | 62 | 63 | ## Lab Instructions 64 | 65 | Write your name on the board, along with the topic you'd like help with (e.g. MongoDB, Bootstrap, Heroku). 66 | 67 | If you see a topic you feel confident with, jump in and help someone else out! 68 | 69 | 70 | 71 | ## Announcements 72 | 73 | - Final presentations on Thursday - 2 minutes each, present your project idea & code 74 | - Contractor Project due Thursday midnight 75 | - No class Monday - Indigenous Peoples Day 76 | - Intensive starts on Tuesday, Oct. 15 -------------------------------------------------------------------------------- /Lessons/Review-Day/README.md: -------------------------------------------------------------------------------- 1 | # Review: MongoDB & Testing 2 | 3 | 4 | 5 | # MongoDB 6 | 7 | 8 | 9 | ## Warm Up 10 | 11 | On a piece of paper, write down everything you know about MongoDB. 12 | 13 | Then, discuss with a partner and compare your notes. 14 | 15 | 16 | 17 | 18 | ## Activity: Mongo CRUD Operations 19 | 20 | Clone the repository here to get the starter code: 21 | 22 |
https://make.sc/mongo-testing
23 | 24 | Then, complete the challenges in `app.py`. 25 | 26 | 27 | 28 | ## Break 29 | 30 | 31 | 32 | 33 | # Testing 34 | 35 | 36 | 37 | ## Warm-Up 38 | 39 | On a piece of paper, write down everything you know about MongoDB. 40 | 41 | Then, discuss with a partner and compare your notes. 42 | 43 | 44 | 45 | 46 | ## Activity: Writing Tests 47 | 48 | In the same repository, complete the challenges in `tests.py`. 49 | 50 | 51 | 52 | # Wrap-Up 53 | 54 | 55 | 56 | ## Vibe Check 57 | 58 | Go to https://make.sc/bew1.1-vibe-check and fill out the form. 59 | 60 | 61 | 62 | ## 🎉 Shout-Outs 🎊 63 | 64 | Have any shout-outs? Show appreciation for your peers! 65 | 66 | 67 | 68 | 69 | ## Homework 70 | 71 | - Continue on the [Playlister tutorial](https://make.sc/playlister) - due Tuesday, Nov. 26 -------------------------------------------------------------------------------- /Projects/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/macos,python 2 | # Edit at https://www.gitignore.io/?templates=macos,python 3 | 4 | ### macOS ### 5 | # General 6 | .DS_Store 7 | .AppleDouble 8 | .LSOverride 9 | 10 | # Icon must end with two \r 11 | Icon 12 | 13 | # Thumbnails 14 | ._* 15 | 16 | # Files that might appear in the root of a volume 17 | .DocumentRevisions-V100 18 | .fseventsd 19 | .Spotlight-V100 20 | .TemporaryItems 21 | .Trashes 22 | .VolumeIcon.icns 23 | .com.apple.timemachine.donotpresent 24 | 25 | # Directories potentially created on remote AFP share 26 | .AppleDB 27 | .AppleDesktop 28 | Network Trash Folder 29 | Temporary Items 30 | .apdisk 31 | 32 | ### Python ### 33 | # Byte-compiled / optimized / DLL files 34 | __pycache__/ 35 | *.py[cod] 36 | *$py.class 37 | 38 | # C extensions 39 | *.so 40 | 41 | # Distribution / packaging 42 | .Python 43 | build/ 44 | develop-eggs/ 45 | dist/ 46 | downloads/ 47 | eggs/ 48 | .eggs/ 49 | lib/ 50 | lib64/ 51 | parts/ 52 | sdist/ 53 | var/ 54 | wheels/ 55 | pip-wheel-metadata/ 56 | share/python-wheels/ 57 | *.egg-info/ 58 | .installed.cfg 59 | *.egg 60 | MANIFEST 61 | 62 | # PyInstaller 63 | # Usually these files are written by a python script from a template 64 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 65 | *.manifest 66 | *.spec 67 | 68 | # Installer logs 69 | pip-log.txt 70 | pip-delete-this-directory.txt 71 | 72 | # Unit test / coverage reports 73 | htmlcov/ 74 | .tox/ 75 | .nox/ 76 | .coverage 77 | .coverage.* 78 | .cache 79 | nosetests.xml 80 | coverage.xml 81 | *.cover 82 | .hypothesis/ 83 | .pytest_cache/ 84 | 85 | # Translations 86 | *.mo 87 | *.pot 88 | 89 | # Django stuff: 90 | *.log 91 | local_settings.py 92 | db.sqlite3 93 | 94 | # Flask stuff: 95 | instance/ 96 | .webassets-cache 97 | 98 | # Scrapy stuff: 99 | .scrapy 100 | 101 | # Sphinx documentation 102 | docs/_build/ 103 | 104 | # PyBuilder 105 | target/ 106 | 107 | # Jupyter Notebook 108 | .ipynb_checkpoints 109 | 110 | # IPython 111 | profile_default/ 112 | ipython_config.py 113 | 114 | # pyenv 115 | .python-version 116 | 117 | # celery beat schedule file 118 | celerybeat-schedule 119 | 120 | # SageMath parsed files 121 | *.sage.py 122 | 123 | # Environments 124 | .env 125 | .venv 126 | env/ 127 | venv/ 128 | ENV/ 129 | env.bak/ 130 | venv.bak/ 131 | 132 | # Spyder project settings 133 | .spyderproject 134 | .spyproject 135 | 136 | # Rope project settings 137 | .ropeproject 138 | 139 | # mkdocs documentation 140 | /site 141 | 142 | # mypy 143 | .mypy_cache/ 144 | .dmypy.json 145 | dmypy.json 146 | 147 | # Pyre type checker 148 | .pyre/ 149 | 150 | ### Python Patch ### 151 | .venv/ 152 | 153 | # End of https://www.gitignore.io/api/macos,python 154 | -------------------------------------------------------------------------------- /Projects/GifSearch/README.md: -------------------------------------------------------------------------------- 1 | # Gif Search Project 2 | 3 | [Project Spec](https://docs.google.com/document/d/1symUDRsZ1i2xf8F2mwAGFJtLjbOXqCj0JyrIgTtFNT0/) 4 | 5 | [Project Rubric](https://docs.google.com/document/d/1u8zn_w9kQceK1y0f0F6QEWWgP8T7KRsQvQOIvlzyMi0/) -------------------------------------------------------------------------------- /Slides/01-Static-Website/assets/basic-anatomy-of-xhtml-elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/01-Static-Website/assets/basic-anatomy-of-xhtml-elements.png -------------------------------------------------------------------------------- /Slides/02-Git-and-GitHub/assets/github_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/02-Git-and-GitHub/assets/github_desktop.png -------------------------------------------------------------------------------- /Slides/03-Intro-to-Flask/assets/query.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/03-Intro-to-Flask/assets/query.jpg -------------------------------------------------------------------------------- /Slides/03-Intro-to-Flask/demo/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BEW 1.1 Slides 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 |
34 |
35 | 36 | 37 | 38 | 77 | 78 | 79 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Slides/05-URLs-HTTP-REST-and-Reading-Errors/assets/query.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/05-URLs-HTTP-REST-and-Reading-Errors/assets/query.jpg -------------------------------------------------------------------------------- /Slides/05-URLs-HTTP-REST-and-Reading-Errors/demo/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BEW 1.1 Slides 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 |
35 |
36 | 37 | 38 | 39 | 78 | 79 | 80 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /Slides/06-More-Apis/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BEW 1.1 Slides 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 |
32 |
33 | 34 | 35 | 36 | 75 | 76 | 77 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Slides/06-Testing-RESTful-Routes/agenda.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BEW 1.1 Slides 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 |
64 |
65 | 66 | 67 | 68 | 107 | 108 | 109 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /Slides/06-Testing-RESTful-Routes/assets/spaceman_flowchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/06-Testing-RESTful-Routes/assets/spaceman_flowchart.png -------------------------------------------------------------------------------- /Slides/07-Model-View-Controller/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BEW 1.1 Slides 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 |
102 |
103 | 104 | 105 | 106 | 145 | 146 | 147 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /Slides/07-Model-View-Controller/assets/food.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/07-Model-View-Controller/assets/food.png -------------------------------------------------------------------------------- /Slides/07-Model-View-Controller/assets/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/07-Model-View-Controller/assets/menu.png -------------------------------------------------------------------------------- /Slides/07-Model-View-Controller/assets/restaurant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/07-Model-View-Controller/assets/restaurant.png -------------------------------------------------------------------------------- /Slides/07-Model-View-Controller/assets/waiter.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/07-Model-View-Controller/assets/waiter.jpeg -------------------------------------------------------------------------------- /Slides/07-More-Testing/assets/ditto.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/07-More-Testing/assets/ditto.gif -------------------------------------------------------------------------------- /Slides/07-More-Testing/assets/tennis-ball-machine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/07-More-Testing/assets/tennis-ball-machine.gif -------------------------------------------------------------------------------- /Slides/08-Document-Based-Databases/assets/Flask-Mongo-Diagram.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/08-Document-Based-Databases/assets/Flask-Mongo-Diagram.jpeg -------------------------------------------------------------------------------- /Slides/08-Document-Based-Databases/assets/drycleaners.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/08-Document-Based-Databases/assets/drycleaners.jpeg -------------------------------------------------------------------------------- /Slides/08-Document-Based-Databases/assets/mongodb_compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/08-Document-Based-Databases/assets/mongodb_compass.png -------------------------------------------------------------------------------- /Slides/08-Document-Based-Databases/assets/relational-vs-document.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/08-Document-Based-Databases/assets/relational-vs-document.jpg -------------------------------------------------------------------------------- /Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/blog-erd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/blog-erd.png -------------------------------------------------------------------------------- /Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/many-to-many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/many-to-many.png -------------------------------------------------------------------------------- /Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/one-to-many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/one-to-many.png -------------------------------------------------------------------------------- /Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/one-to-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/one-to-one.png -------------------------------------------------------------------------------- /Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/school-erd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/09-ERDs-Resource-Associations-and-MongoDB/assets/school-erd.png -------------------------------------------------------------------------------- /Slides/10-Project-Planning-and-User-Centered-Development/assets/error_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/10-Project-Planning-and-User-Centered-Development/assets/error_page.png -------------------------------------------------------------------------------- /Slides/12-Presentation-Practice/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BEW 1.1 Slides 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 |
80 |
81 | 82 | 83 | 84 | 123 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /Slides/Review-Day/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BEW 1.1 Slides 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 |
69 |
70 | 71 | 72 | 73 | 112 | 113 | 114 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /Slides/css/highlight/atom-one-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Light by Daniel Gamage 4 | Original One Light Syntax theme from https://github.com/atom/one-light-syntax 5 | 6 | base: #fafafa 7 | mono-1: #383a42 8 | mono-2: #686b77 9 | mono-3: #a0a1a7 10 | hue-1: #0184bb 11 | hue-2: #4078f2 12 | hue-3: #a626a4 13 | hue-4: #50a14f 14 | hue-5: #e45649 15 | hue-5-2: #c91243 16 | hue-6: #986801 17 | hue-6-2: #c18401 18 | 19 | */ 20 | 21 | .hljs { 22 | display: block; 23 | overflow-x: auto; 24 | padding: 0.5em; 25 | color: #383a42; 26 | background: #fafafa; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-quote { 31 | color: #a0a1a7; 32 | font-style: italic; 33 | } 34 | 35 | .hljs-doctag, 36 | .hljs-keyword, 37 | .hljs-formula { 38 | color: #a626a4; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name, 43 | .hljs-selector-tag, 44 | .hljs-deletion, 45 | .hljs-subst { 46 | color: #e45649; 47 | } 48 | 49 | .hljs-literal { 50 | color: #0184bb; 51 | } 52 | 53 | .hljs-string, 54 | .hljs-regexp, 55 | .hljs-addition, 56 | .hljs-attribute, 57 | .hljs-meta-string { 58 | color: #50a14f; 59 | } 60 | 61 | .hljs-built_in, 62 | .hljs-class .hljs-title { 63 | color: #c18401; 64 | } 65 | 66 | .hljs-attr, 67 | .hljs-variable, 68 | .hljs-template-variable, 69 | .hljs-type, 70 | .hljs-selector-class, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-number { 74 | color: #986801; 75 | } 76 | 77 | .hljs-symbol, 78 | .hljs-bullet, 79 | .hljs-link, 80 | .hljs-meta, 81 | .hljs-selector-id, 82 | .hljs-title { 83 | color: #4078f2; 84 | } 85 | 86 | .hljs-emphasis { 87 | font-style: italic; 88 | } 89 | 90 | .hljs-strong { 91 | font-weight: bold; 92 | } 93 | 94 | .hljs-link { 95 | text-decoration: underline; 96 | } 97 | -------------------------------------------------------------------------------- /Slides/css/print/paper.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | @media print { 10 | 11 | /* SECTION 1: Set default width, margin, float, and 12 | background. This prevents elements from extending 13 | beyond the edge of the printed page, and prevents 14 | unnecessary background images from printing */ 15 | html { 16 | background: #fff; 17 | width: auto; 18 | height: auto; 19 | overflow: visible; 20 | } 21 | body { 22 | background: #fff; 23 | font-size: 20pt; 24 | width: auto; 25 | height: auto; 26 | border: 0; 27 | margin: 0 5%; 28 | padding: 0; 29 | overflow: visible; 30 | float: none !important; 31 | } 32 | 33 | /* SECTION 2: Remove any elements not needed in print. 34 | This would include navigation, ads, sidebars, etc. */ 35 | .nestedarrow, 36 | .controls, 37 | .fork-reveal, 38 | .share-reveal, 39 | .state-background, 40 | .reveal .progress, 41 | .reveal .backgrounds, 42 | .reveal .slide-number { 43 | display: none !important; 44 | } 45 | 46 | /* SECTION 3: Set body font face, size, and color. 47 | Consider using a serif font for readability. */ 48 | body, p, td, li, div { 49 | font-size: 20pt!important; 50 | font-family: Georgia, "Times New Roman", Times, serif !important; 51 | color: #000; 52 | } 53 | 54 | /* SECTION 4: Set heading font face, sizes, and color. 55 | Differentiate your headings from your body text. 56 | Perhaps use a large sans-serif for distinction. */ 57 | h1,h2,h3,h4,h5,h6 { 58 | color: #000!important; 59 | height: auto; 60 | line-height: normal; 61 | font-family: Georgia, "Times New Roman", Times, serif !important; 62 | text-shadow: 0 0 0 #000 !important; 63 | text-align: left; 64 | letter-spacing: normal; 65 | } 66 | /* Need to reduce the size of the fonts for printing */ 67 | h1 { font-size: 28pt !important; } 68 | h2 { font-size: 24pt !important; } 69 | h3 { font-size: 22pt !important; } 70 | h4 { font-size: 22pt !important; font-variant: small-caps; } 71 | h5 { font-size: 21pt !important; } 72 | h6 { font-size: 20pt !important; font-style: italic; } 73 | 74 | /* SECTION 5: Make hyperlinks more usable. 75 | Ensure links are underlined, and consider appending 76 | the URL to the end of the link for usability. */ 77 | a:link, 78 | a:visited { 79 | color: #000 !important; 80 | font-weight: bold; 81 | text-decoration: underline; 82 | } 83 | /* 84 | .reveal a:link:after, 85 | .reveal a:visited:after { 86 | content: " (" attr(href) ") "; 87 | color: #222 !important; 88 | font-size: 90%; 89 | } 90 | */ 91 | 92 | 93 | /* SECTION 6: more reveal.js specific additions by @skypanther */ 94 | ul, ol, div, p { 95 | visibility: visible; 96 | position: static; 97 | width: auto; 98 | height: auto; 99 | display: block; 100 | overflow: visible; 101 | margin: 0; 102 | text-align: left !important; 103 | } 104 | .reveal pre, 105 | .reveal table { 106 | margin-left: 0; 107 | margin-right: 0; 108 | } 109 | .reveal pre code { 110 | padding: 20px; 111 | border: 1px solid #ddd; 112 | } 113 | .reveal blockquote { 114 | margin: 20px 0; 115 | } 116 | .reveal .slides { 117 | position: static !important; 118 | width: auto !important; 119 | height: auto !important; 120 | 121 | left: 0 !important; 122 | top: 0 !important; 123 | margin-left: 0 !important; 124 | margin-top: 0 !important; 125 | padding: 0 !important; 126 | zoom: 1 !important; 127 | 128 | overflow: visible !important; 129 | display: block !important; 130 | 131 | text-align: left !important; 132 | -webkit-perspective: none; 133 | -moz-perspective: none; 134 | -ms-perspective: none; 135 | perspective: none; 136 | 137 | -webkit-perspective-origin: 50% 50%; 138 | -moz-perspective-origin: 50% 50%; 139 | -ms-perspective-origin: 50% 50%; 140 | perspective-origin: 50% 50%; 141 | } 142 | .reveal .slides section { 143 | visibility: visible !important; 144 | position: static !important; 145 | width: auto !important; 146 | height: auto !important; 147 | display: block !important; 148 | overflow: visible !important; 149 | 150 | left: 0 !important; 151 | top: 0 !important; 152 | margin-left: 0 !important; 153 | margin-top: 0 !important; 154 | padding: 60px 20px !important; 155 | z-index: auto !important; 156 | 157 | opacity: 1 !important; 158 | 159 | page-break-after: always !important; 160 | 161 | -webkit-transform-style: flat !important; 162 | -moz-transform-style: flat !important; 163 | -ms-transform-style: flat !important; 164 | transform-style: flat !important; 165 | 166 | -webkit-transform: none !important; 167 | -moz-transform: none !important; 168 | -ms-transform: none !important; 169 | transform: none !important; 170 | 171 | -webkit-transition: none !important; 172 | -moz-transition: none !important; 173 | -ms-transition: none !important; 174 | transition: none !important; 175 | } 176 | .reveal .slides section.stack { 177 | padding: 0 !important; 178 | } 179 | .reveal section:last-of-type { 180 | page-break-after: avoid !important; 181 | } 182 | .reveal section .fragment { 183 | opacity: 1 !important; 184 | visibility: visible !important; 185 | 186 | -webkit-transform: none !important; 187 | -moz-transform: none !important; 188 | -ms-transform: none !important; 189 | transform: none !important; 190 | } 191 | .reveal section img { 192 | display: block; 193 | margin: 15px 0px; 194 | background: rgba(255,255,255,1); 195 | border: 1px solid #666; 196 | box-shadow: none; 197 | } 198 | 199 | .reveal section small { 200 | font-size: 0.8em; 201 | } 202 | 203 | } 204 | -------------------------------------------------------------------------------- /Slides/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /** 2 | * This stylesheet is used to print reveal.js 3 | * presentations to PDF. 4 | * 5 | * https://github.com/hakimel/reveal.js#pdf-export 6 | */ 7 | 8 | * { 9 | -webkit-print-color-adjust: exact; 10 | } 11 | 12 | body { 13 | margin: 0 auto !important; 14 | border: 0; 15 | padding: 0; 16 | float: none !important; 17 | overflow: visible; 18 | } 19 | 20 | html { 21 | width: 100%; 22 | height: 100%; 23 | overflow: visible; 24 | } 25 | 26 | /* Remove any elements not needed in print. */ 27 | .nestedarrow, 28 | .reveal .controls, 29 | .reveal .progress, 30 | .reveal .playback, 31 | .reveal.overview, 32 | .fork-reveal, 33 | .share-reveal, 34 | .state-background { 35 | display: none !important; 36 | } 37 | 38 | h1, h2, h3, h4, h5, h6 { 39 | text-shadow: 0 0 0 #000 !important; 40 | } 41 | 42 | .reveal pre code { 43 | overflow: hidden !important; 44 | font-family: Courier, 'Courier New', monospace !important; 45 | } 46 | 47 | ul, ol, div, p { 48 | visibility: visible; 49 | position: static; 50 | width: auto; 51 | height: auto; 52 | display: block; 53 | overflow: visible; 54 | margin: auto; 55 | } 56 | .reveal { 57 | width: auto !important; 58 | height: auto !important; 59 | overflow: hidden !important; 60 | } 61 | .reveal .slides { 62 | position: static; 63 | width: 100% !important; 64 | height: auto !important; 65 | zoom: 1 !important; 66 | 67 | left: auto; 68 | top: auto; 69 | margin: 0 !important; 70 | padding: 0 !important; 71 | 72 | overflow: visible; 73 | display: block; 74 | 75 | perspective: none; 76 | perspective-origin: 50% 50%; 77 | } 78 | 79 | .reveal .slides .pdf-page { 80 | position: relative; 81 | overflow: hidden; 82 | z-index: 1; 83 | 84 | page-break-after: always; 85 | } 86 | 87 | .reveal .slides section { 88 | visibility: visible !important; 89 | display: block !important; 90 | position: absolute !important; 91 | 92 | margin: 0 !important; 93 | padding: 0 !important; 94 | box-sizing: border-box !important; 95 | min-height: 1px; 96 | 97 | opacity: 1 !important; 98 | 99 | transform-style: flat !important; 100 | transform: none !important; 101 | } 102 | 103 | .reveal section.stack { 104 | position: relative !important; 105 | margin: 0 !important; 106 | padding: 0 !important; 107 | page-break-after: avoid !important; 108 | height: auto !important; 109 | min-height: auto !important; 110 | } 111 | 112 | .reveal img { 113 | box-shadow: none; 114 | } 115 | 116 | .reveal .roll { 117 | overflow: visible; 118 | line-height: 1em; 119 | } 120 | 121 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 122 | .reveal .slide-background { 123 | display: block !important; 124 | position: absolute; 125 | top: 0; 126 | left: 0; 127 | width: 100%; 128 | height: 100%; 129 | z-index: auto !important; 130 | } 131 | 132 | /* Display slide speaker notes when 'showNotes' is enabled */ 133 | .reveal.show-notes { 134 | max-width: none; 135 | max-height: none; 136 | } 137 | .reveal .speaker-notes-pdf { 138 | display: block; 139 | width: 100%; 140 | height: auto; 141 | max-height: none; 142 | top: auto; 143 | right: auto; 144 | bottom: auto; 145 | left: auto; 146 | z-index: 100; 147 | } 148 | 149 | /* Layout option which makes notes appear on a separate page */ 150 | .reveal .speaker-notes-pdf[data-layout="separate-page"] { 151 | position: relative; 152 | color: inherit; 153 | background-color: transparent; 154 | padding: 20px; 155 | page-break-after: always; 156 | border: 0; 157 | } 158 | 159 | /* Display slide numbers when 'slideNumber' is enabled */ 160 | .reveal .slide-number-pdf { 161 | display: block; 162 | position: absolute; 163 | font-size: 14px; 164 | } 165 | -------------------------------------------------------------------------------- /Slides/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v4.0 | 20180602 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | main, menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, main, menu, nav, section { 29 | display: block; 30 | } -------------------------------------------------------------------------------- /Slides/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceeding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | ## Creating a Theme 6 | 7 | To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `npm run build -- css-themes`. 8 | 9 | Each theme file does four things in the following order: 10 | 11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 12 | Shared utility functions. 13 | 14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 16 | 17 | 3. **Override** 18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. 19 | 20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 21 | The template theme file which will generate final CSS output based on the currently defined variables. 22 | -------------------------------------------------------------------------------- /Slides/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /Slides/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #191919; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /Slides/css/theme/source/blood.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Blood theme for reveal.js 3 | * Author: Walther http://github.com/Walther 4 | * 5 | * Designed to be used with highlight.js theme 6 | * "monokai_sublime.css" available from 7 | * https://github.com/isagalaev/highlight.js/ 8 | * 9 | * For other themes, change $codeBackground accordingly. 10 | * 11 | */ 12 | 13 | // Default mixins and settings ----------------- 14 | @import "../template/mixins"; 15 | @import "../template/settings"; 16 | // --------------------------------------------- 17 | 18 | // Include theme-specific fonts 19 | 20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); 21 | 22 | // Colors used in the theme 23 | $blood: #a23; 24 | $coal: #222; 25 | $codeBackground: #23241f; 26 | 27 | $backgroundColor: $coal; 28 | 29 | // Main text 30 | $mainFont: Ubuntu, 'sans-serif'; 31 | $mainColor: #eee; 32 | 33 | // Headings 34 | $headingFont: Ubuntu, 'sans-serif'; 35 | $headingTextShadow: 2px 2px 2px $coal; 36 | 37 | // h1 shadow, borrowed humbly from 38 | // (c) Default theme by Hakim El Hattab 39 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 40 | 41 | // Links 42 | $linkColor: $blood; 43 | $linkColorHover: lighten( $linkColor, 20% ); 44 | 45 | // Text selection 46 | $selectionBackgroundColor: $blood; 47 | $selectionColor: #fff; 48 | 49 | 50 | // Theme template ------------------------------ 51 | @import "../template/theme"; 52 | // --------------------------------------------- 53 | 54 | // some overrides after theme template import 55 | 56 | .reveal p { 57 | font-weight: 300; 58 | text-shadow: 1px 1px $coal; 59 | } 60 | 61 | .reveal h1, 62 | .reveal h2, 63 | .reveal h3, 64 | .reveal h4, 65 | .reveal h5, 66 | .reveal h6 { 67 | font-weight: 700; 68 | } 69 | 70 | .reveal p code { 71 | background-color: $codeBackground; 72 | display: inline-block; 73 | border-radius: 7px; 74 | } 75 | 76 | .reveal small code { 77 | vertical-align: baseline; 78 | } -------------------------------------------------------------------------------- /Slides/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /Slides/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /Slides/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /Slides/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /Slides/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | section.has-dark-background { 35 | &, h1, h2, h3, h4, h5, h6 { 36 | color: #fff; 37 | } 38 | } 39 | 40 | 41 | // Theme template ------------------------------ 42 | @import "../template/theme"; 43 | // --------------------------------------------- -------------------------------------------------------------------------------- /Slides/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /Slides/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | 19 | /** 20 | * Solarized colors by Ethan Schoonover 21 | */ 22 | html * { 23 | color-profile: sRGB; 24 | rendering-intent: auto; 25 | } 26 | 27 | // Solarized colors 28 | $base03: #002b36; 29 | $base02: #073642; 30 | $base01: #586e75; 31 | $base00: #657b83; 32 | $base0: #839496; 33 | $base1: #93a1a1; 34 | $base2: #eee8d5; 35 | $base3: #fdf6e3; 36 | $yellow: #b58900; 37 | $orange: #cb4b16; 38 | $red: #dc322f; 39 | $magenta: #d33682; 40 | $violet: #6c71c4; 41 | $blue: #268bd2; 42 | $cyan: #2aa198; 43 | $green: #859900; 44 | 45 | // Override theme settings (see ../template/settings.scss) 46 | $mainColor: $base00; 47 | $headingColor: $base01; 48 | $headingTextShadow: none; 49 | $backgroundColor: $base3; 50 | $linkColor: $blue; 51 | $linkColorHover: lighten( $linkColor, 20% ); 52 | $selectionBackgroundColor: $magenta; 53 | 54 | // Background generator 55 | // @mixin bodyBackground() { 56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 57 | // } 58 | 59 | 60 | 61 | // Theme template ------------------------------ 62 | @import "../template/theme"; 63 | // --------------------------------------------- 64 | -------------------------------------------------------------------------------- /Slides/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /Slides/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /Slides/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 40px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | $codeFont: monospace; 32 | 33 | // Links and actions 34 | $linkColor: #13DAEC; 35 | $linkColorHover: lighten( $linkColor, 20% ); 36 | 37 | // Text selection 38 | $selectionBackgroundColor: #FF5E99; 39 | $selectionColor: #fff; 40 | 41 | // Generates the presentation background, can be overridden 42 | // to return a background image or gradient 43 | @mixin bodyBackground() { 44 | background: $backgroundColor; 45 | } 46 | -------------------------------------------------------------------------------- /Slides/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Directory Listing 6 | 7 | 16 | 17 | 18 | 19 | 01-Static-Website/README.html
02-Git-and-GitHub/README.html
03-Intro-to-Flask/demo/README.html
03-Intro-to-Flask/README.html
04-Flask-Templating/README.html
05-URLs-HTTP-REST-and-Reading-Errors/README.html
06-Testing-RESTful-Routes/agenda.html
06-Testing-RESTful-Routes/README.html
07-Model-View-Controller/README.html
07-More-Testing/README.html
08-Document-Based-Databases/README.html
09-ERDs-Resource-Associations-and-MongoDB/README.html
10-Project-Planning-and-User-Centered-Development/README.html
11-Deployment-Environments/README.html
12-Presentation-Practice/README.html
Review-Day/README.html 20 | 21 | 22 | -------------------------------------------------------------------------------- /Slides/lib/css/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #272822; 10 | color: #ddd; 11 | } 12 | 13 | .hljs-tag, 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-strong, 18 | .hljs-name { 19 | color: #f92672; 20 | } 21 | 22 | .hljs-code { 23 | color: #66d9ef; 24 | } 25 | 26 | .hljs-class .hljs-title { 27 | color: white; 28 | } 29 | 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-regexp, 33 | .hljs-link { 34 | color: #bf79db; 35 | } 36 | 37 | .hljs-string, 38 | .hljs-bullet, 39 | .hljs-subst, 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-emphasis, 43 | .hljs-type, 44 | .hljs-built_in, 45 | .hljs-builtin-name, 46 | .hljs-selector-attr, 47 | .hljs-selector-pseudo, 48 | .hljs-addition, 49 | .hljs-variable, 50 | .hljs-template-tag, 51 | .hljs-template-variable { 52 | color: #a6e22e; 53 | } 54 | 55 | .hljs-comment, 56 | .hljs-quote, 57 | .hljs-deletion, 58 | .hljs-meta { 59 | color: #75715e; 60 | } 61 | 62 | .hljs-keyword, 63 | .hljs-selector-tag, 64 | .hljs-literal, 65 | .hljs-doctag, 66 | .hljs-title, 67 | .hljs-section, 68 | .hljs-type, 69 | .hljs-selector-id { 70 | font-weight: bold; 71 | } 72 | -------------------------------------------------------------------------------- /Slides/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /Slides/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /Slides/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /Slides/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /Slides/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /Slides/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License 2 | 3 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 7 | 8 | —————————————————————————————- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | —————————————————————————————- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 14 | 15 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 16 | 17 | DEFINITIONS 18 | “Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 19 | 20 | “Reserved Font Name” refers to any names specified as such after the copyright statement(s). 21 | 22 | “Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). 23 | 24 | “Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 25 | 26 | “Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 27 | 28 | PERMISSION & CONDITIONS 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 30 | 31 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 32 | 33 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 34 | 35 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 36 | 37 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 38 | 39 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 40 | 41 | TERMINATION 42 | This license becomes null and void if any of the above conditions are not met. 43 | 44 | DISCLAIMER 45 | THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /Slides/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /Slides/lib/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | document.createElement('header'); 2 | document.createElement('nav'); 3 | document.createElement('section'); 4 | document.createElement('article'); 5 | document.createElement('aside'); 6 | document.createElement('footer'); 7 | document.createElement('hgroup'); -------------------------------------------------------------------------------- /Slides/lib/js/promise.js: -------------------------------------------------------------------------------- 1 | /* MIT | https://github.com/taylorhakes/promise-polyfill */ 2 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(){}function t(e){if(!(this instanceof t))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],u(e,this)}function o(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,t._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(f){return void i(n.promise,f)}r(n.promise,o)}else(1===e._state?r:i)(n.promise,e._value)})):e._deferreds.push(n)}function r(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if(n instanceof t)return e._state=3,e._value=n,void f(e);if("function"==typeof o)return void u(function(e,n){return function(){e.apply(n,arguments)}}(o,n),e)}e._state=1,e._value=n,f(e)}catch(r){i(e,r)}}function i(e,n){e._state=2,e._value=n,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&t._immediateFn(function(){e._handled||t._unhandledRejectionFn(e._value)});for(var n=0,r=e._deferreds.length;r>n;n++)o(e,e._deferreds[n]);e._deferreds=null}function u(e,n){var t=!1;try{e(function(e){t||(t=!0,r(n,e))},function(e){t||(t=!0,i(n,e))})}catch(o){if(t)return;t=!0,i(n,o)}}var c=setTimeout;t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,t,r)),r},t.prototype["finally"]=e,t.all=function(e){return new t(function(n,t){function o(e,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(n){o(e,n)},t)}r[e]=f,0==--i&&n(r)}catch(c){t(c)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return n([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(n){n(e)})},t.reject=function(e){return new t(function(n,t){t(e)})},t.race=function(e){return new t(function(n,t){for(var o=0,r=e.length;r>o;o++)e[o].then(n,t)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=t}); -------------------------------------------------------------------------------- /Slides/plugin/markdown/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Markdown Demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | 36 |
37 | 38 | 39 |
40 | 54 |
55 | 56 | 57 |
58 | 69 |
70 | 71 | 72 |
73 | 77 |
78 | 79 | 80 |
81 | 86 |
87 | 88 | 89 |
90 | 100 |
101 | 102 | 103 |
104 | 107 |
108 | 109 |
110 |
111 | 112 | 113 | 114 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /Slides/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | 33 | 34 | ## External 3.3 35 | 36 | ![External Image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png) 37 | -------------------------------------------------------------------------------- /Slides/plugin/math/math.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A plugin which enables rendering of math equations inside 3 | * of reveal.js slides. Essentially a thin wrapper for MathJax. 4 | * 5 | * @author Hakim El Hattab 6 | */ 7 | var RevealMath = window.RevealMath || (function(){ 8 | 9 | var options = Reveal.getConfig().math || {}; 10 | var mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js'; 11 | var config = options.config || 'TeX-AMS_HTML-full'; 12 | var url = mathjax + '?config=' + config; 13 | 14 | var defaultOptions = { 15 | messageStyle: 'none', 16 | tex2jax: { 17 | inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ], 18 | skipTags: [ 'script', 'noscript', 'style', 'textarea', 'pre' ] 19 | }, 20 | skipStartupTypeset: true 21 | }; 22 | 23 | function defaults( options, defaultOptions ) { 24 | 25 | for ( var i in defaultOptions ) { 26 | if ( !options.hasOwnProperty( i ) ) { 27 | options[i] = defaultOptions[i]; 28 | } 29 | } 30 | 31 | } 32 | 33 | function loadScript( url, callback ) { 34 | 35 | var head = document.querySelector( 'head' ); 36 | var script = document.createElement( 'script' ); 37 | script.type = 'text/javascript'; 38 | script.src = url; 39 | 40 | // Wrapper for callback to make sure it only fires once 41 | var finish = function() { 42 | if( typeof callback === 'function' ) { 43 | callback.call(); 44 | callback = null; 45 | } 46 | } 47 | 48 | script.onload = finish; 49 | 50 | // IE 51 | script.onreadystatechange = function() { 52 | if ( this.readyState === 'loaded' ) { 53 | finish(); 54 | } 55 | } 56 | 57 | // Normal browsers 58 | head.appendChild( script ); 59 | 60 | } 61 | 62 | return { 63 | init: function() { 64 | 65 | defaults( options, defaultOptions ); 66 | defaults( options.tex2jax, defaultOptions.tex2jax ); 67 | options.mathjax = options.config = null; 68 | 69 | loadScript( url, function() { 70 | 71 | MathJax.Hub.Config( options ); 72 | 73 | // Typeset followed by an immediate reveal.js layout since 74 | // the typesetting process could affect slide height 75 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] ); 76 | MathJax.Hub.Queue( Reveal.layout ); 77 | 78 | // Reprocess equations in slides when they turn visible 79 | Reveal.addEventListener( 'slidechanged', function( event ) { 80 | 81 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] ); 82 | 83 | } ); 84 | 85 | } ); 86 | 87 | } 88 | } 89 | 90 | })(); 91 | 92 | Reveal.registerPlugin( 'math', RevealMath ); 93 | -------------------------------------------------------------------------------- /Slides/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.setState(data.state); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /Slides/plugin/multiplex/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var crypto = require('crypto'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port: process.env.PORT || 1948, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | socket.on('multiplex-statechanged', function(data) { 20 | if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return; 21 | if (createHash(data.secret) === data.socketId) { 22 | data.secret = null; 23 | socket.broadcast.emit(data.socketId, data); 24 | }; 25 | }); 26 | }); 27 | 28 | [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { 29 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | res.writeHead(200, {'Content-Type': 'text/html'}); 34 | 35 | var stream = fs.createReadStream(opts.baseDir + '/index.html'); 36 | stream.on('error', function( error ) { 37 | res.write('

reveal.js multiplex server.

Generate token'); 38 | res.end(); 39 | }); 40 | stream.on('readable', function() { 41 | stream.pipe(res); 42 | }); 43 | }); 44 | 45 | app.get("/token", function(req,res) { 46 | var ts = new Date().getTime(); 47 | var rand = Math.floor(Math.random()*9999999); 48 | var secret = ts.toString() + rand.toString(); 49 | res.send({secret: secret, socketId: createHash(secret)}); 50 | }); 51 | 52 | var createHash = function(secret) { 53 | var cipher = crypto.createCipher('blowfish', secret); 54 | return(cipher.final('hex')); 55 | }; 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset ); -------------------------------------------------------------------------------- /Slides/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // Don't emit events from inside of notes windows 4 | if ( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var multiplex = Reveal.getConfig().multiplex; 7 | 8 | var socket = io.connect( multiplex.url ); 9 | 10 | function post() { 11 | 12 | var messageData = { 13 | state: Reveal.getState(), 14 | secret: multiplex.secret, 15 | socketId: multiplex.id 16 | }; 17 | 18 | socket.emit( 'multiplex-statechanged', messageData ); 19 | 20 | }; 21 | 22 | // post once the page is loaded, so the client follows also on "open URL". 23 | window.addEventListener( 'load', post ); 24 | 25 | // Monitor events that trigger a change in state 26 | Reveal.addEventListener( 'slidechanged', post ); 27 | Reveal.addEventListener( 'fragmentshown', post ); 28 | Reveal.addEventListener( 'fragmenthidden', post ); 29 | Reveal.addEventListener( 'overviewhidden', post ); 30 | Reveal.addEventListener( 'overviewshown', post ); 31 | Reveal.addEventListener( 'paused', post ); 32 | Reveal.addEventListener( 'resumed', post ); 33 | 34 | }()); 35 | -------------------------------------------------------------------------------- /Slides/plugin/multiplex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal-js-multiplex", 3 | "version": "1.0.0", 4 | "description": "reveal.js multiplex server", 5 | "homepage": "http://revealjs.com", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "engines": { 10 | "node": "~4.1.1" 11 | }, 12 | "dependencies": { 13 | "express": "~4.13.3", 14 | "grunt-cli": "~0.1.13", 15 | "mustache": "~2.2.1", 16 | "socket.io": "~1.3.7" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /Slides/plugin/notes-server/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // don't emit events from inside the previews themselves 4 | if( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var socket = io.connect( window.location.origin ), 7 | socketId = Math.random().toString().slice( 2 ); 8 | 9 | console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId ); 10 | 11 | window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId ); 12 | 13 | /** 14 | * Posts the current slide data to the notes window 15 | */ 16 | function post() { 17 | 18 | var slideElement = Reveal.getCurrentSlide(), 19 | notesElement = slideElement.querySelector( 'aside.notes' ); 20 | 21 | var messageData = { 22 | notes: '', 23 | markdown: false, 24 | socketId: socketId, 25 | state: Reveal.getState() 26 | }; 27 | 28 | // Look for notes defined in a slide attribute 29 | if( slideElement.hasAttribute( 'data-notes' ) ) { 30 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 31 | } 32 | 33 | // Look for notes defined in an aside element 34 | if( notesElement ) { 35 | messageData.notes = notesElement.innerHTML; 36 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 37 | } 38 | 39 | socket.emit( 'statechanged', messageData ); 40 | 41 | } 42 | 43 | // When a new notes window connects, post our current state 44 | socket.on( 'new-subscriber', function( data ) { 45 | post(); 46 | } ); 47 | 48 | // When the state changes from inside of the speaker view 49 | socket.on( 'statechanged-speaker', function( data ) { 50 | Reveal.setState( data.state ); 51 | } ); 52 | 53 | // Monitor events that trigger a change in state 54 | Reveal.addEventListener( 'slidechanged', post ); 55 | Reveal.addEventListener( 'fragmentshown', post ); 56 | Reveal.addEventListener( 'fragmenthidden', post ); 57 | Reveal.addEventListener( 'overviewhidden', post ); 58 | Reveal.addEventListener( 'overviewshown', post ); 59 | Reveal.addEventListener( 'paused', post ); 60 | Reveal.addEventListener( 'resumed', post ); 61 | 62 | // Post the initial state 63 | post(); 64 | 65 | }()); 66 | -------------------------------------------------------------------------------- /Slides/plugin/notes-server/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var Mustache = require('mustache'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port : 1947, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | 20 | socket.on( 'new-subscriber', function( data ) { 21 | socket.broadcast.emit( 'new-subscriber', data ); 22 | }); 23 | 24 | socket.on( 'statechanged', function( data ) { 25 | delete data.state.overview; 26 | socket.broadcast.emit( 'statechanged', data ); 27 | }); 28 | 29 | socket.on( 'statechanged-speaker', function( data ) { 30 | delete data.state.overview; 31 | socket.broadcast.emit( 'statechanged-speaker', data ); 32 | }); 33 | 34 | }); 35 | 36 | [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { 37 | app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); 38 | }); 39 | 40 | app.get('/', function( req, res ) { 41 | 42 | res.writeHead( 200, { 'Content-Type': 'text/html' } ); 43 | fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res ); 44 | 45 | }); 46 | 47 | app.get( '/notes/:socketId', function( req, res ) { 48 | 49 | fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) { 50 | res.send( Mustache.to_html( data.toString(), { 51 | socketId : req.params.socketId 52 | })); 53 | }); 54 | 55 | }); 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' ); 65 | 66 | console.log( brown + 'reveal.js - Speaker Notes' + reset ); 67 | console.log( '1. Open the slides at ' + green + slidesLocation + reset ); 68 | console.log( '2. Click on the link in your JS console to go to the notes page' ); 69 | console.log( '3. Advance through your slides and your notes will advance automatically' ); 70 | -------------------------------------------------------------------------------- /Slides/plugin/notes/notes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles opening of and synchronization with the reveal.js 3 | * notes window. 4 | * 5 | * Handshake process: 6 | * 1. This window posts 'connect' to notes window 7 | * - Includes URL of presentation to show 8 | * 2. Notes window responds with 'connected' when it is available 9 | * 3. This window proceeds to send the current presentation state 10 | * to the notes window 11 | */ 12 | var RevealNotes = (function() { 13 | 14 | var notesPopup = null; 15 | 16 | function openNotes( notesFilePath ) { 17 | 18 | if (notesPopup && !notesPopup.closed) { 19 | notesPopup.focus(); 20 | return; 21 | } 22 | 23 | if( !notesFilePath ) { 24 | var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path 25 | jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path 26 | notesFilePath = jsFileLocation + 'notes.html'; 27 | } 28 | 29 | notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' ); 30 | 31 | if( !notesPopup ) { 32 | alert( 'Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.' ); 33 | return; 34 | } 35 | 36 | /** 37 | * Connect to the notes window through a postmessage handshake. 38 | * Using postmessage enables us to work in situations where the 39 | * origins differ, such as a presentation being opened from the 40 | * file system. 41 | */ 42 | function connect() { 43 | // Keep trying to connect until we get a 'connected' message back 44 | var connectInterval = setInterval( function() { 45 | notesPopup.postMessage( JSON.stringify( { 46 | namespace: 'reveal-notes', 47 | type: 'connect', 48 | url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search, 49 | state: Reveal.getState() 50 | } ), '*' ); 51 | }, 500 ); 52 | 53 | window.addEventListener( 'message', function( event ) { 54 | var data = JSON.parse( event.data ); 55 | if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) { 56 | clearInterval( connectInterval ); 57 | onConnected(); 58 | } 59 | if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) { 60 | callRevealApi( data.methodName, data.arguments, data.callId ); 61 | } 62 | } ); 63 | } 64 | 65 | /** 66 | * Calls the specified Reveal.js method with the provided argument 67 | * and then pushes the result to the notes frame. 68 | */ 69 | function callRevealApi( methodName, methodArguments, callId ) { 70 | 71 | var result = Reveal[methodName].apply( Reveal, methodArguments ); 72 | notesPopup.postMessage( JSON.stringify( { 73 | namespace: 'reveal-notes', 74 | type: 'return', 75 | result: result, 76 | callId: callId 77 | } ), '*' ); 78 | 79 | } 80 | 81 | /** 82 | * Posts the current slide data to the notes window 83 | */ 84 | function post( event ) { 85 | 86 | var slideElement = Reveal.getCurrentSlide(), 87 | notesElement = slideElement.querySelector( 'aside.notes' ), 88 | fragmentElement = slideElement.querySelector( '.current-fragment' ); 89 | 90 | var messageData = { 91 | namespace: 'reveal-notes', 92 | type: 'state', 93 | notes: '', 94 | markdown: false, 95 | whitespace: 'normal', 96 | state: Reveal.getState() 97 | }; 98 | 99 | // Look for notes defined in a slide attribute 100 | if( slideElement.hasAttribute( 'data-notes' ) ) { 101 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 102 | messageData.whitespace = 'pre-wrap'; 103 | } 104 | 105 | // Look for notes defined in a fragment 106 | if( fragmentElement ) { 107 | var fragmentNotes = fragmentElement.querySelector( 'aside.notes' ); 108 | if( fragmentNotes ) { 109 | notesElement = fragmentNotes; 110 | } 111 | else if( fragmentElement.hasAttribute( 'data-notes' ) ) { 112 | messageData.notes = fragmentElement.getAttribute( 'data-notes' ); 113 | messageData.whitespace = 'pre-wrap'; 114 | 115 | // In case there are slide notes 116 | notesElement = null; 117 | } 118 | } 119 | 120 | // Look for notes defined in an aside element 121 | if( notesElement ) { 122 | messageData.notes = notesElement.innerHTML; 123 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 124 | } 125 | 126 | notesPopup.postMessage( JSON.stringify( messageData ), '*' ); 127 | 128 | } 129 | 130 | /** 131 | * Called once we have established a connection to the notes 132 | * window. 133 | */ 134 | function onConnected() { 135 | 136 | // Monitor events that trigger a change in state 137 | Reveal.addEventListener( 'slidechanged', post ); 138 | Reveal.addEventListener( 'fragmentshown', post ); 139 | Reveal.addEventListener( 'fragmenthidden', post ); 140 | Reveal.addEventListener( 'overviewhidden', post ); 141 | Reveal.addEventListener( 'overviewshown', post ); 142 | Reveal.addEventListener( 'paused', post ); 143 | Reveal.addEventListener( 'resumed', post ); 144 | 145 | // Post the initial state 146 | post(); 147 | 148 | } 149 | 150 | connect(); 151 | 152 | } 153 | 154 | return { 155 | init: function() { 156 | 157 | if( !/receiver/i.test( window.location.search ) ) { 158 | 159 | // If the there's a 'notes' query set, open directly 160 | if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) { 161 | openNotes(); 162 | } 163 | 164 | // Open the notes when the 's' key is hit 165 | Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function() { 166 | openNotes(); 167 | } ); 168 | 169 | } 170 | 171 | }, 172 | 173 | open: openNotes 174 | }; 175 | 176 | })(); 177 | 178 | Reveal.registerPlugin( 'notes', RevealNotes ); 179 | -------------------------------------------------------------------------------- /Slides/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://revealjs.com?print-pdf" reveal-demo.pdf 6 | * 7 | * @author Manuel Bieh (https://github.com/manuelbieh) 8 | * @author Hakim El Hattab (https://github.com/hakimel) 9 | * @author Manuel Riezebosch (https://github.com/riezebosch) 10 | */ 11 | 12 | // html2pdf.js 13 | var system = require( 'system' ); 14 | 15 | var probePage = new WebPage(); 16 | var printPage = new WebPage(); 17 | 18 | var inputFile = system.args[1] || 'index.html?print-pdf'; 19 | var outputFile = system.args[2] || 'slides.pdf'; 20 | 21 | if( outputFile.match( /\.pdf$/gi ) === null ) { 22 | outputFile += '.pdf'; 23 | } 24 | 25 | console.log( 'Export PDF: Reading reveal.js config [1/4]' ); 26 | 27 | probePage.open( inputFile, function( status ) { 28 | 29 | console.log( 'Export PDF: Preparing print layout [2/4]' ); 30 | 31 | var config = probePage.evaluate( function() { 32 | return Reveal.getConfig(); 33 | } ); 34 | 35 | if( config ) { 36 | 37 | printPage.paperSize = { 38 | width: Math.floor( config.width * ( 1 + config.margin ) ), 39 | height: Math.floor( config.height * ( 1 + config.margin ) ), 40 | border: 0 41 | }; 42 | 43 | printPage.open( inputFile, function( status ) { 44 | console.log( 'Export PDF: Preparing pdf [3/4]') 45 | printPage.evaluate( function() { 46 | Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom ); 47 | } ); 48 | } ); 49 | 50 | printPage.onCallback = function( data ) { 51 | // For some reason we need to "jump the queue" for syntax highlighting to work. 52 | // See: http://stackoverflow.com/a/3580132/129269 53 | setTimeout( function() { 54 | console.log( 'Export PDF: Writing file [4/4]' ); 55 | printPage.render( outputFile ); 56 | console.log( 'Export PDF: Finished successfully!' ); 57 | phantom.exit(); 58 | }, 0 ); 59 | }; 60 | } 61 | else { 62 | 63 | console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); 64 | phantom.exit( 1 ); 65 | 66 | } 67 | } ); 68 | -------------------------------------------------------------------------------- /Web/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/Web/.nojekyll -------------------------------------------------------------------------------- /Web/logo-icononly.svg: -------------------------------------------------------------------------------- 1 | logo-icononly -------------------------------------------------------------------------------- /Web/style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --base-font-weight: 400; 3 | --base-color: white; 4 | --base-font-size: 14px; 5 | 6 | --sidebar-width: 22rem; 7 | --sidebar-nav-link-before-content: ""; 8 | --sidebar-nav-link-before-content-l3: ""; 9 | --sidebar-name-font-weight: 500; 10 | 11 | --search-result-heading-font-size: 1em; 12 | --search-result-item-font-size: 0.9em; 13 | --search-result-heading-font-weight: 400; 14 | --search-result-heading-margin: 0 0 0.1em; 15 | 16 | --heading-font-weight: 500; 17 | --heading-h1-font-weight: 700; 18 | --heading-h1-font-size: 2.5em; 19 | 20 | --notice-font-style: italic; 21 | --notice-font-weight: 500; 22 | 23 | --blockquote-em-font-style: normal; 24 | --blockquote-em-font-weight: 700; 25 | 26 | --blockquote-font-style: italic; 27 | --blockquote-font-weight: 500; 28 | 29 | --code-font-size: 1em; 30 | --code-font-weight: 500; 31 | --code-tab-size: 2; 32 | } 33 | 34 | .sidebar>h1 { 35 | margin: 2.3rem auto 1rem; 36 | } 37 | 38 | .sidebar>h1>a>img { 39 | height: auto; 40 | } 41 | 42 | .markdown-section { 43 | max-width: 840px; 44 | } 45 | 46 | .markdown-section a:hover { 47 | border-bottom: 1px dashed rgba(255, 255, 255, 0.5); 48 | padding-bottom: 3px; 49 | } 50 | 51 | .sidebar-nav>ul:nth-child(1)>li>a.section-link, 52 | .sidebar-nav>ul:nth-child(1)>li>ul.children>li>a.section-link { 53 | display: block; 54 | } 55 | 56 | #main>h1:nth-child(1) { 57 | display: none; 58 | } 59 | 60 | #main>h1:nth-child(1)[id] { 61 | display: block; 62 | } 63 | 64 | .sidebar ul li a { 65 | color: #333; 66 | font-size: 14px; 67 | font-weight: 400; 68 | overflow: hidden; 69 | text-decoration: none; 70 | text-overflow: ellipsis; 71 | white-space: nowrap; 72 | } 73 | 74 | .sidebar ul li strong a { 75 | font-weight: 700; 76 | } 77 | 78 | .sidebar ul li ul.app-sub-sidebar li a { 79 | font-weight: 400; 80 | } 81 | 82 | .sidebar ul li ul.app-sub-sidebar li a.active { 83 | font-weight: 700; 84 | } 85 | 86 | body .docsify-copy-code-button { 87 | background: none !important; 88 | line-height: 1.5rem; 89 | position: absolute; 90 | word-wrap: normal; 91 | color: #ccc; 92 | font-size: .7rem; 93 | font-weight: 700; 94 | left: 0; 95 | height: 25px; 96 | top: -4px; 97 | text-align: center; 98 | } 99 | 100 | body .docsify-copy-code-button.success { 101 | color: #11A31B; 102 | } 103 | 104 | body .docsify-copy-code-button::after {} 105 | 106 | .app-name-link img { 107 | height: 150px; 108 | width: 150px; 109 | } 110 | 111 | table>tbody>tr>td::before { 112 | display: none; 113 | } 114 | 115 | .btn-edit-on-github { 116 | transition: background-color 0.5s ease; 117 | border: none; 118 | border-radius: 3px; 119 | background-color: var(--theme-color); 120 | position: absolute; 121 | top: var(--sidebar-toggle-offset-top); 122 | right: 0; 123 | margin-right: 45px; 124 | padding: 6px 10px 6px 5px; 125 | height: var(--sidebar-toggle-height); 126 | } 127 | 128 | .btn-edit-on-github a, 129 | .btn-edit-on-github svg { 130 | transition: color 0.5s ease; 131 | color: white; 132 | } 133 | 134 | .btn-edit-on-github a { 135 | text-decoration: none; 136 | position: relative; 137 | font-weight: 700; 138 | top: -1px; 139 | padding-left: 5px; 140 | } 141 | 142 | .btn-edit-on-github:hover { 143 | cursor: pointer; 144 | background-color: var(--mono-tint2); 145 | } 146 | 147 | .btn-edit-on-github:hover svg, 148 | .btn-edit-on-github:hover a { 149 | text-decoration: none; 150 | color: white; 151 | } 152 | -------------------------------------------------------------------------------- /Web/sw.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * docsify sw.js 3 | * =========================================================== 4 | * Copyright 2016 @huxpro 5 | * Licensed under Apache 2.0 6 | * Register service worker. 7 | * ========================================================== */ 8 | 9 | const RUNTIME = 'docsify' 10 | const HOSTNAME_WHITELIST = [ 11 | self.location.hostname, 12 | 'fonts.gstatic.com', 13 | 'fonts.googleapis.com', 14 | 'unpkg.com', 15 | 'github.com', 16 | 'github.io', 17 | 'makeschool.com' 18 | ] 19 | 20 | // The Util Function to hack URLs of intercepted requests 21 | const getFixedUrl = (req) => { 22 | var now = Date.now() 23 | var url = new URL(req.url) 24 | 25 | // 1. fixed http URL 26 | // Just keep syncing with location.protocol 27 | // fetch(httpURL) belongs to active mixed content. 28 | // And fetch(httpRequest) is not supported yet. 29 | url.protocol = self.location.protocol 30 | 31 | // 2. add query for caching-busting. 32 | // Github Pages served with Cache-Control: max-age=600 33 | // max-age on mutable content is error-prone, with SW life of bugs can even extend. 34 | // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. 35 | // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 36 | if (url.hostname === self.location.hostname) { 37 | url.search += (url.search ? '&' : '?') + 'cache-bust=' + now 38 | } 39 | return url.href 40 | } 41 | 42 | /** 43 | * @Lifecycle Activate 44 | * New one activated when old isnt being used. 45 | * 46 | * waitUntil(): activating ====> activated 47 | */ 48 | self.addEventListener('activate', event => { 49 | event.waitUntil(self.clients.claim()) 50 | }) 51 | 52 | /** 53 | * @Functional Fetch 54 | * All network requests are being intercepted here. 55 | * 56 | * void respondWith(Promise r) 57 | */ 58 | self.addEventListener('fetch', event => { 59 | // Skip some of cross-origin requests, like those for Google Analytics. 60 | if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) { 61 | // Stale-while-revalidate 62 | // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale 63 | // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 64 | const cached = caches.match(event.request) 65 | const fixedUrl = getFixedUrl(event.request) 66 | const fetched = fetch(fixedUrl, { 67 | cache: 'no-store' 68 | }) 69 | const fetchedCopy = fetched.then(resp => resp.clone()) 70 | 71 | // Call respondWith() with whatever we get first. 72 | // If the fetch fails (e.g disconnected), wait for the cache. 73 | // If there’s nothing in cache, wait for the fetch. 74 | // If neither yields a response, return offline pages. 75 | event.respondWith( 76 | Promise.race([fetched.catch(_ => cached), cached]) 77 | .then(resp => resp || fetched) 78 | .catch(_ => { 79 | /* eat any errors */ 80 | }) 81 | ) 82 | 83 | // Update the cache with the version we fetched (only for ok status) 84 | event.waitUntil( 85 | Promise.all([fetchedCopy, caches.open(RUNTIME)]) 86 | .then(([response, cache]) => response.ok && cache.put(event.request, response)) 87 | .catch(_ => { 88 | /* eat any errors */ 89 | }) 90 | ) 91 | } 92 | }) 93 | -------------------------------------------------------------------------------- /_navbar.md: -------------------------------------------------------------------------------- 1 | * **[Syllabus](README.md)** 2 | * **[Tracker](https://docs.google.com/spreadsheets/d/14AkHKwhmKjT352FSm-ord8-IDInLp7dFfCCfYbLI4Pw/edit#gid=0)** 3 | * [Make School](https://www.makeschool.com) 4 | -------------------------------------------------------------------------------- /_sidebar.md: -------------------------------------------------------------------------------- 1 | - **[Syllabus](README.md)** 2 | - **Lessons** 3 | - [Static Website](Lessons/01-Static-Website/README.md) 4 | - [Git and GitHub](Lessons/02-Git-and-GitHub/README.md) 5 | - [Intro to Flask](Lessons/03-Intro-to-Flask/README.md) 6 | - [Flask Templating](Lessons/04-Flask-Templating/README.md) 7 | - [URLs, HTTP, REST, and Reading Errors](Lessons/05-URLs-HTTP-REST-and-Reading-Errors/README.md) 8 | - [Testing RESTful Routes](Lessons/06-Testing-RESTful-Routes/README.md) 9 | - [More Testing](Lessons/07-More-Testing/README.md) 10 | - [Document-Based Databases](Lessons/08-Document-Based-Databases/README.md) 11 | - [ERDs, Resource Associations, and MongoDB](Lessons/09-ERDs-Resource-Associations-and-MongoDB/README.md) 12 | - [Project Planning and User-Centered Development](Lessons/10-Project-Planning-and-User-Centered-Development/README.md) 13 | - [RESTful APIs and Deployment Environments](Lessons/11-Deployment-Environments/README.md) 14 | - [Presentation Practice](Lessons/12-Presentation-Practice/README.md) 15 | - Final Contractor Project Presentations 16 | - [**Homework**](Assignments/Weekly-Homework) 17 | - [**Quizzes**](Assignments/Quiz-Study-Guide) 18 | - **Tutorials** 19 | - [**Playlister**](https://www.makeschool.com/academy/track/playlistr-video-playlists-with-flask-and-mongodb-1c) 20 | - **Projects** 21 | - [Contractor Project](https://docs.google.com/document/d/1C8eOyLBeGMKJ2y50QwLU5tWjNb2JVcpAE4khUBIfm0U/edit?usp=sharing) -------------------------------------------------------------------------------- /archive/03. Resourceful Routing & Reading Errors/README.md: -------------------------------------------------------------------------------- 1 | # Resourceful Routing 2 | 3 | ## Objectives 4 | 5 | 1. Identify and use RESTful and Resourceful routes 6 | 1. Identify and use nested routes for nested resources 7 | 1. Read and interpret errors to find out your next step (google them!) 8 | 1. Use the native JavaScript `debugger` function 9 | 10 | ## Gif Search Feedback Tips 11 | 12 | - Indentation, Indentation, Indentation 13 | - Breaking with no search term 14 | - Commenting out unused code 15 | - Git init inside of project directory 16 | - Not following convention (rare) 17 | 18 | ## Routing 19 | 20 | A route is a url, a web endpoint, a path, or you might just call it a link. Routes are just strings, they can look like anything at all. But we want to follow standard conventions. So we use RESTful and Resourceful routes. 21 | 22 | ![RESTful Routes](assets/RESTful-routes.png) 23 | 24 | **Please memorize these routes.** 25 | 26 | Nested Routes 27 | 28 | ![Nested Routes](assets/nested-routes.png) 29 | 30 | ### REST in Express.js 31 | 32 | Express.js is built to accommodate a RESTful and Resourceful routes. 33 | 34 | ```js 35 | var express = require('express'); 36 | var app = express(); 37 | 38 | // INDEX 39 | app.get('/posts', (req, res) => { 40 | 41 | }); 42 | 43 | // SHOW 44 | app.get('/posts/:id', (req, res) => { 45 | 46 | }); 47 | 48 | // NEW 49 | app.get('/posts/new', function(req, res){ 50 | 51 | }); 52 | 53 | // CREATE 54 | app.post('/posts', function(req, res){ 55 | 56 | }); 57 | 58 | // EDIT 59 | app.get('/posts/:id/edit', function(req, res){ 60 | 61 | }); 62 | 63 | // UPDATE 64 | app.put('/posts/:id', function(req, res){ 65 | 66 | }); 67 | 68 | // DESTROY 69 | app.delete('/posts/:id', function(req, res){ 70 | 71 | }); 72 | 73 | app.listen(3000); 74 | ``` 75 | 76 | ## Activity: Predicting and Generating Resourceful Routes - 20 min 77 | 78 | 1. Work with a partner to define what these routes expect and return: 79 | - PUT `/articles/:articleId` 80 | - GET `/users/:userId/articles/:id` 81 | - POST `/classes/:classId/students` 82 | - GET `/classes/:classId/students` 83 | - GET `/epoch/:eraId/dinosaurs` 84 | 1. Work with a partner to define what the route would be for the following resources: 85 | - All the classes 86 | - All a users comments 87 | - A single article by an author 88 | - the menu items from one restaurant 89 | - Give me the form to make a new fish 90 | - create a new fish 91 | - Update a fish 92 | - The details of one hotel 93 | - All guests going to an event 94 | - Delete a fish 95 | 96 | 1. Come up with 3 or more routes that do not follow the Resourceful pattern, but sites still commonly use. (hint: "/about-us") 97 | 98 | ## Break 10 min 99 | 100 | ## Errors = Sign Posts 101 | 102 | Errors generally will tell you what is wrong with your code. Take the time to read them carefully and use them to solve your problems rapidly. 103 | 104 | JavaScript errors you will see in two places. In your terminal (server errors) and in your console (client errors). In either case, errors have the same parts. An error type ("ReferenceError"), a specific error message ("num is not defined"), and then a **Stack Trace**. 105 | 106 | The **Stack Trace** is the last commands the computer ran in reverse chronological error. Most of these commands happen on code you did not write and therefore cannot debug. However, usually the one line of code in the stack trace that you DID write is the one you need to fix. 107 | 108 | When you want to Google an error, google the error type and the error message statement. e.g. `ReferenceError: num is not defined`. 109 | 110 | ### Types of JavaScript errors: 111 | 112 | 1. **RangeError** - A number "out of range" has occurred - 99% of the time you did math wrong. 113 | 1. **ReferenceError** - An illegal reference has occurred - 99% of the time you forgot to define a variable and then called something on it. 114 | 1. **SyntaxError** - A syntax error has occurred - 99% of the time you forgot a `,`, `}`, or a `)`. 115 | 1. **TypeError** - A type error has occurred - 99% of the time you called a function on the wrong type. e.g. `num.toUpperCase();` when `num` is an integer and `toUpperCase()` is a string function. 116 | 1. **URIError** - An error in encodeURI() has occurred - 99% of the time you screwed up the format of a URL or request. 117 | 118 | ## Demo: Starting Rotten Potatoes - 20 min 119 | 120 | - User-Centered Development 121 | - Errors 122 | - `eval(require('locus'))` 123 | - console.log() 124 | 125 | ## Resources 126 | 127 | 1. [restful_routes.md - github version of RESTful routes image](https://gist.github.com/alexpchin/09939db6f81d654af06b) 128 | 1. [Three Options to Debug Node](https://spin.atomicobject.com/2015/09/25/debug-node-js/) 129 | 1. [Node's Debugger](https://nodejs.org/api/debugger.html) 130 | 1. [Locus](https://www.npmjs.com/package/locus) 131 | 1. [node-inspector](https://github.com/node-inspector/node-inspector) 132 | 1. [Node Inspector (video)](https://www.youtube.com/watch?v=03qGA-GJXjI) 133 | 1. [Node.js's Errors](https://nodejs.org/api/errors.html#errors_class_referenceerror) 134 | -------------------------------------------------------------------------------- /archive/03. Resourceful Routing & Reading Errors/assets/RESTful-routes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/archive/03. Resourceful Routing & Reading Errors/assets/RESTful-routes.png -------------------------------------------------------------------------------- /archive/03. Resourceful Routing & Reading Errors/assets/nested-routes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/archive/03. Resourceful Routing & Reading Errors/assets/nested-routes.png -------------------------------------------------------------------------------- /archive/10. A Brief History of JavaScript & Node.js/README.md: -------------------------------------------------------------------------------- 1 | # Brief History of JavaScript 2 | 3 | ![js](assets/js.gif) 4 | 5 | ## Objectives 6 | 7 | 1. Tell the story of the origins of JavaScript 8 | 1. List some of the most dramatic improvements of JavaScript with ES6 (ES2015) 9 | 1. Explain some of the potential future features of JavaScript versions and the role of other JS-based projects. 10 | 11 | ## Activity: History of JavaScript Group Presentation 12 | 13 | Break into groups of 3. Each team takes an equal number of years since 1995 when JS was invented and one team takes "the future". Spend 20 minutes researching your span of time, each person make a slide to explain one or more of the major events of your time period in the history of JavaScript. Now everyone presents, and each person present one slide of the deck that is the History of JavaScript. 14 | 15 | Now find another two groups (a team of 6) and spend 20 minutes answering the following question: 16 | 17 | **What were the three most important events or projects in the history of JS? Why?** 18 | 19 | ## Break 10 min 20 | 21 | ## Activity: Defining Node.js 22 | 23 | Break into groups and each person research one aspect of the following definition of Node.js. Come together to explain the whole of Node.js to each other. 24 | 25 | > Node.js is a event-driven, single-threaded, non-blocking I/O Runtime written in C and invented in 2009 by Ryan Dahl. 26 | 27 | ## Homework 28 | 29 | Watch these 3 videos. 2x speed ok :D 30 | 31 | Philip Roberts: What the heck is the event loop anyway? | JSConf EU 32 | 33 | [![Philip Roberts: What the heck is the event loop anyway? | JSConf EU](https://img.youtube.com/vi/8aGhZQkoFbQ/0.jpg)](https://www.youtube.com/watch?v=8aGhZQkoFbQ) 34 | 35 | Being a paradigm tolerant JS developer - Anna Lezhikova 36 | 37 | [![Being a paradigm tolerant JS developer](https://img.youtube.com/vi/ZvRksoVsSJE/0.jpg)](https://www.youtube.com/watch?v=ZvRksoVsSJE) 38 | 39 | Keep Betting on JavaScript - Kyle Simpson 40 | 41 | [![Keep Betting on JavaScript](https://img.youtube.com/vi/ixzK0jqLO70/0.jpg)](https://www.youtube.com/watch?v=ixzK0jqLO70) 42 | -------------------------------------------------------------------------------- /archive/10. A Brief History of JavaScript & Node.js/assets/browser-pop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/archive/10. A Brief History of JavaScript & Node.js/assets/browser-pop.png -------------------------------------------------------------------------------- /archive/10. A Brief History of JavaScript & Node.js/assets/browser-war.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/archive/10. A Brief History of JavaScript & Node.js/assets/browser-war.svg.png -------------------------------------------------------------------------------- /archive/10. A Brief History of JavaScript & Node.js/assets/browser_wars_by_shoze-d3k0ori.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/archive/10. A Brief History of JavaScript & Node.js/assets/browser_wars_by_shoze-d3k0ori.jpg -------------------------------------------------------------------------------- /archive/10. A Brief History of JavaScript & Node.js/assets/js.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/archive/10. A Brief History of JavaScript & Node.js/assets/js.gif -------------------------------------------------------------------------------- /archive/10. A Brief History of JavaScript & Node.js/assets/typescript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/archive/10. A Brief History of JavaScript & Node.js/assets/typescript.png -------------------------------------------------------------------------------- /archive/10. A Brief History of JavaScript & Node.js/assets/v8-stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/archive/10. A Brief History of JavaScript & Node.js/assets/v8-stack.png -------------------------------------------------------------------------------- /archive/10. A Brief History of JavaScript & Node.js/node-js.md: -------------------------------------------------------------------------------- 1 | ## Event Driven 2 | 3 | "Defined simply: event-driven programming is application flow control that is determined by events or changes in state." - [Understanding the Node.js Event Loop](https://nodesource.com/blog/understanding-the-nodejs-event-loop/) 4 | 5 | ## Single Threaded 6 | 7 | "A thread in computer science is short for a thread of execution. Threads are a way for a program to divide (termed "split") itself into two or more simultaneously (or pseudo-simultaneously) running tasks. Threads and processes differ from one operating system to another but, in general, a thread is contained inside a process and different threads in the same process share same resources while different processes in the same multitasking operating system do not. Threads are lightweight, in terms of the system resources they consume, as compared with processes." - [Wikipedia - Thread (computer science)](https://simple.wikipedia.org/wiki/Thread_(computer_science)) 8 | 9 | ## Non-Blocking 10 | 11 | ![non-blocking](assets/non-blocking-1.png) 12 | 13 | ## I/O Runtime 14 | 15 | "In computing, input/output or I/O (or, informally, io or IO) is the communication between an information processing system, such as a computer, and the outside world, possibly a human or another information processing system. Inputs are the signals or data received by the system and outputs are the signals or data sent from it. The term can also be used as part of an action; to "perform I/O" is to perform an input or output operation." [Wikipedia - Input/output](https://en.wikipedia.org/wiki/Input/output) 16 | 17 | ## Written in C 18 | 19 | It is written in C, not in JavaScript :D. 20 | 21 | ## Invented in 2009 by Ryan Dahl 22 | 23 | Ryan Dahl at JSConf 2009 introduced a JavaScript server he had build using the V8 engine he called it "an event-driven, single-threaded, non-blocking I/O Runtime written in C called Node.js". 24 | 25 | ![OG Node.js Presentation](https://www.youtube.com/watch?v=ztspvPYybIY) 26 | 27 | 28 | ## What's Next 29 | 30 | Now Ryan Dahl is making a competitor to node called Deno written in Typescript. 31 | 32 | * https://github.com/denoland/deno 33 | * https://thenewstack.io/node-js-creator-blasts-node-js-offers-a-secure-typescript-based-alternative/ 34 | * https://thenewstack.io/node-js-creator-blasts-node-js-offers-a-secure-typescript-based-alternative/ 35 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BEW 1.1 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 19 | 22 | 25 | 26 | 27 | 28 | 30 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Make-School-Courses/BEW-1.1-RESTful-and-Resourceful-MVC-Architecture/c81e78e79f6f229f9be84af4102a4a905a828f03/node.png -------------------------------------------------------------------------------- /reveal-md.json: -------------------------------------------------------------------------------- 1 | { 2 | "separator": "^\n\n", 3 | "verticalSeparator": "^\n\n", 4 | "theme": "black", 5 | "highlightTheme": "atom-one-light", 6 | "watch": true, 7 | "title": "BEW 1.1 Slides", 8 | "static": "Slides", 9 | "assetsDir": "assets", 10 | "staticDirs": "Lessons/Images", 11 | "scripts": [ 12 | ], 13 | "css": [ 14 | "Reveal/makeschool.css" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /reveal.json: -------------------------------------------------------------------------------- 1 | { 2 | "controls": true, 3 | "progress": true, 4 | "autoPlayMedia": false, 5 | "slideNumber": "c/t", 6 | "showSlideNumber": "all", 7 | "controlsTutorial": true, 8 | "controlsLayout": "edges", 9 | "transition": "slide", 10 | "transitionSpeed": "medium", 11 | "minScale": 0.5, 12 | "maxScale": 3 13 | } 14 | --------------------------------------------------------------------------------