Jason's Stage 4 Notes

Lesson 1: Understanding Networks


A group of entities that can communicate even though they are not directly connected. There has to be at least three entities and there has to be a way that entities that are not directly connected can still communicate.

This Video does a good job of explaining it.


A server is a computer that interacts with a request we make to the computer. For example, whenever we type in "http://www.google.com", we are sending a request to Google's servers to return a website.

Get vs Post

Get parameters are included in the URL. Get requests are used for fetching documents. Get parameters have a max URL length. Get parameters are generally ok to cache. Get parameters should not change the server

Post parameters are included in the body. Post parameters are used for updating data or actually making changes. Post parameters have no max length. Post parameters are almost never cached. Post requests are usually destructive in nature.

Server Responses

When you send commands to the server the server will respond with different codes. There are 3 main server response types. 2xx codes indicate Success. 3xx codes indicate a Redirection. or action needs to be taken by the client in order to fulfill the request. 4xx and 5xx codes indicate Error The 4xx codes are intended for cases in which the client seems to have erred, and the 5xx codes for the cases in which the server is aware that the server has erred.

This websiteprovides a great explanation.

Lesson 2: Importance Of Validating Input

Checking Validation

Validation is verifying on the server that what we receive is what we expect to receive. If what we receive is different than what we expect we send a message notifying the user.

It is important that we validate the data and send the appropriate response so that the user knows what the problem is and potentially how to fix it going forward. This Video goes into more detail about this topic.

Handling Bad Data

We need to verify what the user enters and confirm if the data is bad. Using something like a drop-down is not enough to ensure that the user is not passing bad data to our form. It is important that we send appropriate responses or messages if the data is bad or incorrect.

This lesson covers this topic in detail.

Lesson 3: HTML Templates

Introducing Templates

Templates refer to a library used to build complicated strings (html). Jinja2 is a template library that was used to make this web page. Avoiding repetition is necessary when programming. You want to avoid having to rewrite the same code multiple times.

Variable Substitution

The syntax for substituting a variable in Jinja is a double curly brace. Substitution is basically just printing the variable. This is a handy way to substitute a string while maintaining cleaner code.

Template Inheritance

This is a great way to avoid repetition and makes your code more organized and easier to read. This lets you define a base template which you can later plug new HTML into. This is useful when, for example, you want to have a consistent header and footer across your app. Remember better organized code is more readable,easier to fix, easier to share, and harder to break.

Lesson 4: JavaScript

What is JavaScript?

JavaScript is the main programming language used with HTML and the Web. JavaScript can be used to create interactive effects within your web page.

This Wikipedia page has a great definition.

Where to use JavaScript?

If you are like me you are probably wondering how you can use JavaScript in your web page. According to this website. JavaScript can be placed in the body and head sections of an HTML page.

JavaScript Syntax

JavaScript syntax is a set of rules for how programs are constructed. JavaScript statements are separated by semicolons. There are two main types of values: Fixed values and variable values. Visit this page for more details about JavaScript syntax.

anonymous@anonymous.com wrote:
<a href=http://mexicanpharmacy01.com/>mexican pharmacy prices</a> mexican pharmacy hgh <a href=" http://mexicanpharmacy01.com/ ">mexican pharmacy no prescription</a> mexican pharmacy viagra 2017-10-21 10:46:09.894850
anonymous@anonymous.com wrote:
<a href=http://humanapharmacy01.com/>humana pharmacy otc</a> humana otc pharmacy <a href=" http://humanapharmacy01.com/ ">humana pharmacy otc</a> humana pharmacy number 2017-10-21 10:44:05.080940
anonymous@anonymous.com wrote:
<a href=http://giantpharmacy01.com/>giant eagle pharmacy indiana pa</a> giant pharmacy state college <a href=" http://giantpharmacy01.com/ ">giant eagle pharmacy grove city</a> giant eagle pharmacy salem ohio 2017-10-21 10:44:03.076870
anonymous@anonymous.com wrote:
<a href=http://canadianpharmacy01.com/>canadian pharmacy king</a> viagra online canadian pharmacy <a href=" http://canadianpharmacy01.com/ ">cheapest canadian pharmacy</a> canadian pharmacy insulin 2017-10-21 10:39:48.816190
anonymous@anonymous.com wrote:
<a href=http://boardofpharmacy01.com/>louisiana board of pharmacy</a> texas state board of pharmacy <a href=" http://boardofpharmacy01.com/ ">texas board of pharmacy</a> florida board of pharmacy 2017-10-21 10:38:18.682620
anonymous@anonymous.com wrote:
<a href=http://mailorderpharmacy01.com/>tricare mail order pharmacy</a> blue shield mail order pharmacy <a href=" http://mailorderpharmacy01.com/ ">caremark mail order pharmacy</a> right source mail order pharmacy 2017-10-21 10:29:23.586960
anonymous@anonymous.com wrote:
<a href=http://shopritepharmacy01.com/>shoprite pharmacy hauppauge</a> shoprite pharmacy southbury ct <a href=" http://shopritepharmacy01.com/ ">shoprite pharmacy rockaway nj</a> shoprite bound brook nj pharmacy 2017-10-21 10:29:21.777860
anonymous@anonymous.com wrote:
<a href=http://pharmacychecker01.com/>sams pharmacy price checker</a> canadian pharmacy checker <a href=" http://pharmacychecker01.com/ ">pharmacy price checker</a> canadian pharmacy checker 2017-10-21 10:28:30.576160
anonymous@anonymous.com wrote:
<a href=http://onlinepharmacyreviews01.com/>online pharmacy canada</a> viagra online pharmacy <a href=" http://onlinepharmacyreviews01.com/ ">cvs pharmacy online</a> viagra online canadian pharmacy 2017-10-21 10:26:39.594820
anonymous@anonymous.com wrote:
<a href=http://globalpharmacy01.com/>global pharmacy wholesale</a> global rx pharmacy <a href=" http://globalpharmacy01.com/ ">global pharmacy plus vancouver</a> global pharmacy plus reviews 2017-10-21 10:26:05.288780