### Git/Github * Unless you are experienced, I recommend avoiding creating branches * At the start it's easy to get into trouble * These are commands you should be very familiar with 1. git init 1. git clone 1. git commit 1. git add 1. git status 1. git push 1. git pull * See
Git and GitHub
### What a web server does * Reductionist view * Client sends url, server returns html
Review of some basic concepts
Client and Server
Client asks for a page; server sends a page
Web server receives the request and creates the page and sends it back
A level deeper:
Server (usually) looks inside a database for information
And runs an algorithm on that to create the output
And that’s what gets sent back.
* Review of
Internet Networking
* Review of design and operation of:
World Wide Web
### HTTP * HTTP verbs 1. GET - get representation of resource at URI 1. PUT - replace representation of resource at URI 1. POST - Add a new resource 1. others *
HTTP - Hypertext Transfer Protocol
### URI Routes and routing * Components of a URI `http://cs.brandeis.edu:3000/accounting/homepage?format=summary` * protocol - `http://` * hostname - `cs.brandeis.edu` * optional port number - `:3000` * path: `/accounting/homepage` * optional query string: `?format=summary` * Routing: Web Server parses the URI and calls the appropriate code to handle it * See
URI - Uniform Resource Identifier
### Relational Database * Tables * Rows * Primary keys * Foreign keys * Postgres * Review:
ActiveRecord Mechanics
### Deploying application to Heroku
### Models, Views, Controllers * Core concept from 166:
Models
* Ruby language: syntax, gems, bundler *
Ruby Example: Basics
*
Ruby Examples of Classes
*
Ruby Example: Inheritance
*
Things to remember about Ruby
* Testing with [Minitest/Spec](https://github.com/seattlerb/minitest)
### Live coding * Sinatra intro practice:
Hands On Sinatra Intro
* Or, Ruby intro practice
Simple car game
Thank you. Questions?
(random Image from picsum.photos)