Intro to web development Part 1
In this series of blogs I will be trying my best to explain how to make a very simple rock paper scissors web application. When we browse the web we have two key components, a client (your browser) and a server (the website). Your client makes get and post requests by interacting with the server, the way in which these to entities talk to each other is through Hypertext Transfer Protocol (HTTP), or the Hypertext Transfer Protocol Secure (HHTPS)(sites with secure communication). For a more in-depth look at this subject check out this helpful article.

Setting up the project
For this example, I will be running the server locally from my computer in combination with a few tools. All code will be written using Ruby/ERB and HTML, an understanding of the basics of Ruby and Gem files is ideal if you wish to follow along, however, the majority of this walkthrough is to illustrate a process appose to a specific technology or language.

The first tool is called Sinatra (yes indeed named after the musician). Sinatra is a web framework designed with Ruby that can receive and respond to HTTP requests, it will allow us to run a local server to host our site/web app. There are various frameworks available for different languages, for example Javascript has technologies such as Angular or React. Frameworks are designed with the intention of supporting the development of web applications providing for lack of a better word a “framework”.
To set up Sinatra in your project you simply need to create a project folder and add a gem file with “sinatra”,
Step 1
Create your project folder, you will need to add a Gem file with “sinatra”, an app.rb file for your Ruby code also including the requirement of “sinatra” at the top of your file. If you were to run this file at this point via the command line you would see the message ‘INFO WEBrick::HTTPServer#start: pid=##### port=4567’. This tells us out server is now up and running and we will be able to view it via our client using the address http://localhost:4567. You can close the server at any time by using the command “ctrl + c”.
Continue to part 2 here.